Skip to content

ci: pin GitHub Actions to commit SHAs - #28

Merged
davidberenstein1957 merged 2 commits into
mainfrom
security/pin-actions
Oct 9, 2026
Merged

davidberenstein1957 merged 2 commits into
mainfrom
security/pin-actions

Conversation

@davidberenstein1957

Copy link
Copy Markdown
Member

Summary

Pins every third-party GitHub Action in this repository to a full commit SHA and keeps the release tag as a trailing comment, for example uses: actions/checkout@<sha> # v4.2.2. This resolves the Semgrep github-actions-mutable-action-tag findings that Bastion reports for this repository.

Whoever controls an action can move a tag such as @v4 to different code, which is how the tj-actions/changed-files compromise (CVE-2025-30066) reached other repositories' workflows. A commit SHA cannot be moved.

Each SHA is the commit its existing tag points to today, so action versions do not change unless noted below.

Testing

Generated with pinact 5.0.0 (pinact run over .github/workflows and .github/actions). A grep confirms that no uses: line for a remote action is left without a 40-character SHA. The workflows this PR touches run in CI here.

Commits

  • b65aef7 ci: pin GitHub Actions to commit SHAs

Replace mutable tag references with the commit SHA each tag points to
today, keeping the tag as a trailing comment. Resolves the Semgrep
github-actions-mutable-action-tag findings reported by Bastion.

@gtregoat gtregoat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@davidberenstein1957
davidberenstein1957 merged commit 830500a into main Oct 9, 2026
2 checks passed
@davidberenstein1957
davidberenstein1957 deleted the security/pin-actions branch October 9, 2026 03:20
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