Skip to content

fix: pin 5 unpinned action(s),extract 5 unsafe expression(s) to env vars#46518

Open
dagecko wants to merge 1 commit intomicrosoft:mainfrom
dagecko:runner-guard/fix-ci-security
Open

fix: pin 5 unpinned action(s),extract 5 unsafe expression(s) to env vars#46518
dagecko wants to merge 1 commit intomicrosoft:mainfrom
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/automatic-issue-deduplication.yml Pinned 1 third-party action(s) to commit SHA
RGS-007 high .github/workflows/manual-batch-issue-deduplication.yml Pinned 1 third-party action(s) to commit SHA
RGS-007 high .github/workflows/msstore-submissions.yml Pinned 3 third-party action(s) to commit SHA
RGS-002 high .github/workflows/msstore-submissions.yml Extracted 5 unsafe expression(s) to env vars

Advisory: additional findings (manual review recommended)

| Rule | Severity | File | Description |
| RGS-004 | high | .github/workflows/spelling2.yml | Comment-Triggered Workflow Without Author Authorization Check |
| RGS-005 | medium | .github/workflows/spelling2.yml | Excessive Permissions on Untrusted Trigger |
| RGS-005 | medium | .github/workflows/spelling2.yml | Excessive Permissions on Untrusted Trigger |
| RGS-005 | medium | .github/workflows/spelling2.yml | Excessive Permissions on Untrusted Trigger |
| RGS-005 | medium | .github/workflows/spelling2.yml | Excessive Permissions on Untrusted Trigger |

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/automatic-issue-deduplication.yml  |  2 +-
 .../workflows/manual-batch-issue-deduplication.yml   |  2 +-
 .github/workflows/msstore-submissions.yml            | 20 ++++++++++++++------
 3 files changed, 16 insertions(+), 8 deletions(-)
@dagecko dagecko requested a review from a team as a code owner March 26, 2026 06:37

- name: Configure Store Credentials
run: |-
msstore reconfigure -cfp cert.pfx -c ${{ secrets.AZURE_CLIENT_ID }} -t ${{ secrets.AZURE_TENANT_ID }} -s ${{ secrets.SELLER_ID }}
Copy link
Member

Choose a reason for hiding this comment

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

this change is, frankly, BS. The threat model here is that, what, a repository admin compromises their own repository using the highly convoluted mechanism of changing their repo Secrets, rather than just pushing whatever they want anywhere at any time?

@dagecko
Copy link
Author

dagecko commented Mar 26, 2026

@microsoft-github-policy-service agree [company="Vigilant"]

@microsoft-github-policy-service
Copy link
Contributor

@dagecko the command you issued was incorrect. Please try again.

Examples are:

@microsoft-github-policy-service agree

and

@microsoft-github-policy-service agree company="your company"

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