-
Notifications
You must be signed in to change notification settings - Fork 1
chore(deps): bump actions/setup-node from 6 to 7 #377
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 More details about thisThe GitHub Actions workflow step uses Exploit scenario:
The same attack happened in real-world incidents like the Trivy Action compromise, where attackers leveraged mutable tags to inject malicious code into CI/CD pipelines affecting thousands of projects. Using a mutable reference like To resolve this comment: ✨ Commit fix suggestion
Alternatively, if you need to stay aligned with a specific upstream release name for maintenance, add a comment next to the pinned SHA noting the corresponding tag, such as 💬 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:
The step
actions/setup-node@v7uses a mutable tag that could be redirected to malicious code if the action owner's account is compromised, exposing your secrets to attackers.More details about this
The
actions/setup-node@v7step uses a mutable major version tag (v7) instead of pinning to a specific commit. This means that if the maintainers of theactions/setup-noderepository push a new commit to thev7tag, your workflow will silently run the updated action without any notice or approval.Attack scenario:
actions/setup-nodeGITHUB_TOKENorGITHUB_SECRETSavailable in your workflow to an attacker-controlled servermain), the compromised action executes with full access to your secretsGITHUB_TOKENand can impersonate your repository, push code to your branches, or modify releasesThis is the same attack vector that compromised
trivy-actionandkics-github-actionin real-world incidents. The mutable tag allows attackers to inject backdoored code that runs automatically in every workflow execution.To resolve this comment:
✨ Commit fix suggestion
actions/setup-node@v7with a full 40-character commit SHA for the exact action version you want to keep using, for exampleuses: actions/setup-node@<full-40-char-sha>.with:values likenode-version: '16'andcache: 'pnpm'.actions/setup-noderelease you intend to use, and make sure it is the commit behind the currentv7tag rather than a short SHA or tag name. Pinning to a full commit SHA prevents the action owner from silently changing what code runs later.Alternatively, if you need easier version maintenance, pin to the full commit SHA and add a comment next to it with the human-friendly version, such as
uses: actions/setup-node@<full-40-char-sha> # v7.💬 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.