Repository navigation
ci: add a dedicated gitleaks secret scan - #17
Open
nstranquist wants to merge 2 commits into
Open
nstranquist wants to merge 2 commits into
nstranquist wants to merge 2 commits into
Conversation
Keep secret scanning in its own workflow so every pull request is scanned, pin gitleaks 8.30.1, and limit the token to contents and pull-request reads. Co-authored-by: Nico S <nstranquist@gmail.com>
Windows runners check the workflow out with CRLF, so the contract test normalizes line endings before it compares the workflow text. Co-authored-by: Nico S <nstranquist@gmail.com>
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.
Outcome
Pull requests and pushes to
mainrun a dedicated gitleaks scan. The scan has no path filter, so a docs-only change is still scanned. A manualworkflow_dispatchrun scans full history. The workflow token can read repository contents and pull requests only.Safety review
This change does not touch capture, state, or hooks. The scan fails the job when gitleaks reports a leak. There is no secret-string allowlist and no pre-commit hook.
Verification
Local, before this pull request:
gitleaks8.30.1detectover 162 commits: no leaks.gitleaks8.30.1dir: no leaks..gitleaks.tomlor.gitleaksignore: the history and worktree had no generated or vendor false positives.go test ./...go test -race -count=3 ./...(thecmd/wipandinternal/storepackages needed-timeout 45mon this host; both passed)go vet ./...actionlint1.7.12The workflow matches the approved pack from nstranquist/crypto-scan#30 (
cursor/gitleaks-ci-dacd), withpersist-credentials: falseon checkout so the job does not leave the token in the git config.Hosted, head
a4ffed039df05a59b1999d3a7ccd8d336da2d8bd:gitleakscheck conclusion: success. Run https://github.com/nstranquist/wip-commit/actions/runs/41557739218detectona269d079daeb728b7caa37c0cc6ebd4f52908e5e^..a4ffed039df05a59b1999d3a7ccd8d336da2d8bd, reported2 commits scannedandno leaks found, and skipped comments. The log has no pulls API 403.gitleaks-full-historywas skipped on the pull request, as required.Do not merge.