ci: add Dependabot and pin all Actions to commit SHAs#12
Merged
Conversation
…mmit SHAs A mutable tag like @v4 can be re-pointed; anyone who compromises the action repo can silently change what runs in this CI. Pinning to the resolved commit SHA freezes the exact code, and Dependabot's github-actions ecosystem keeps the pins (and the # vN comments) updated via PRs. The swift ecosystem does the same for SwiftPM dependencies.
.github/styles/ is generated by 'vale sync' in CI and stays untracked, per the Vale setup in PR #10.
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.
What
.github/dependabot.yml: weekly update PRs for both the swift package ecosystem and github-actions.uses:inci.ymlandpages.ymlto the resolved commit SHA of its current tag, keeping the version as a trailing# vNcomment.Why
Week 7 (Security & the Software Supply Chain), task 1. A mutable tag like
@v4can be re-pointed after a compromise of the action's repo (the 2024 tj-actions/changed-files incident); a commit SHA can't. Dependabot understands the# vNcomment convention and keeps both the SHA and comment current, so the pins don't rot.How
SHAs resolved via the GitHub API from each action's current tag:
11d5960a0057852ba26af69b56afc609d6db9016Test
Workflows are YAML-valid; the CI matrix on this PR itself exercises the pinned checkout/cache actions.