Repository navigation
docs: name the real secret-scan allowlist and pin it to the file - #888
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written-by: Fledge Platform Dev-4
Bot: Fledge Platform Dev-4
Fixes #59
The secret-scan section of
docs/security.mdtold a reader that the per-linewhitelist covers "the three fake test fixtures" and named
test/crypto.test.ts:32. The allowlist carries two entries, both intest/transcript.test.ts, andtest/crypto.test.ts:32is a comment explainingwhy 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:52and:66), says whytest/crypto.test.tsneedsnone (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 readsscripts/secret-scan-allowlist.json, parses the sentence indocs/security.mdthat describes it, and asserts the two are the same set, soan 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.mjsandtest/rotateToken.test.tsare nottouched.
Tests
1be104533d3e:test/secretsDoc.test.ts6 pass / 1 fail —the runbook names exactly the allowlist the scanner enforces, withdocs/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.
Ran:
npm ci— passnpm run check— pass, 2317/2317 tests, lint clean, typecheck clean, build oknpx tsx --test test/secretsDoc.test.ts— 7/7node scripts/risk-gate.mjs --base 1be104533d3ea0f14af335019d10b3b790116e8a --head HEAD --no-fetch—risk-tier: T1; basis: test/secretsDoc.test.ts, 2 filesnode scripts/secret-scan.mjs— pass, no suspected valuenode scripts/changelog.mjs check— pass, 10 fragmentsNot run:
pr-lint(no PR number until the Lead opens it),npm run dev(nouser-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.jsonbecomes unreadableor if the sentence disappears, which is the behaviour a drift test should have.
Docs
docs/security.mdis the doc this change corrects; nothing else describes theallowlist wording.