Queue-North-Website/docs
null 26136f4e5c security: the scanner never ran its private-key pattern, and verify never saw dist
Three faults in one guard, the only thing standing between a credential and a
pushed commit. Found while planning Batch 17; closes #235.

1. grep was called without -e, at both call sites. The private-key pattern
   starts with dashes, so grep read it as an option, exited 2, and the beside-it
   2>/dev/null threw the complaint away. A staged private key passed the
   pre-commit hook, and had since the rule was written. Proven in a scratch
   repository before and after.

2. The 2026-08-29 pattern, committed as-is in 7415e19, flagged two comment
   lines that exist to show the shape of a credential. verify was therefore red,
   and release.sh would have died after bumping package.json, package-lock.json
   and the Dockerfile, leaving a tree that pre-push then refuses.

3. verify never scanned dist/, though SECURITY_CHECKLIST.md has listed the
   bundle scan as a release check for months. A key can reach the bundle from an
   environment variable inlined at build time without ever being committed.

What changed, beyond -e: every pattern is compiled against empty input before
the scan and an unreadable one exits 2, because silence from a broken matcher
looks exactly like a clean tree. The NAME=value pattern now also catches quoted
values, which is how a real secret is usually written down and which it has
always missed. A line that must show a credential shape carries `secrets-ok:`
and a reason, which excuses that line alone and stays visible to review and to
grep. Guard 20-secrets runs --tracked and --built dist/.

Proven by mutation, per GUARDS.md: a staged PEM header, a bare API_KEY=, a
quoted API_KEY=, an exported secret and an AWS key id each exit 1; a ${VAR}
value, a <placeholder>, an excused line and a delete-only commit each exit 0; an
unreadable pattern exits 2 with content staged and with none; a key planted in
dist/ fails guard 20-secrets alone, masked in the report.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-10 04:23:39 -05:00
..
architecture security: the scanner never ran its private-key pattern, and verify never saw dist 2026-09-10 04:23:39 -05:00
data docs: adopt project template, retire the markdown backlog 2026-08-18 01:21:13 -05:00
design docs: adopt project template, retire the markdown backlog 2026-08-18 01:21:13 -05:00
history docs: log Batch 11 and Batch 16 — four false, two real, found by rendering 2026-08-18 04:09:31 -05:00
planning feat(deploy): production always runs a numbered version 2026-08-18 02:54:42 -05:00
qa fix(ui): header CTA clipped at iPad portrait, and reCAPTCHA cut off at 320px 2026-08-18 04:05:37 -05:00
security security: the scanner never ran its private-key pattern, and verify never saw dist 2026-09-10 04:23:39 -05:00
DOC_TRUST_MAP.md fix(security): stop secrets.sh flagging every prerendered page, and clear the dangling doc claims 2026-08-18 01:40:46 -05:00
OPERATIONS.md docs: v0.9.4 is live, production is on a numbered version, and Watchtower is out 2026-08-18 03:38:02 -05:00
TOOLS.md security: the scanner never ran its private-key pattern, and verify never saw dist 2026-09-10 04:23:39 -05:00
WORK_CYCLE.md feat(deploy): production always runs a numbered version 2026-08-18 02:54:42 -05:00