-
Notifications
You must be signed in to change notification settings - Fork 0
chore(deps): bump actions/setup-node from 6 to 7 #380
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 workflow step Here's how an attacker could exploit this:
This mirrors real supply-chain attacks like the Trivy and KICS GitHub Action compromises, where legitimate actions were weaponized through tag manipulation. To prevent this, replace the mutable tag with a full 40-character commit SHA so your workflow always runs the exact same code. To resolve this comment: ✨ Commit fix suggestion
Alternatively, if you need easier version updates, pin to the commit SHA that corresponds to the current 💬 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 uses mutable version tag
v7which can be repointed by the action owner to inject malicious code into your workflow. Pin to a full commit SHA instead.More details about this
The step
uses: actions/setup-node@v7references the action using a mutable version tag (v7) instead of pinning to a specific commit SHA. Version tags can be moved or repointed by the action owner after release, allowing them to silently inject malicious code into your workflow.Here's how an attacker could exploit this:
actions/setup-noderepository (via credential theft, internal access, or social engineering).v7tag to a malicious commit they've created that contains backdoored Node.js setup logic.actions/setup-node@v7resolves to the attacker's malicious commit instead of the legitimate one.GITHUB_TOKEN), environment variables, and build artifacts. The attacker can steal credentials, modify your package contents, or compromise downstream users.This same attack vector was used in the real-world compromises of
trivy-actionandkics-github-action, where attackers gained the ability to exfiltrate credentials and manipulate build outputs.To resolve this comment:
✨ Commit fix suggestion
Replace the mutable GitHub Action reference with a full 40-character commit SHA instead of the
v7tag.Change
uses: actions/setup-node@v7touses: actions/setup-node@<full-commit-sha>.Resolve the SHA from the exact action version you intend to trust.
For example, open the
actions/setup-noderelease or tag page, find the commit behindv7, and copy the full SHA rather than a branch or tag name.Keep the existing
with:block unchanged after pinning the action.The step should look like
- uses: actions/setup-node@8ade135a41bc03ea155e62e844d188df1ea18608followed by the currentnode-versionandcachesettings. Pinning to a commit SHA prevents the action owner from silently moving the version reference 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.