docs: directive for pre-publication guards against capture-derived data - #302
Open
vsits-proxy-builder[bot] wants to merge 2 commits into
Open
docs: directive for pre-publication guards against capture-derived data#302vsits-proxy-builder[bot] wants to merge 2 commits into
vsits-proxy-builder[bot] wants to merge 2 commits into
Conversation
Testing this proxy well requires real CC traffic, so the fixtures that make tests meaningful are the same artifacts that carry session UUIDs, signatures, paths, and other people's words. Three instances have already reached public history (#292, #272, meter#19). Corrects the assumption that CI is the gate. A fork PR's diff is public the moment it opens and the objects persist in this repo as refs/pull/N/head; CI runs after. Only a contributor-side pre-push hook prevents publication — CI is detection and containment, keeping data off main, tags, and npm. Depends on @Gunther-Schulz's tools/absence-scan.mjs rather than writing a second scanner; asked on #292 whether it can land standalone.
Ran @Gunther-Schulz's scanner against the #292 file. It already has every interface the directive asked for — shebang, main-module guard, 0/2/1 exit codes, --git-range for a pre-push caller — and reports class, path, and length without ever echoing a value. Scope narrows accordingly: nothing here asks for new capability. Two settings are correct for his fork and wrong upstream, and would otherwise survive the move by inertia. The #292 fixture is allowlisted by name, so the range that introduced it scans clean; that entry has to come out once the fixture is synthesized. And the semantic classes are scoped to test/fixtures/harvested/, which does not exist here — upstream must choose an equivalent or accept byte-level-only, deliberately rather than by discovering three classes never ran.
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.
Directive only — no implementation here. Filing the reasoning so the layering argument exists in public before someone relies on the wrong half of it.
The correction this exists to make
"CI will catch it" is the assumption I was operating on, and it is wrong about prevention:
pull_requestA fork PR's diff is public on github.com the instant it opens; CI starts afterward. The objects also land in this repo as
refs/pull/N/headand persist even if the PR is closed or the fork deleted — verified,#294and#296are resolvable onoriginright now.CI is still worth having. It is detection and containment: keeps data off
main, off tags, off npm, and bounds the window so remediation knows what to treat as burned. It is not a gate.Why the tension is permanent
Testing this proxy well requires real Claude Code traffic. The fixtures that make the tests meaningful are the same artifacts that carry session UUIDs, thinking signatures, filesystem paths, and other people's words. We are not going to stop testing against real data, so the guard has to be structural rather than a habit.
Three instances have already reached public history:
test/fixtures/cc-transcript-shape-snapshot.json— our own commit,16ad235(feat: JSONL session-content mirror (P1, refs CC#66734 + CC#66486) #221), onmainsince 2026-06-12 (test/fixtures/cc-transcript-shape-snapshot.json carries capture-derived identifiers (public history) #292)claude-code-meter#19— remediated by rotating the host, because history cannot be scrubbedThe first one is ours. This is not a contributor-hygiene problem.
Deliberately not writing a scanner
@Gunther-Schulz already has
tools/absence-scan.mjs— class-based, importable, and already running as his own pre-push guard against real captures. Per the anti-bloat lens, a second implementation needs justification and there is none. This directive depends on that scanner landing; asked on #292 whether it can split out of the #272 stack.If he would rather own the whole thing including the hooks, close this in favour of his.
Two constraints worth reading
Scan the diff, not history. The untracked
pre-pushon the maintainer host scans all reachable history and produced 77 false positives on one rebase. A noisy guard gets--no-verify'd and then protects nothing.Report classes and counts, never values. A guard that echoes what it found into a terminal, a CI log, or a PR comment has published it a second time. #292 was reported that way and it is the right pattern.
And an honest ceiling: mechanical classes are catchable (UUIDs, PEM blocks, high-entropy strings, home paths, IP literals). The 2,305 characters of someone else's GitHub comment that #292 actually carried is a judgment call — a heuristic flagging long verbatim strings under
test/fixtures/would surface it for review, which is as far as this can honestly claim to go.Non-Functional Requirements
pre-pushwrapper, an installer, one CI step, one docs section. Materially larger means the scanner boundary was violated.Open questions in the directive
core.hooksPathacceptable? It replaces.git/hookswholesale; the maintainer host has apost-merge/post-checkoutpair that must survive, so the installer likely has to chain.Refs #292, #272
— Proxy Builder