Skip to content

Commit cbfe9d3

Browse files
committed
fix(security-audit): allowlist RQA credential-secrecy test fixtures
test_rqa_authority_secrecy.py, test_rqa_remediation_push.py and test_rqa_remediation_remediate.py each embed a deliberately real-looking token so the test can prove the code never lets one escape -- the same purpose the security_audit_fixtures/secrets/ and the-professor fixture entries already document. gitleaks reads them as live credentials and fails the audit gate on PRs block#2238 and block#2244. The values are synthetic: a ghp_ prefix on a literal sequential-alphabet body, and a named canary constant. No real credential is present. Scoped to three literal paths rather than a tests/.* glob, for the reason issue block#389 records for Cargo.lock: a directory-wide exemption would silently cover every present and future file in that tree against every rule, and only these three were verified. Signed-off-by: Serina Mcfall <[email protected]>
1 parent e5f19cb commit cbfe9d3

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

‎.gitleaks.toml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,28 @@ paths = [
145145
# block-private-key.md, and block-webhook-url-token-param.md, the four
146146
# fixtures the default ruleset currently matches in this directory.
147147
'''launchpad/agents/the-professor/tools/contract/fixtures/.*''',
148+
# Review-queue-automation's credential-secrecy fixtures (#2182, #2187), the
149+
# same purpose and reasoning as the two fixture entries above: each test
150+
# embeds a deliberately real-looking token so it can prove the code never
151+
# lets one escape. test_rqa_authority_secrecy.py asserts rqa.github's
152+
# transport keeps a canary out of every log line, exception message and
153+
# persisted record; test_rqa_remediation_push.py and
154+
# test_rqa_remediation_remediate.py assert push_head converts a
155+
# subprocess.TimeoutExpired *carrying* the token on .output into a plain
156+
# non-zero ProcessResult rather than letting the exception, and the bytes
157+
# it holds, propagate. A fixture that gitleaks cannot read as a secret
158+
# would not exercise the control it exists to prove.
159+
# Synthetic, not leaked — classified without reproducing the values: the
160+
# remediation pair is a `ghp_` prefix on a literal sequential-alphabet
161+
# body, and the authority one is a named canary constant. No real
162+
# credential is present and nothing here needs rotating.
163+
# Scoped to these three literal paths rather than a tests/.* glob, for the
164+
# reason #389 records for Cargo.lock above: a directory-wide exemption
165+
# would silently cover every present and future test file in that tree
166+
# against every rule, and only these three were verified.
167+
'''^launchpad/skills/review-queue-automation/tests/test_rqa_authority_secrecy\.py$''',
168+
'''^launchpad/skills/review-queue-automation/tests/test_rqa_remediation_push\.py$''',
169+
'''^launchpad/skills/review-queue-automation/tests/test_rqa_remediation_remediate\.py$''',
148170
]
149171
regexes = [
150172
# nip-oa.md's worked example tags a synthetic event with a public key

0 commit comments

Comments
 (0)