Partially Revert "fix(action): pin nested action references to full c… - #990
Partially Revert "fix(action): pin nested action references to full c…#990wu21-web wants to merge 3 commits into
Conversation
…ommit SHAs (alibaba#836)" This reverts commit 7e52a4f.
|
🔍 OpenCodeReview found 1 issue(s) in this PR.
|
| - name: Verify sources contain no unapproved non-English text | ||
| run: go run scripts/verify-english-only.go |
There was a problem hiding this comment.
Removal of action pin verification reduces CI security posture.
The verify-action-pins.sh script was an automated guardrail that ensured GitHub Actions are pinned to full commit SHAs, protecting against tag-hijacking attacks. Removing this step means:
- If any third-party actions are added in the future, there will be no automated check to enforce SHA pinning.
- First-party actions (
actions/*) likeactions/checkout@v7andactions/setup-go@v7currently used are acceptable with tag-based pinning per best practices, but this removal eliminates the enforcement mechanism for the entire repository.
Consider either:
- Keeping this verification step to maintain the security guardrail.
- Replacing it with an alternative tool (e.g., Dependabot, StepSecurity, or a GitHub Action like
step-security/action-pinned-versions). - At minimum, documenting why this check is being removed and what compensating controls exist.
There was a problem hiding this comment.
Removal is the purpose of the PR. Action SHAs are not pinned now. After all actions have been pinned, maintainers toggle the switch.
|
Thanks for digging into this — agree the shell script is clunky, and leaning on a platform switch instead of hand-rolled regex is the right instinct. A few things I'd want sorted before this goes in though. The setting doesn't look like it's actually enforcing. Every workflow in this repo still uses floating tags ( The switch protects this repo; the script protected consumers. That was the whole point of #816. The nested Dangling doc reference. We also lose the Smaller stuff: a repo setting is invisible in the tree and can be flipped off silently, so worth noting as a required invariant in If the goal is mainly "stop maintaining fragile bash," swapping the script for |
|
@lizhengfeng101 Thank you for reviewing this. Here are answers to your questions:
|
|
P.S I will update the docs accordingly. |
…ommit SHAs (#836)"
Description
This partially reverts commit 7e52a4f.
Why: Maintainers can simply enable "Require actions to be pinned to a full-length commit SHA" under Actions/General in the repo settings.
This is more secure because Github Runners reject to start those jobs when SHAs are not pinned. While a script check fails the job after
ci.ymlhas already done checks (verify license headers)A manually written
verify-actions-pins.shmight cause problems, and it is not as neat as a single switch.What's not reverted:
action.ymlexamples/github_actionType of Change
How Has This Been Tested?
make testpasses locallyChecklist
go fmt,go vet)Related Issues
None