docs(security): falsify the remediation independently (Session 7) - #60
Merged
Merged
Conversation
Closes §9.1 item 3. The fourteen fixes in 66a3171..58538b8 were all written by one agent, and §11's falsification pass was written by the same one. This is the pass by an agent that did not write them, run against a build of 58538b8 on Windows/Node 26 and WSL2 Ubuntu/Node 22 on real ext4, with every §11 confirmation treated as unverified and re-run. Eleven fixes hold. Four defects, all Low, all reproduced end to end: - S-01 the credential hoist is guarded on `isApiRoute`, but `getOrCreateSession` runs for every path. A no-cors GET carries no Origin header, so V-02's gate never sees it. Driven with a real browser from a foreign origin: 400 requests, 400 connections, 0 carrying Origin, sessionCount 100 — and a seeded victim session and its content evicted. That is §10.2's chain after the fix. The test asserting the property exercises one route and is titled for all of them. - S-02 F-06's label escaping lives in core/render; the CLI's fallback renderer builds the same header from the raw path. Same directory, two runs: 3 headers on the success path, 4 on the fallback path, the extra one naming a file that does not exist. The README sentence that mitigates F-07 is false on that route. - S-03 F-05 replaced the verbatim directive and left V8's JSON parse message on the same field, which quotes ~15 bytes of the payload. - S-04 the §6.3 guard validates the base URL and nothing after it. fetch follows redirects; undici strips authorization cross-origin but not x-api-key, so a 302 walked an Anthropic key to a stand-in metadata listener whose body the gateway relayed back as a 200. Two downgrades: F-03's "no realistic invocation" spans two repositories (it does — a sibling-repo bundle ships the second repo's ignored files unwarned), and §11.2's "no remaining special case" in V-02 (an empty Origin value is still exempt, though no browser sends one). Confirmations worth the record: V-01/V-03 survived a 50,000-case differential fuzz against JSON.parse with 0 divergences; the SSRF guard refused all 43 URLs including every classic notation; F-04 measured 600 on ext4 on create and on overwrite; OX-L8 reproduced its own comment's 146,176 to the byte and is inert on Windows. One hypothesis failed and is recorded: F-03's new execFileSync does not open a Windows cwd-hijack — the planted git.exe never ran. Report only. Nothing under src/ was modified, per the protocol's read-only rule and because the agent that fixes these should not be the one that found them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes §9.1 item 3 of
docs/security-review-2026-08-30.md.The fourteen fixes in
66a3171..58538b8(9 files, 515 insertions) were all written by one agent, and §11's falsification pass was written by the same one. This is the pass by an agent that did not write them, run against a build of58538b8on Windows/Node 26 and WSL2 Ubuntu/Node 22 on real ext4 — three of the fixes in that surface are POSIX-only. Every §11 confirmation was treated as unverified and re-run.Report only. Nothing under
src/is modified: the protocol is read-only, and the agent that fixes these should not be the one that found them.Eleven fixes hold
JSON.parse— 44,419 accepted bodies, 0 divergences — with randomly\uXXXX-escaped keys, duplicated members and shuffled order.600on ext4 on create and after overwriting files left at 0644 and 0666.Four new findings, all Low, all reproduced end to end
isApiRoute, butgetOrCreateSessionruns for every path. A no-cors GET carries noOriginheader, so V-02's gate never sees it. Driven with a real browser from a foreign origin: 400 requests → 400 distinct connections → 0 carryingOrigin→sessionCount100, and a seeded victim session plus its stored content evicted. That is §10.2's chain, step for step, after the fix. The test asserting the property exercises one route and is titled for all of them.renderFallbackBytesbuilds the same==> path <==header from the raw path. Same directory, two runs on ext4: 3 headers on the success path, 4 on the fallback path, the extra one naming a file that does not exist. The README sentence mitigating F-07 is false there.JSON.parsemessage is forwarded verbatim and quotes ~15 bytes of the payload intotrace.fallbackReason.fetchsets noredirect; undici stripsauthorizationcross-origin but notx-api-key. A stub provider's 302 delivered an Anthropic key to a stand-in metadata listener, whose body the gateway relayed back as a 200.Two downgrades
optimize repoA repoB, the documented multi-path form) ships the second repository's git-ignored files with no warning. Measured.Originvalue is still exempt. The conclusion survives — no browser sends one — but the sentence overstates what was measured.One hypothesis failed and is recorded as a negative: F-03's new
execFileSync('git', …)does not open a Windows cwd-hijack. A plantedgit.exenever ran, with the hostile directory as the child's cwd and again as the parent's.Verification
npm run buildclean at58538b8.test/unit/security-review-findings.test.ts— 48 passed / 2 skipped.🤖 Generated with Claude Code