Skip to content

ci: pin GitHub Actions to full commit SHAs (S7637)#4995

Merged
arturcic merged 5 commits into
GitTools:mainfrom
arturcic:fix/sonar-s7637-pin-actions
Jun 30, 2026
Merged

ci: pin GitHub Actions to full commit SHAs (S7637)#4995
arturcic merged 5 commits into
GitTools:mainfrom
arturcic:fix/sonar-s7637-pin-actions

Conversation

@arturcic

Copy link
Copy Markdown
Member

Pins every action reference in .github/workflows/ to a full commit SHA with a trailing # <version> comment (the Dependabot convention, keeping versions human-readable), resolving the githubactions:S7637 security hotspots ("Use full commit SHA hash for this dependency").

Details

  • 66 references across 20 workflow files pinned to SHA.
  • Each SHA is the current tip of the previously-referenced tag/branch, so behavior is unchanged.
  • Path-style actions (gittools/cicd/*, github/codeql-action/*) pinned to their shared repo SHA with subpaths preserved.
  • actionlint clean (only pre-existing docs.yml shellcheck warnings remain, untouched here).

🤖 Generated with Claude Code

arturcic and others added 5 commits June 30, 2026 11:25
Pin every third-party and first-party action reference to its full commit
SHA with a trailing version comment (Dependabot convention), resolving the
githubactions:S7637 security hotspots. 66 references across 20 workflow
files; behavior unchanged (each SHA is the tip of the previously-used tag).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Quote $GITHUB_OUTPUT (SC2086) and replace the constant '[ ${{ ... }} ]'
test with a direct GitHub expression (SC2078) so the reporter actually
branches on the event type instead of always returning github-pr-review.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pin the 15 action references inside .github/actions/*/action.yml to full
commit SHAs with version comments, matching the workflow files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an Actionlint workflow (reviewdog/action-actionlint, SHA-pinned) that
runs on changes to .github/workflows/** and .github/actions/**, failing on
any finding so workflow/composite-action issues are caught in CI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Re-resolve every pinned action to its latest release and record the full
version in the comment. Functional bumps: actions/cache v5->v6.1.0 (composite
actions, now unified with the workflows), chabad360/htmlproofer master->v2
(branch->release tag), actions/attest-build-provenance v4.1.0->v4.1.1. All
other SHAs already pointed at the latest release tip; comments updated from
major tags (e.g. v7) to exact versions (e.g. v7.0.0).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@arturcic arturcic merged commit 784a443 into GitTools:main Jun 30, 2026
124 checks passed
@arturcic arturcic deleted the fix/sonar-s7637-pin-actions branch June 30, 2026 10:02
@mergify

mergify Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Thank you @arturcic for your contribution!

@arturcic arturcic added this to the 6.x milestone Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant