ci: pin checkov-action to a commit SHA#49
Open
dmchaledev wants to merge 1 commit into
Open
Conversation
Every other action in .github/workflows/ is pinned to a full commit SHA with a version comment; bridgecrewio/checkov-action@v12 was the sole floating-tag exception, despite running with security-events: write on every PR and push to main. A mutable tag can be repointed to a different commit at any time. Resolved v12's current commit via the action repo's tags page and verified against its raw .patch header before pinning.
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.
What
Pins
bridgecrewio/checkov-actionin.github/workflows/checkov.ymlto a full commit SHA instead of the floating@v12major-version tag.Why this matters
Every other
uses:step in this repo's three workflow files (ci.yml,checkov.yml,trivy-iac.yml) is already pinned to a 40-character commit SHA with a version comment —actions/checkout,hashicorp/setup-terraform,actions/cache,terraform-linters/setup-tflint, andgithub/codeql-action/upload-sarifall follow this pattern.trivy-iac.ymleven installs the Trivy CLI binary with checksum verification specifically to match "the SHA-pinned actions in this repo."bridgecrewio/checkov-action@v12was the one exception — a mutable tag that GitHub allows the upstream maintainer to repoint to a different commit at any time — despite the job running withsecurity-events: writeand executing third-party action code against this repo's checked-out source on every PR and every push tomain. That's exactly the kind of step the repo's existing pinning convention is meant to cover.Change
The SHA is the commit currently tagged
v12inbridgecrewio/checkov-action(verified against the tag's raw.patchheader, whoseFrom <sha>line matches). No functional change — same major version, same inputs.Test plan
python3 -c "import yaml; yaml.safe_load(...)")checkovCI job runs successfully on this PR with no behavior change (same Checkov version resolves under the hood)Generated by Claude Code