docs(security): add the audit history, and close a test gap it found - #109
Merged
Conversation
A full-repo security audit (five parallel reviews, one per trust boundary) found three real issues, fixed in #106, #107 and #108, and re-verified everything the 2026-07 deep-dive review had already closed. This adds the durable record: every finding from both rounds, the PR that fixed it, and the specific regression test that stops it recurring — checked against the actual test files rather than asserted from memory. Writing that record surfaced a real gap: the command-signing-key-pin tear-down in session.ts (#91) had no dedicated test, so nothing would catch a regression back to "log a warning and continue" on a fingerprint mismatch. Closed with command-signing-key-pin.test.ts, covering both the refusal on a mismatched key and the normal-connect path on a matching one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AyYg2j8FVkLjiaVcj5HCkj
1 task
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.
Summary
This is the write-up requested for the full-repo security audit performed in this session:
docs/security-audit.md, a running record of security audits — findings, the PR that fixed each one, and the specific regression test that stops it recurring.maxCapabilityceiling, no plaintext credential path, RFC1918 webhook targets, the known SBOM/scanning gap).Every "regression test" citation was checked against the actual test file and, where possible, the actual test title — not asserted from memory. That process surfaced a real gap: the command-signing-key-pin tear-down in
session.ts(fixed in #91, back in the 2026-07 round) had no dedicated test. Nothing would have caught a regression back to "log a warning and continue" on a fingerprint mismatch.Fix
Added
packages/worker/test/command-signing-key-pin.test.ts: asserts aHelloAckpresenting a key that doesn't match a pinnedcommandSigningKeyFingerprinttears the session down (session.connectedstaysfalse,onDisconnectfires with the specific reason), and that a matching key connects normally.Test plan
pnpm lint && pnpm typecheck && pnpm test:unit— all green, 634 tests passing (2 new)🤖 Generated with Claude Code
https://claude.ai/code/session_01AyYg2j8FVkLjiaVcj5HCkj