Skip to content

ci: prevent script injection in Publish SDK Artifacts workflow - #586

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785345849-fix-workflow-script-injection
Open

ci: prevent script injection in Publish SDK Artifacts workflow#586
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1785345849-fix-workflow-script-injection

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Remediates the Wiz finding "Workflow should not use untrusted input in a privileged context" on the split-input job of Publish SDK Artifacts (.github/workflows/manual-sdk-release-artifacts.yml). ${{ inputs.sdk_target }} was expanded into the run: body before the shell ran, so the quotes around it offered no protection — a dispatch value like a"; curl … # would execute on the runner, in a workflow whose downstream jobs hold contents: write, attestations: write, and id-token: write.

         id: split-string
+        env:
+          SDK_TARGET: ${{ inputs.sdk_target }}
         run: |
-          INPUT="${{ inputs.sdk_target }}"
+          INPUT="$SDK_TARGET"

The value is now interpolated by the runner into the step environment rather than into the script text; the IFS=':' read -ra split and both GITHUB_OUTPUT writes are unchanged. actionlint is clean on the file.

Link to Devin session: https://app.devin.ai/sessions/8c95fd39350c4c5aa16a2dcd1974e09e


Note

Low Risk
Narrow CI hardening with no runtime or product behavior changes; reduces privilege-escalation risk on manual dispatch.

Overview
Fixes a script-injection risk in the Publish SDK Artifacts workflow’s split-input job. ${{ inputs.sdk_target }} is no longer expanded inside the run: script; it is passed through a step env variable (SDK_TARGET) and read as INPUT="$SDK_TARGET".

The : split and GITHUB_OUTPUT writes are unchanged. This matters because downstream jobs use elevated permissions (contents: write, attestations, id-token).

Reviewed by Cursor Bugbot for commit b033485. Bugbot is set up for automated code reviews on this repo. Configure here.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot requested review from a team July 29, 2026 17:24
@osm6495
osm6495 marked this pull request as ready for review July 29, 2026 17:25
@osm6495
osm6495 requested a review from a team July 29, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant