Skip to content

Pass release version to shell via env, not interpolation (SEC-11868) - #155

Merged
leonard-tesnov merged 2 commits into
masterfrom
sec/11868-workflow-shell-injection
Sep 29, 2026
Merged

leonard-tesnov merged 2 commits into
masterfrom
sec/11868-workflow-shell-injection

Conversation

@leonard-tesnov

Copy link
Copy Markdown
Contributor

The create_release job interpolated
${{ needs.check_version.outputs.version }} directly into two run: bodies. Actions substitutes that textually before the shell runs, so the value is parsed as shell source rather than read as data. The version is read from setup.py.

Bind the value through step-level env: so the shell reads it as data, and reject a version that is not plain semver at the point it is read.

Ref: SEC-11868

The create_release job interpolated
${{ needs.check_version.outputs.version }} directly into two `run:`
bodies. Actions substitutes that textually before the shell runs, so the
value is parsed as shell source rather than read as data. The version is
read from setup.py.

Bind the value through step-level `env:` so the shell reads it as data,
and reject a version that is not plain semver at the point it is read.

Ref: SEC-11868

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@jobare jobare left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@leonard-tesnov
leonard-tesnov merged commit e646dbe into master Sep 29, 2026
11 checks passed
@leonard-tesnov
leonard-tesnov deleted the sec/11868-workflow-shell-injection branch September 29, 2026 06:45
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