Repository navigation
fix(ci): verify checksums of the tool binaries the reusables download - #403
Conversation
There was a problem hiding this comment.
I checked all seven pins against upstream: gitleaks 8.21.2, hadolint 2.12.0, cosign 2.4.1, osv-scanner 2.0.2 and trufflehog 3.99.7 match the release checksum files, and opengrep 1.9.0 matches a hash of the downloaded asset. The opengrep-rules commit resolves. Dropping the trufflehog install.sh pipe from main is a real improvement.
Nit: the zizmor alerts on sast-external-issues/action.yml lines 59 and 62 come from the new ${{ inputs.*-sha256 }} expansions inside run:. Pass them through the step's env: (OPENGREP_SHA256: ${{ inputs.opengrep-sha256 }}, same for gitleaks) and use "$OPENGREP_SHA256" in the script. That clears both alerts. The *-version inputs on the same step have the same pattern already and could move to env: in the same change. Low risk either way, since only the calling workflow sets these inputs.
There was a problem hiding this comment.
f422d06 fixes my earlier nit: the version and sha256 inputs in sast-external-issues/action.yml now go through env:, and nothing is expanded into the script. I re-hashed the opengrep, gitleaks, hadolint, cosign and trufflehog assets and they still match the pins. Nothing new to flag.
Closes #400
sha256sum -cagainst a pinned SHA256 before use. Hashes were checked against the upstream checksum files (cosign, gitleaks, osv-scanner, hadolint); opengrep publishes none, so its hash is from the release asset itself.install.shfrommain.refs/heads/main.sast-external-issues: newopengrep-sha256andgitleaks-sha256inputs next to the version inputs.Bumping a version now requires updating its hash; a stale hash fails the job. Renovate regex managers for these pins are not included.