Skip to content

docs(security): add the audit history, and close a test gap it found - #109

Merged
semics-tech merged 1 commit into
mainfrom
docs/security-audit-report
Aug 2, 2026
Merged

docs(security): add the audit history, and close a test gap it found#109
semics-tech merged 1 commit into
mainfrom
docs/security-audit-report

Conversation

@semics-tech

Copy link
Copy Markdown
Owner

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.

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 a HelloAck presenting a key that doesn't match a pinned commandSigningKeyFingerprint tears the session down (session.connected stays false, onDisconnect fires 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

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
@semics-tech
semics-tech merged commit 0c30bb8 into main Aug 2, 2026
9 checks passed
@semics-tech
semics-tech deleted the docs/security-audit-report branch August 2, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant