Skip to content

fix: pin 32 unpinned action(s),extract 1 unsafe expression(s) to env vars#3808

Closed
dagecko wants to merge 1 commit intonvm-sh:masterfrom
dagecko:runner-guard/fix-ci-security
Closed

fix: pin 32 unpinned action(s),extract 1 unsafe expression(s) to env vars#3808
dagecko wants to merge 1 commit intonvm-sh:masterfrom
dagecko:runner-guard/fix-ci-security

Conversation

@dagecko
Copy link
Copy Markdown

@dagecko dagecko commented Mar 26, 2026

Security: Harden GitHub Actions workflows

Hey, we found some CI/CD security issues in this repo's workflows using Runner Guard, our open-source CI/CD security scanner at Vigilant. These are the same vulnerability classes being actively exploited right now in the tj-actions, Trivy, LiteLLM supply chain attack chain. We scanned the top 50K repos on GitHub and over 20,000 have this same problem. We're trying to get fixes out to as many maintainers as possible before more repos get hit.

This PR fixes what we could automatically, and flags anything else that needs a manual look. There's a real person behind this PR, we're actively checking back on comments so if you have any questions just drop them here and we'll respond.

Fixes applied (in this PR)

Rule Severity File Description
RGS-007 high .github/workflows/latest-npm.yml Pinned 4 third-party action(s) to commit SHA
RGS-007 high .github/workflows/lint.yml Pinned 7 third-party action(s) to commit SHA
RGS-007 high .github/workflows/nodejs-org.yml Pinned 1 third-party action(s) to commit SHA
RGS-002 high .github/workflows/nvm-install-test.yml Extracted 1 unsafe expression(s) to env vars
RGS-007 high .github/workflows/rebase.yml Pinned 1 third-party action(s) to commit SHA
RGS-007 high .github/workflows/release.yml Pinned 1 third-party action(s) to commit SHA
RGS-007 high .github/workflows/require-allow-edits.yml Pinned 1 third-party action(s) to commit SHA
RGS-007 high .github/workflows/shellcheck.yml Pinned 2 third-party action(s) to commit SHA
RGS-007 high .github/workflows/tests-fast.yml Pinned 2 third-party action(s) to commit SHA
RGS-007 high .github/workflows/tests-installation-iojs.yml Pinned 2 third-party action(s) to commit SHA
RGS-007 high .github/workflows/tests-installation-node.yml Pinned 2 third-party action(s) to commit SHA
RGS-007 high .github/workflows/tests-xenial.yml Pinned 2 third-party action(s) to commit SHA
RGS-007 high .github/workflows/tests.yml Pinned 2 third-party action(s) to commit SHA
RGS-007 high .github/workflows/toc.yml Pinned 2 third-party action(s) to commit SHA
RGS-007 high .github/workflows/windows-npm.yml Pinned 3 third-party action(s) to commit SHA

Advisory: additional findings (manual review recommended)

| Rule | Severity | File | Description |
| RGS-018 | high | .github/workflows/nvm-install-test.yml | Suspicious Payload Execution Pattern |
| RGS-018 | high | .github/workflows/windows-npm.yml | Suspicious Payload Execution Pattern |
| RGS-006 | high | .github/workflows/windows-npm.yml | Curl-Pipe-Bash Remote Code Execution |
| RGS-018 | high | .github/workflows/windows-npm.yml | Suspicious Payload Execution Pattern |
| RGS-018 | high | .github/workflows/windows-npm.yml | Suspicious Payload Execution Pattern |
| RGS-006 | high | .github/workflows/windows-npm.yml | Curl-Pipe-Bash Remote Code Execution |
| RGS-018 | high | .github/workflows/windows-npm.yml | Suspicious Payload Execution Pattern |
| RGS-006 | high | .github/workflows/windows-npm.yml | Curl-Pipe-Bash Remote Code Execution |

Why this matters

GitHub Actions workflows that use untrusted input in run: blocks, expose
secrets inline, or use unpinned third-party actions are vulnerable to
code injection, credential theft, and supply chain attacks. These are the same
vulnerability classes exploited in the tj-actions/changed-files incident
and subsequent supply chain attacks, which compromised CI secrets across
thousands of repositories.

How to verify

Review the diff — each change is mechanical and preserves workflow behavior:

  • Expression extraction (RGS-002/008/014): Moves ${{ }} expressions from
    run: blocks into env: mappings, preventing shell injection
  • SHA pinning (RGS-007): Pins third-party actions to immutable commit SHAs
    (original version tag preserved as comment)
  • Debug env removal (RGS-015): Removes ACTIONS_RUNNER_DEBUG/ACTIONS_STEP_DEBUG
    which leak secrets in workflow logs

Run brew install Vigilant-LLC/tap/runner-guard && runner-guard scan . or install from the
repo to verify.


Found by Runner Guard | Built by Vigilant Cyber Security | Learn more

If this PR is not welcome, just close it -- we won't send another.

…vars

Automated security fixes applied by Runner Guard (https://github.com/Vigilant-LLC/runner-guard).

Changes:
 .github/workflows/latest-npm.yml              |  8 ++++----
 .github/workflows/lint.yml                    | 14 +++++++-------
 .github/workflows/nodejs-org.yml              |  2 +-
 .github/workflows/nvm-install-test.yml        |  6 ++++--
 .github/workflows/rebase.yml                  |  2 +-
 .github/workflows/release.yml                 |  2 +-
 .github/workflows/require-allow-edits.yml     |  2 +-
 .github/workflows/shellcheck.yml              |  4 ++--
 .github/workflows/tests-fast.yml              |  4 ++--
 .github/workflows/tests-installation-iojs.yml |  4 ++--
 .github/workflows/tests-installation-node.yml |  4 ++--
 .github/workflows/tests-xenial.yml            |  4 ++--
 .github/workflows/tests.yml                   |  4 ++--
 .github/workflows/toc.yml                     |  4 ++--
 .github/workflows/windows-npm.yml             |  6 +++---
 15 files changed, 36 insertions(+), 34 deletions(-)
Copy link
Copy Markdown
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unsolicited and undesired PR. Pinning actions is completely useless unless the action has dangerous permissions, and pinning my personal actions (that only i control) is also useless and removes the very intentional feature of free-flowing backwards-compatible updates.

@ljharb ljharb closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants