Skip to content

fix(api): restore green gitleaks — path-allowlist log-redactor test fixtures#103

Merged
hizrianraz merged 1 commit into
mainfrom
fix/gitleaks-allowlist-structured-log
May 31, 2026
Merged

fix(api): restore green gitleaks — path-allowlist log-redactor test fixtures#103
hizrianraz merged 1 commit into
mainfrom
fix/gitleaks-allowlist-structured-log

Conversation

@hizrianraz
Copy link
Copy Markdown
Contributor

@hizrianraz hizrianraz commented May 31, 2026

Fixes the gitleaks (detect) CI failure on main.

The #101 re-cut/squash changed the commit SHAs of the synthetic sk-* / ai_infera_* fixtures in tests/unit/test_structured_log.py (they exist only to test the log redactor). The SHA-pinned .gitleaksignore fingerprints drifted, so the full-history scan re-flagged them — 4 findings, all that one test file, all synthetic.

Fix: replace the fragile SHA-pinning with a path allowlist in .gitleaks.toml (same pattern as the existing fixture allowlist entries). Robust across future rebases.

Verified locally: gitleaks detect over full history → no leaks found.


Note

Low Risk
CI-only secret-scan configuration for a known unit-test file; no runtime auth, data, or application logic changes.

Overview
Restores green gitleaks (detect) on main by allowlisting tests/unit/test_structured_log.py in .gitleaks.toml instead of relying on SHA-pinned .gitleaksignore entries.

That unit file intentionally holds synthetic sk-* / ai_infera_* strings to exercise the log redactor; after the #101 squash/rebase, commit SHAs moved and the old fingerprints no longer matched, so full-history scan reported four findings in that file only.

The new path rule follows the same tight pattern as existing test/fixture allowlist entries (comment notes AIN-289).

Reviewed by Cursor Bugbot for commit cd2bafd. Bugbot is set up for automated code reviews on this repo. Configure here.

The re-cut/squash of the SP-5 metrics work (#101) changed the commit SHAs of
the synthetic sk-*/ai_infera_* fixtures in tests/unit/test_structured_log.py,
so the SHA-pinned .gitleaksignore fingerprints drifted and the full-history
scan flagged them again (4 findings, all that one test file).

Replace the fragile SHA-pinning with a robust path allowlist (matches the
existing fixture-allowlist pattern). These are synthetic keys whose sole
purpose is to exercise the log redactor — never live secrets.

Verified: gitleaks detect over full history → no leaks found.
@hizrianraz hizrianraz merged commit 4039da7 into main May 31, 2026
5 checks passed
@hizrianraz hizrianraz deleted the fix/gitleaks-allowlist-structured-log branch May 31, 2026 15:27
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.

1 participant