Uh oh!
There was an error while loading. Please reload this page.
security: fix CodeQL code-injection alerts in CI workflows - #40
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: xaoscience <69734795+xaoscience@users.noreply.github.com>
xaoscience
left a comment
There was a problem hiding this comment.
Perhaps leave --no-verify out of it, as it is guarded and so we don't need to manually sign - but I will test!
Co-authored-by: xaoscience <69734795+xaoscience@users.noreply.github.com>
Removed |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Several GitHub Actions workflows were interpolating
${{ }}expressions directly insiderun:shell scripts, enabling code injection via user-controlled values (PR title, labels, workflow inputs).Changes
validate-pr.yml— code injection (alerts #41, #42)Moved all
${{ github.event.pull_request.* }}and step-output expressions out of therun:shell script into anenv:block; switched fromechotoprintf '%s\n'for safe output.central-loader.yml— code injection (alerts #17–#28)inputs.templateswas the one remaining expression interpolated directly in therun:script (TEMPLATES="${{ inputs.templates }}"). Moved it into the existingenv:block alongside the other inputs that were already safely handled there; removed the now-redundant shell assignment.Original prompt
This section details on the original issue you should resolve
<issue_title>🔒 Security Review: CodeQL Alerts Require Manual Fixes</issue_title>
<issue_description>Security Alerts Requiring Manual Review
The following CodeQL alerts cannot be automatically fixed and require manual intervention:
Alert #50: actions/untrusted-checkout/high
.github/workflows/automerge.yml:266Alert #47: actions/untrusted-checkout/high
.github/workflows/automerge.yml:235Alert #42: actions/code-injection/medium
.github/workflows/validate-pr.yml:75Alert #41: actions/code-injection/medium
.github/workflows/validate-pr.yml:74Alert #28: actions/code-injection/medium
.github/workflows/central-loader.yml:145Alert #27: actions/code-injection/medium
.github/workflows/central-loader.yml:144Alert #26: actions/code-injection/medium
.github/workflows/central-loader.yml:142Alert #25: actions/code-injection/medium
.github/workflows/central-loader.yml:141Alert #24: actions/code-injection/medium
.github/workflows/central-loader.yml:140Alert #23: actions/code-injection/medium
.github/workflows/central-loader.yml:139Alert #22: actions/code-injection/medium
.github/workflows/central-loader.yml:138Alert #21: actions/code-injection/medium
.github/workflows/central-loader.yml:137Alert #20: actions/code-injection/medium
.github/workflows/central-loader.yml:136Alert #19: actions/code-injection/medium
.github/workflows/central-loader.yml:143Alert #18: actions/code-injection/medium
.github/workflows/central-loader.yml:143Alert #17: actions/code-injection/medium
.github/workflows/central-loader.yml:113Alert #16: actions/code-injection/medium
.github/workflows/central-loader.yml:106Alert #15: actions/code-injection/medium
.github/workflows/central-loader.yml:102💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.