Skip to content

fix(release): use env var to prevent shell injection in Save Published Packages step#382

Open
realtrung wants to merge 1 commit into
cloudflare:mainfrom
realtrung:fix/shell-injection-release-workflow
Open

fix(release): use env var to prevent shell injection in Save Published Packages step#382
realtrung wants to merge 1 commit into
cloudflare:mainfrom
realtrung:fix/shell-injection-release-workflow

Conversation

@realtrung
Copy link
Copy Markdown

`${{steps.create-release-pr.outputs.publishedPackages}}` was interpolated directly into the shell command. A package name with a single quote breaks out of the quoted string and executes arbitrary code on the runner, with access to `CLOUDFLARE_API_TOKEN` and `GITHUB_TOKEN`.

Fix: assign the expression to an env var so the shell receives it as a value, not as part of the command string.

Ref: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable

…d Packages step

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant