chore(security): enforce full-history secret scanning - #806
Open
beruro wants to merge 2 commits into
Open
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.
Problem
ORG2 does not currently run a repository-wide Gitleaks gate. A Gitleaks
v8.24.3scan of the latestdevelopancestry reports 22 historical findings, but review of every producing line shows they are limited to two intentionally public Supabase client keys, fourteen dedicated test/snapshot fixtures, and six ordinary identifiers or lockfile values misclassified by generic rules. Without an exact reviewed baseline, enabling the scanner would make every pull request fail and encourage broad rule suppression.A separate Draft branch for #770 contains a real hardcoded ZenMux credential. That finding is not part of
develop, is not allowlisted here, and must remain blocked until the credential is revoked/rotated and the branch is repaired.Solution
.gitleaksignorecontaining exactly the 22 revieweddevelopfingerprints, each bound to its original commit, file, rule, and line.Gitleaks secret scanjob to pull-request CI using official Gitleaksv8.24.3.HEADancestry, covering the target branch and proposed PR commits without letting unrelated stale branch histories block every PR.The invariant is that reviewed non-secret history is accepted while every new fingerprint, including the #770 credential, still fails CI.
Potential risks
HEADancestry rather than every remote ref. A secret only on an unrelated branch is detected when that branch is proposed; exposed credentials must still be revoked immediately.Verification
Validated locally after merging current
develop(017fb9afa) into head3ce1b111bwithout conflicts:v8.24.3on the merged branch with--log-opts=HEAD --redact— PASS, 3,096 commits / approximately 95.82 MB, no leaks..github/workflows/ci.yml— PASS..github/workflows/ci.yml— PASS.git diff --cached --checkbefore the merge commit — PASS.Published GitHub CI on head
3ce1b111bis fully green: Gitleaks secret scan, Frontend typecheck/lint/test, Rust clippy, and AI attribution all passed.Security follow-up
The ZenMux credential on Draft PR #770 must be revoked/rotated outside this PR. Its branch should replace the hardcoded value with an environment- or key-vault-owned lookup, remove the credential from published history, and remain blocked until Gitleaks passes.