Skip to content

docs: name the real secret-scan allowlist and pin it to the file - #888

Merged
HugoXK merged 1 commit into
mainfrom
dev4/59-secret-rotation-docs
Nov 16, 2026
Merged

HugoXK merged 1 commit into
mainfrom
dev4/59-secret-rotation-docs

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Written-by: Fledge Platform Dev-4
Bot: Fledge Platform Dev-4

Fixes #59

The secret-scan section of docs/security.md told a reader that the per-line
whitelist covers "the three fake test fixtures" and named
test/crypto.test.ts:32. The allowlist carries two entries, both in
test/transcript.test.ts, and test/crypto.test.ts:32 is a comment explaining
why that file needs no entry at all — so the runbook sent the next reader after
an entry that does not exist and away from the reason the third file is absent.

What changed

  • docs/security.md — the sentence names the two entries the scanner carries
    (test/transcript.test.ts:52 and :66), says why test/crypto.test.ts needs
    none (its fixtures are assembled from fragments, so no token-shaped literal is
    in the file), and says the sentence is pinned.
  • test/secretsDoc.test.ts — a drift test: it reads
    scripts/secret-scan-allowlist.json, parses the sentence in
    docs/security.md that describes it, and asserts the two are the same set, so
    an entry added, removed or renumbered without the prose following it fails.

Out of scope here, per the Lead: the rotation script's exit codes (that sentence
belongs to #71 together with the script change), and the owner's rotation
itself. scripts/rotate-github-token.mjs and test/rotateToken.test.ts are not
touched.

Tests

  • Red at 1be104533d3e: test/secretsDoc.test.ts 6 pass / 1 fail —
    the runbook names exactly the allowlist the scanner enforces, with
    docs/security.md must name exactly the entries scripts/secret-scan-allowlist.json carries.
    The other six cases in that file pass before and after, which is the point:
    only the stale sentence is wrong.
  • Green at the tip: 7/7 in that file, 2317/2317 in the full suite.

Ran:

  • npm ci — pass
  • npm run check — pass, 2317/2317 tests, lint clean, typecheck clean, build ok
  • npx tsx --test test/secretsDoc.test.ts — 7/7
  • node scripts/risk-gate.mjs --base 1be104533d3ea0f14af335019d10b3b790116e8a --head HEAD --no-fetch — risk-tier: T1; basis: test/secretsDoc.test.ts, 2 files
  • node scripts/secret-scan.mjs — pass, no suspected value
  • node scripts/changelog.mjs check — pass, 10 fragments

Not run: pr-lint (no PR number until the Lead opens it), npm run dev (no
user-visible surface changes), any rotation command (owner-only).

Risks

None to the product: the change is one documentation sentence plus a test.
The test fails closed if scripts/secret-scan-allowlist.json becomes unreadable
or if the sentence disappears, which is the behaviour a drift test should have.

Docs

docs/security.md is the doc this change corrects; nothing else describes the
allowlist wording.

@HugoXK
HugoXK enabled auto-merge (squash) November 16, 2026 03:44
@HugoXK
HugoXK merged commit 410f16b into main Nov 16, 2026
28 checks passed
@HugoXK
HugoXK deleted the dev4/59-secret-rotation-docs branch November 16, 2026 03:47
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.

security: rotate the leaked development PAT and record the secret inventory

1 participant