-
Notifications
You must be signed in to change notification settings - Fork 0
chore(deps): bump actions/setup-node from 6 to 7 #379
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 version tag More details about thisThe GitHub Actions step references Exploit scenario:
This mirrors real attacks like the trivy-action and kics-github-action compromises, where attackers exploited mutable tag references to inject malicious code into CI/CD pipelines. 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:
The
actions/setup-node@v7reference uses a mutable tag instead of a pinned commit SHA, allowing the action owner to silently update what code runs in your workflow.More details about this
The
actions/setup-node@v7step uses a mutable version tag (v7) instead of a pinned commit SHA. Sincev7is a floating tag, the action owner can silently update what code runs under this tag without your knowledge.Attack scenario: An attacker who compromises the
actions/setup-noderepository could push a malicious update to thev7tag. The next time this workflow runs, your job would execute the compromised version ofsetup-node, potentially allowing the attacker to:GITHUB_TOKEN(which has permissions to push to your repository)This mirrors real-world supply-chain attacks like the trivy-action and kics-github-action compromises, where attackers gained access through mutable action references and used it to push malicious code to users' repositories.
To resolve this comment:
✨ Commit fix suggestion
Replace the mutable action reference
actions/setup-node@v7with a full 40-character commit SHA for the exactv7release you intend to trust, for exampleuses: actions/setup-node@<full-40-char-sha>.Keep the existing
withblock unchanged so only the action reference changes.Get the SHA from the
actions/setup-noderelease or tag you want to use, then pin that exact commit in the workflow file. Pinning to a commit prevents the action owner from movingv7to different code later.💬 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.