Repository navigation
ci: lock workflow actions through an actions.lock lockfile - #4
Open
dylanmtaylor wants to merge 2 commits into
Open
dylanmtaylor wants to merge 2 commits into
dylanmtaylor wants to merge 2 commits into
Conversation
Mutable action tags are a supply-chain risk: a moved tag runs different code without a diff. Every workflow action is now pinned through .github/workflows/actions.lock, and CI verifies the lockfile so an out-of-sync or tampered one fails instead of running.
Fails the build when .github/workflows/actions.lock stops matching the workflows, or when a locked pin no longer verifies upstream, so a stale or tampered lockfile cannot go unnoticed between dependency updates.
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.
Applies the lockfile setup from https://hugovk.dev/blog/2026/lock-github-actions/.
gh actions-lockreplaces the hand-maintained commit SHAs with tag refs such asactions/checkout@v7.0.1, and generates.github/workflows/actions.lockrecording the commit each ref resolves to. A moved tag now shows up as a lockfile diff instead of silently running new code.githubactions:S7637off for.github/workflows/**, because that rule wants an inline commit SHA per action and does not readactions.lock. Sonar confirmed the limitation and tracks lockfile support: https://community.sonarsource.com/t/githubactions-s7637-false-positives-for-actions-pinned-through-native-actions-lock/190814. Verified on ci: lock workflow actions through an actions.lock lockfile craft-common-actions#220, where the quality gate went green with this exactresourceKey.After editing a workflow, re-run
gh actions-lockand commit the lockfile with it.