Repository navigation
GATOR-3555: pin gitleaks (v8.30.1 + sha256), SHA-pin checkout, persist-credentials false; add self-test - #10
Merged
Merged
Conversation
…ut, persist-credentials false, drop SARIF upload; add self-test
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.
GATOR-3555: harden
reusable-secrets-check.yml(pinned gitleaks, SHA-pinned checkout, no persisted token)Why: a supply-chain review (Holdfast GATOR-3553/3555) found that this workflow:
releases/latestwith no checksum, resolved through an API call that carried the job token;actions/checkout@v4andupload-sarif@v4by mutable tags;.git/config, where the downloaded binary could read it.A replaced upstream release could have exfiltrated a caller's private source, or silently passed the scan.
What changes in
reusable-secrets-check.yml:releases/latestgives today, so callers run the same binary. It's verified against a hardcoded sha256 (551f6fc8…70eb); three sources agree: the release checksums file, an independent download, and GitHub's asset digest.sha256sum --check --strictruns before anything is extracted or added to PATH, underset -euo pipefail.$RUNNER_TEMP: no API call, no token, nosudo. curl uses--proto '=https' --proto-redir '=https'.actions/checkoutis pinned to3d3c42e5… # v7.0.1, withpersist-credentials: false. The job is capped atpermissions: contents: read.security-events: write, so it failed on every run ("Resource not accessible by integration"), hidden bycontinue-on-error. Removing it changes no job result and saves about 44s.gitleaks detectflags are byte-identical, so findings and exit codes are unchanged for callers.New
self-test-secrets-check.ymlruns on PRs and pushes touching either file:lint: fails on areleases/latestlookup, anyuses:not pinned to a 40-hex SHA, checkout withoutpersist-credentials: false, a missing hardcodedGITLEAKS_SHA256, or any token/secrets reference. It's red against the current main (7 violations) and green here.fail-closed: runs the real install script with a wrong sha256 and asserts it fails AFTER downloading, installs nothing and adds nothing to PATH. Then it runs the real script and assertsgitleaks version= 8.30.1.smoke: calls the reusable on this repo.Callers: 15 repos call this
@main. There are no new inputs or secrets, the trigger is unchanged and the flags are identical, so callers see no behaviour change beyond the hardening. tooth pins a commit and will bump to the new tag. bayou pins an older commit.Merge order: please merge this before Dependabot #6 (checkout 4 → 7), which touches the same file, and let #6 rebase.
Before merging: a throwaway tooth PR runs this branch's head SHA. It must be green clean, and red with a freshly generated fake key. Then v1.0.1 is tagged on this PR's merge commit.
Reviews:
🤖 Generated with Claude Code
https://claude.ai/code/session_01ApgRQf2Vm31kdXJgRarULJ