-
Notifications
You must be signed in to change notification settings - Fork 0
chore(deps): bump actions/setup-node from 6 to 7 #351
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 |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ jobs: | |
| - uses: pnpm/action-setup@v5 | ||
| with: | ||
| version: 7.6.0 | ||
| - uses: actions/setup-node@v6 | ||
| - uses: actions/setup-node@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. Semgrep identified an issue in your code: GitHub Actions step uses mutable tag More details about thisThe GitHub Actions workflow uses Here's how an attacker could exploit this:
This attack pattern mirrors real compromises like the To resolve this comment: ✨ Commit fix suggestion
💬 Ignore this findingReply with Semgrep commands to ignore this finding.
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag. Need help? Review go/semgrep-playbook or Reach out in #security-vulnerabilities on Slack. You can view more details about this finding in the Semgrep AppSec Platform. |
||
| with: | ||
| node-version: '16' | ||
| cache: 'pnpm' | ||
|
|
||
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.
Semgrep identified an issue in your code:
GitHub Actions step
actions/setup-node@v7uses a mutable version tag that can be silently repointed by the action owner to malicious code, enabling supply-chain attacks.More details about this
The GitHub Actions step
actions/setup-node@v7uses a mutable version tag (v7) instead of a pinned commit SHA. This means the action owner can silently update what code runs in your workflow without any change to this file.Here's a concrete attack scenario:
actions/setup-noderepository and gains control over thev7tagv7tag to their compromised commit@v7now resolves to the attacker's commit instead of the legitimate versionGITHUB_TOKEN), allowing the attacker to steal credentials, push code, or modify your releasesThis is exactly how the
trivy-actionandkics-github-actioncompromises worked—attackers repointed version tags to run their own code.To resolve this comment:
✨ Commit fix suggestion
actions/setup-node@v7with a full 40-character commit SHA for the exactactions/setup-noderelease you want to keep using, for exampleuses: actions/setup-node@<full-40-character-sha>.with:settings unchanged so only the action version pin changes.actions/setup-noderepository release or tag that matches your intended version, and avoid short SHAs or version tags such as@v7. Pinning to a full commit SHA prevents the referenced action code from changing unexpectedly.💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasonsAlternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.
Need help? Review go/semgrep-playbook or Reach out in #security-vulnerabilities on Slack.
You can view more details about this finding in the Semgrep AppSec Platform.