Skip to content

ci: pin checkov-action to a commit SHA#49

Open
dmchaledev wants to merge 1 commit into
mainfrom
claude/blissful-pascal-jjbr9n
Open

ci: pin checkov-action to a commit SHA#49
dmchaledev wants to merge 1 commit into
mainfrom
claude/blissful-pascal-jjbr9n

Conversation

@dmchaledev

Copy link
Copy Markdown
Contributor

What

Pins bridgecrewio/checkov-action in .github/workflows/checkov.yml to a full commit SHA instead of the floating @v12 major-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, and github/codeql-action/upload-sarif all follow this pattern. trivy-iac.yml even installs the Trivy CLI binary with checksum verification specifically to match "the SHA-pinned actions in this repo."

bridgecrewio/checkov-action@v12 was 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 with security-events: write and executing third-party action code against this repo's checked-out source on every PR and every push to main. That's exactly the kind of step the repo's existing pinning convention is meant to cover.

Change

-        uses: bridgecrewio/checkov-action@v12
+        uses: bridgecrewio/checkov-action@a7683e7b72a04503521247973281ec8142e1ac1f # v12

The SHA is the commit currently tagged v12 in bridgecrewio/checkov-action (verified against the tag's raw .patch header, whose From <sha> line matches). No functional change — same major version, same inputs.

Test plan

  • YAML parses (python3 -c "import yaml; yaml.safe_load(...)")
  • checkov CI job runs successfully on this PR with no behavior change (same Checkov version resolves under the hood)

Generated by Claude Code

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants