Repository navigation
fix(evidence): restrict recorded capture reads to the raw folder - #399
Merged
Merged
Conversation
what changed: Evidence context validates recorded Raw paths before reading, refuses private project files/traversal/links leaving research/raw, and distinguishes directories from missing captures. ADR-0109's defect trigger also migrates corpus capture/Raw checks and artifact Raw/ledger readers to projectFile; a non-file ledger is refused before reading. why: A Raw cell could print a project's private file into an agent context. The accepted ADR-0109 explicitly requires the other recorded-path readers to move when this deferral's defect trigger fires. No alternative design was set aside. what it touched: evidence-context, corpus and artifact libraries; evidence-context and artifact-producer tests; all three architecture rows; ADR-0109 implementation note, changelog and research-kit README inventory. what you verified: verified - red-first 90 passes, three expected failures and four unsupported file-symlink tests; then 93 passes, zero failures and the same four unsupported capabilities across evidence-context/corpus/artifact-producer. Direct/traversal private paths cause zero private reads and no text/JSON disclosure; directories and non-file ledgers are named. Handoff OK, preflight PASS, doctor READY collector/firecrawl-cli in this checkout. Untested locally - real file links; the CI matrix exercises supported symlink capabilities. The required full offline suite runs in the commit gate before acceptance. what you got wrong and fixed: mistake - the documentation updater assumed every architecture row ended with an ADR column. where - the local architecture-update step. impact - its first attempt stopped before writing the map; no delivered PR was affected. cause - the existing corpus row spans lines and the evidence-context row has an empty ADR cell. fix - update each module's responsibility prefix and record the expired deferral. verified - all three rows changed and git diff --check passed; the targeted code checks remain 93 passes, zero failures and four unsupported capabilities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Raw cell could make evidence-context read and print a private project file such as
.env. Raw readers now validate paths before content access and restrict capture reads toresearch/rawby path and real path, with named missing/non-file diagnostics.Fixes #351
what changed: Blocked private files, traversal and internal private-file links; named directory inputs. Migrated corpus and artifact recorded-path readers to
projectFileand refused a non-file ledger before reading.why: ADR-0109's accepted deferral explicitly requires the other two readers to move when a recorded-path defect fires the trigger. The implementation note records that completion. No alternative design was set aside.
what it touched: evidence-context/corpus/artifact libraries, regressions, their architecture rows, ADR-0109 note, changelog and research-kit README inventory.
what you verified: verified - red-first 90 passes, three expected failures and four unsupported file-symlink tests; then 93 passes, zero failures and the same four unsupported capabilities across evidence-context/corpus/artifact-producer. Private-file reads are counted as zero; both CLI text and JSON omit the sentinel. Handoff OK, preflight PASS, doctor READY collector/firecrawl-cli in this checkout. The standard full offline commit gate accepted
aa1d673f66f364eab0230b1bfdc9c0a9ca02d3c0. Untested locally - real file links; CI exercises supported symlink capabilities.what you got wrong and fixed: mistake - the architecture updater assumed every row ended with an ADR column. where - local documentation update. impact - the first update stopped before writing the map; no delivered PR was affected. cause - existing multiline and empty-ADR rows. fix - update responsibility prefixes. verified - all three rows changed, and the targeted tests passed with zero failures.