-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(deps): bump actions/checkout from 6 to 7 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -27,7 +27,7 @@ jobs: | |||||
|
|
||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v6 | ||||||
| uses: actions/checkout@v7 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pin actions/checkout to a specific commit SHA instead of using a version tag. The static analysis tool (zizmor) flags this checkout step as using an unpinned action reference. Pinning an action to a full-length commit SHA is the most reliable way to use an immutable version of an action, and pinning to a specific SHA mitigates the risk of a bad actor changing a tag to point to malicious code. 📌 Fix: Pin to commit SHA with version commentReplace the checkout reference with a pinned commit SHA: - name: Checkout code
- uses: actions/checkout@v7
+ uses: actions/checkout@de0fac2e4500dabe0009e6a0797e74b61c1c2481 # v7.0.0To find the correct SHA for v7.0.0, visit the actions/checkout releases page and click the commit hash link. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.25.2)[warning] 29-30: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) [error] 30-30: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||
|
|
||||||
| - name: Setup PHP | ||||||
| uses: shivammathur/setup-php@v2 | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pin actions/checkout to a specific commit SHA instead of using a version tag.
The static analysis tool (zizmor) flags both checkout steps as using unpinned action references. GitHub recommends pinning dependency versions to a specific commit SHA to prevent malicious code added to a new or updated branch or tag from being automatically used. In March 2025, the tj-actions/changed-files action used in tens of thousands of repositories was compromised; malicious code extracted CI runner secrets, and version tags were moved to point at the malicious commit; every workflow using a floating tag reference executed the malicious code automatically, while repositories pinned to specific commit hashes were unaffected.
📌 Fix: Pin to commit SHA with version comment
Replace each checkout reference with a pinned commit SHA. For example:
To find the correct SHA for v7.0.0, visit the actions/checkout releases page and click the commit hash link.
Alternatively, use the GitHub CLI:
gh api repos/actions/checkout/commits/v7.0.0 --jq '.sha'Also applies to: 38-38
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 17-17: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Source: Linters/SAST tools