ci: prevent script injection in workflow run steps - #136
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
ci: prevent script injection in workflow run steps#136devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
osm6495
approved these changes
Jul 29, 2026
osm6495
marked this pull request as ready for review
July 29, 2026 17:25
Skill eval results
Only suites whose source actually changed since their last recorded score were re-run. Soft-failing while we stabilise the baseline. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
diffjob of the Skill Evals workflow (.github/workflows/eval-skills.yml).${{ inputs.run_all }}was expanded straight into therun:body of the "Compute changed suites" step, so a dispatch value containing shell metacharacters would execute on a runner in a workflow withcontents: writeand access toANTHROPIC_API_KEY/OPENAI_API_KEY. It now goes through a step-levelenv:block:github.ref_namein the "Commit refreshed scores and badges" push (git push origin "HEAD:$BRANCH_NAME") andgithub.event.inputs.versioninrelease.yml(echo "version=$INPUT_VERSION" >> $GITHUB_OUTPUT), which is the more directly exploitable of the two since it writes toGITHUB_OUTPUT.Testing
actionlintreports no new issues on either file (the pre-existingsoftprops/action-gh-release@v1runner warning is unchanged). Behavior is identical — the same values are compared/echoed, just read from the environment instead of being pasted into the script text.Notes
Link to Devin session: https://app.devin.ai/sessions/8c95fd39350c4c5aa16a2dcd1974e09e
Note
Low Risk
CI workflow-only changes with equivalent logic; no application, auth, or data-path changes.
Overview
Hardens GitHub Actions run scripts so untrusted workflow context is not expanded directly into shell, addressing Wiz “untrusted input in a privileged context” findings.
In Skill Evals (
eval-skills.yml),inputs.run_allis passed viaRUN_ALLenv and compared as"$RUN_ALL"instead of embedding${{ inputs.run_all }}in the script. The scheduled/dispatch commit and push step readsgithub.ref_namefromBRANCH_NAMEforgit pushinstead of interpolating it into the command line.In Release Skills (
release.yml), manual dispatch version selection usesEVENT_NAMEandINPUT_VERSIONfrom env when writing toGITHUB_OUTPUT, instead of inlininggithub.event_nameandgithub.event.inputs.versionin the script (the dispatch path is the more sensitive case because it feeds step outputs).Runtime behavior is unchanged; only how values reach the shell changes.
Reviewed by Cursor Bugbot for commit 59c97ca. Bugbot is set up for automated code reviews on this repo. Configure here.