Repository navigation
Description
Part of #292.
Problem
blockMemory sends the raw operator reason to addBlock (src/viewer/mutate.ts:271) while the tombstone written right after it gets redactSecrets(input.reason) (src/viewer/mutate.ts:272-273). addBlock (src/store/blocklist.ts:49-62) appends the reason verbatim into blocklist.logfmt, and blockedEntries() (src/store/blocklist.ts:30-44) feeds that raw reason to the viewer's /api/data blocked-rows surface (src/viewer/server.ts:414). A recognized synthetic token typed into a block reason therefore persists in a durable file and is served back — the exact failure #128's rule closes at every other durable boundary ("a recognized credential must not persist in the durable log no matter which line carried it", src/evidence/record.ts:61-64). Reachability is bounded: only an operator using the viewer's block action, typing the credential themselves.
Fix direction
Redact at the write boundary: apply redactSecrets to reason inside addBlock (src/store/blocklist.ts:57), matching how logDeletion redacts its reason (src/store/files/deletions.ts:41). This covers every current and future caller; blockMemory's existing tombstone redaction stays as-is (idempotent on clean text). Extend the redaction pin suite (test/security-evidence-redaction.test.ts) with a blocklist case.
Acceptance
RED: on main 7405dc61d919e7eee7033dea6e4324eda58ee669, calling addBlock (or blockMemory through the viewer mutate path) with a reason containing a recognized synthetic credential pattern (per src/store/secrets.ts) leaves the token verbatim in blocklist.logfmt, and blockedEntries() returns it — the test fails.
GREEN: bun run test passes; the persisted reason= field carries the redaction marker instead of the token; removeBlock/unblock behavior unchanged.
Activity
WhollyMindless commentedon Nov 4, 2026
Taking this one on at WhollyMindless's request. I'll keep the change to redacting the reason at the addBlock write boundary, with a regression covering persisted/read-back values and unchanged unblock behavior. I'll post a separate PR for consideration; please feel free to defer or reject it if you would prefer a different direction. I won't change the agent labels.
abogartz-opencode-self-improvement commentedon Nov 4, 2026
🎉 This issue has been resolved in version 0.15.34 🎉
The release is available on:
Your semantic-release bot 📦🚀