Project-Template/docs
null 0e9b5c482a fix(secrets): the scanner printed the credential it found
The report truncated each line to 120 characters and redacted nothing, so a
credential shorter than the budget was printed whole -- into the terminal
scrollback, the CI log, and wherever that log is shipped. It applied to every
mode, which meant a real leak caught by the pre-commit hook was also a real leak
printed to a terminal. The comment above it claimed the match was never echoed
in full; it was corrected to describe the behaviour in the previous commit, and
this changes the behaviour instead.

The match is now masked before truncation. \001 is the substitution delimiter,
as a real control byte rather than the literal backslash-zero-zero-one a
double-quoted "\001" produces -- that first attempt made sed take `\` as its
delimiter and silently substitute nothing, which looked exactly like working
code. These patterns contain both / and |, so either would end the expression
early.

Widening the JWT pattern was part of the same fix, not a separate improvement.
Masking removes exactly what the pattern matched, so `eyJ[A-Za-z0-9_-]{10,}`
redacted the header and printed the payload and signature next to it -- and
those are the token. It now matches all three segments. A pattern that
under-matches is a pattern that half-prints the secret.

Verified in --built and --staged: a planted JWT and a user:pass@host URL are
each reported with file and line, and neither planted value appears anywhere in
the output.

closes #11

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 23:08:57 -05:00
..
architecture fix(secrets): the scanner printed the credential it found 2026-08-17 23:08:57 -05:00
data fix(docs): two documents claimed files that must not exist 2026-08-17 22:45:35 -05:00
design chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
history chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
planning chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
qa feat(qa): pass I, money flowing backwards 2026-08-17 22:54:03 -05:00
security feat(docs): two markers for entries that do not apply everywhere 2026-08-17 22:55:56 -05:00
DOC_TRUST_MAP.md feat(docs): OPERATIONS.md, the runbook that did not exist 2026-08-17 22:57:20 -05:00
OPERATIONS.md feat(docs): OPERATIONS.md, the runbook that did not exist 2026-08-17 22:57:20 -05:00
TOOLS.md chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
WORK_CYCLE.md docs(tracker): the milestone naming this template teaches truncates on the card 2026-08-17 22:49:23 -05:00