Repository navigation
Pass label/branch-name values to shell via env, not template interpolation - #96
Closed
VibratingKoala wants to merge 1 commit into
Closed
VibratingKoala wants to merge 1 commit into
VibratingKoala wants to merge 1 commit into
Conversation
…ation
start-pull-request.yml interpolated ${{ env.LABELS }}, ${{ env.ASSIGNEES }},
${{ env.NEW_BRANCH_NAME }} and ${{ github.event.issue.number }} directly into
run: script text. GitHub Actions substitutes these as text before the shell
runs, so a value containing $() or backticks would execute on the runner in a
job holding contents/issues/pull-requests write + id-token write. Not
currently exploitable (every label/branch-name producer today is a hardcoded
literal or numeric), but the safety was external to this file rather than
built into it.
Switched every run: step to reference the already-exported $GITHUB_ENV shell
variables directly instead, matching the pattern the file already used at
:47-49/:66-68.
Fixes #95
VibratingKoala
force-pushed
the
i95-fix-label-shell-injection
branch
from
August 24, 2026 08:36
e061aee to
0c2d652
Compare
Contributor
Author
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.
Fixes #95.
start-pull-request.ymlinterpolated${{ env.LABELS }},${{ env.ASSIGNEES }},${{ env.NEW_BRANCH_NAME }}and${{ github.event.issue.number }}directly intorun:script text. GitHub Actions substitutes${{ }}as text before the shell runs, so a value containing$()or backticks would execute on the runner — in a job holdingcontents/issues/pull-requests: write+id-token: write.Not currently exploitable (every label/branch-name producer today is a hardcoded literal or numeric — see the issue for the scan panel's reasoning), but the safety was external to this file rather than built into it.
Change
Every
run:step now references the already-exported$GITHUB_ENVshell variables directly, matching the pattern already used elsewhere in the file (:47-49,:66-68). No${{ env.* }}interpolation remains in anyrun:step.${{ github.event.repository.default_branch }}on--baseis left as template interpolation — that's repo config, not user-influenceable data, so it's outside the injection class this issue describes.Testing
Workflow-only change, no app code touched —
app/doesn't exist onmainyet (POC is still on the unmergedi68-handbook-pocbranch), so thepnpm test/pnpm buildgates don't apply here.