Repository navigation
feat(tools): read-time provenance footer for sensitive artifacts - #272
Closed
raymondginger2018-sudo wants to merge 1 commit into
Closed
raymondginger2018-sudo wants to merge 1 commit into
raymondginger2018-sudo wants to merge 1 commit into
Conversation
Sensitive reads get a compact provenance note (mtime/size/sha256_64k snapshot, proxy-marked) so edited/binary/placeholder data stays identifiable at the moment it enters context. DEEPCODE_PROVENANCE_CONTEXT=0 disables; the footer is additive and fail-safe (best-effort, never aborts).
Collaborator
|
Thank you, @raymondginger2018-sudo. We're closing this one:
If you'd like to pursue change detection for hook and MCP config, please open an issue first that describes where the earlier state is kept and which client shows the warning. |
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.
What
Reads of sensitive artifacts (anything matching
SENSITIVE_PATH_PATTERNS) now append acompact provenance footer to the returned text:
degrades to no footer and never aborts the read.
DEEPCODE_PROVENANCE_CONTEXT=0restores plain reads.not a write-time ledger — writer identity is deliberately not recorded.
Why
Sensitive config/credential reads enter model context as plain text with no age or integrity
signal: an edited, binary-replaced, or placeholder file is indistinguishable from a fresh one
at the moment it is reused. Emitting the snapshot when the bytes are consumed makes
staleness/tamper evidence visible exactly then (2610.13227 §5.2: proxy provenance at read
time so mutation facts travel with the data).
Tests
tests/test_file_provenance.py— 5 tests:.env) gets footer with all fields,""for a vanished path (never raises),""for a non-sensitive path.Notes
Default-on but strictly additive and switchable — happy to flip it to opt-in if you prefer
zero output-shape change by default.