Skip to content

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

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

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

Conversation

@dagecko
Copy link

@dagecko dagecko commented Mar 26, 2026

Fix: CI/CD Security Vulnerabilities in GitHub Actions

Hi! Runner Guard, an open-source
CI/CD security scanner by Vigilant Cyber Security,
identified security vulnerabilities in this repository's GitHub Actions workflows.

This PR applies automated fixes where possible and reports additional findings
for your review.

Fixes applied (in this PR)

Rule Severity File Description
RGS-007 high .github/workflows/build.yml Pinned 1 third-party action(s) to commit SHA
RGS-007 high .github/workflows/devcontainer_ci.yml Pinned 1 third-party action(s) to commit SHA
RGS-002 high .github/workflows/directory_writer.yml Extracted 1 unsafe expression(s) to env vars
RGS-007 high .github/workflows/project_euler.yml Pinned 2 third-party action(s) to commit SHA
RGS-007 high .github/workflows/ruff.yml Pinned 1 third-party action(s) to commit SHA
RGS-007 high .github/workflows/sphinx.yml Pinned 1 third-party action(s) to commit SHA

Advisory: additional findings (manual review recommended)

No additional findings beyond the fixes applied above.

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.

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

Changes:
 .github/workflows/build.yml            | 2 +-
 .github/workflows/devcontainer_ci.yml  | 2 +-
 .github/workflows/directory_writer.yml | 4 +++-
 .github/workflows/project_euler.yml    | 4 ++--
 .github/workflows/ruff.yml             | 2 +-
 .github/workflows/sphinx.yml           | 2 +-
 6 files changed, 9 insertions(+), 7 deletions(-)
@dagecko dagecko requested a review from cclauss as a code owner March 26, 2026 05:13
@algorithms-keeper
Copy link

Closing this pull request as invalid

@dagecko, this pull request is being closed as none of the checkboxes have been marked. It is important that you go through the checklist and mark the ones relevant to this pull request. Please read the Contributing guidelines.

If you're facing any problem on how to mark a checkbox, please read the following instructions:

  • Read a point one at a time and think if it is relevant to the pull request or not.
  • If it is, then mark it by putting a x between the square bracket like so: [x]

NOTE: Only [x] is supported so if you have put any other letter or symbol between the brackets, that will be marked as invalid. If that is the case then please open a new pull request with the appropriate changes.

@algorithms-keeper algorithms-keeper bot removed the request for review from cclauss March 26, 2026 05:14
@algorithms-keeper algorithms-keeper bot added the awaiting reviews This PR is ready to be reviewed label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed invalid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant