Add lint rule to enforce SHA pinning for third-party GitHub Actions#12796
Merged
petebacondarwin merged 4 commits intomainfrom Mar 11, 2026
Merged
Add lint rule to enforce SHA pinning for third-party GitHub Actions#12796petebacondarwin merged 4 commits intomainfrom
petebacondarwin merged 4 commits intomainfrom
Conversation
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
14bfc58 to
23c7bf5
Compare
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
b42e795 to
ac4c6b7
Compare
dario-piotrowicz
approved these changes
Mar 10, 2026
799372e to
7732ff3
Compare
Add a validation script that checks all workflow and composite action files to ensure third-party GitHub Actions are pinned to full commit SHAs rather than mutable tags or branch references. First-party actions/* are exempt. - New script: tools/github-workflow-helpers/validate-action-pinning.ts - New tests: tools/github-workflow-helpers/__tests__/validate-action-pinning.test.ts - Wired into pnpm check via new check:workflows script in root package.json
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
7732ff3 to
c473c06
Compare
dario-piotrowicz
approved these changes
Mar 11, 2026
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.
N/A - follow-up to #12793, no issue.
Add a validation script that runs as part of
pnpm checkto enforce that all third-party GitHub Actions are pinned to full commit SHAs rather than mutable tags or branch references. This prevents future regressions after the pinning done in #12793.What's included:
tools/github-workflow-helpers/validate-action-pinning.ts— Scans all.github/workflows/*.ymland.github/actions/*/action.ymlfiles foruses:directives. Third-party actions must reference a 40-char commit SHA. First-partyactions/*and local./actions are exempt.tools/github-workflow-helpers/__tests__/validate-action-pinning.test.ts— 12 test cases covering pinned SHAs, tags, semver, branches, first-party actions, local actions, composite actions, multi-file errors, and line number reporting.package.json— Newcheck:workflowsscript wired into thepnpm checkpipeline betweencheck:deploymentsandlint-turbo.mjs.