ci: pin GitHub Actions to commit SHAs - #25
Conversation
Hardening per standard §5.3: pin all mutable-tag third-party actions in the build workflows (ci.yml, release.yml) to commit SHAs, with the version in a trailing comment for Renovate. Also unifies the stray setup-gradle@v4 in release.yml up to v6.2.0 (§5.2), matching the v6 used elsewhere in the repo. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
📝 WalkthroughWalkthroughGitHub Actions in the CI and release workflows are updated from floating major-version tags to specific commit SHAs, with version comments retained. Workflow steps, inputs, commands, and job logic remain unchanged. ChangesWorkflow action pinning
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8).github/workflows/ci.ymlTraceback (most recent call last): .github/workflows/release.ymlTraceback (most recent call last): Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
113-113: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winConsider replacing the release action with
gh release.This would remove a third-party action from a privileged release job and reduce supply-chain surface. Preserve the current tag, title, notes, and
generate_release_notesbehavior if adopting it.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release.yml at line 113, Replace the third-party softprops/action-gh-release step in the release workflow with GitHub CLI gh release commands, preserving the existing tag, title, notes, and generate_release_notes behavior. Ensure the release job authenticates gh with the existing GitHub token and continues attaching any currently configured assets.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/release.yml:
- Line 113: Replace the third-party softprops/action-gh-release step in the
release workflow with GitHub CLI gh release commands, preserving the existing
tag, title, notes, and generate_release_notes behavior. Ensure the release job
authenticates gh with the existing GitHub token and continues attaching any
currently configured assets.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: fdd0c1b8-2a53-4172-94b7-316dd0ceb81a
📒 Files selected for processing (2)
.github/workflows/ci.yml.github/workflows/release.yml
What
SHA-pins all mutable-tag third-party GitHub Actions in the build workflows to commit SHAs (supply-chain hardening per standard §5.3). The immutable version is preserved in a trailing
# vX.Y.Zcomment so Renovate can still track and bump them.Pinned refs
.github/workflows/ci.ymlactions/checkoutv7 →3d3c42e(v7.0.1)actions/setup-javav5 →03ad4de(v5.6.0)gradle/actions/setup-gradlev6 →3f131e8(v6.2.0)actions/cachev6 →55cc834(v6.1.0)codecov/codecov-actionv7 →fb8b358(v7.0.0).github/workflows/release.ymlactions/checkoutv7 →3d3c42e(v7.0.1)actions/setup-javav5 →03ad4de(v5.6.0)gradle/actions/setup-gradlev4 →3f131e8(v6.2.0) — the stray@v4is unified up to v6.2.0 per §5.2, matching the v6 used inci.yml/docs.ymlactions/attest-build-provenancev4 →0f67c3f(v4.1.1)softprops/action-gh-releasev3 →3d0d988(v3.0.2)Out of scope
docs.ymlwas already fully SHA-pinned (checkout/setup-java/setup-gradle plus the Pages actions) — no changes needed.codeql.yml/scorecard.ymlalready pinned — left as-is.uses: ./…refs touched.Verification
grep -rnE 'uses: [a-zA-Z].*@v[0-9]' .github/workflows/returns no remaining third-party mutable refs.Summary by CodeRabbit