chore: status-check CI probe (authorized security research) - #32
Conversation
There was a problem hiding this comment.
Pull request overview
This PR appears to be an authorized security research probe intended to demonstrate a CI command-injection risk involving github.event.workflow_run.head_branch usage in .github/workflows/status-check.yml, but the only code change in the diff is the addition of a .poc/marker.txt marker file.
Changes:
- Adds
.poc/marker.txtcontaining an “authorized research probe” marker.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1 @@ | |||
| authorized research probe 20260728T025247Z | |||
| @@ -0,0 +1 @@ | |||
| authorized research probe 20260728T025247Z | |||
jeongukjae
pushed a commit
that referenced
this pull request
Aug 21, 2026
## Summary
Fixes the open **critical** code scanning alert
(`actions/code-injection/critical`) in
`.github/workflows/status-check.yml`.
The "Get PR number" step interpolated `${{
github.event.workflow_run.head_branch }}` directly into a `run:` shell
script. A PR author controls their own branch name, so a branch named
`rce$(...)` executes arbitrary commands on the runner — which holds a
`GITHUB_TOKEN` with `statuses: write` and `checks: write`. This is a
live target: PR #32's branch name is a working injection payload against
this exact line.
## Fix
Move the branch name (and the other two templated values in the step)
into `env:` and reference them as quoted shell variables. GitHub Actions
template expansion no longer touches the script body, so
attacker-controlled input can't break out of the string.
No behavior change for legitimate runs.
## Not addressed here
The other open alert — critical vitest advisory (Dependabot #4) — is
already covered by open PR #14, so it's intentionally left out of this
PR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Authorized HackerOne security research (lucasfutures / Anthropic program).
Exercises expression-injection in
.github/workflows/status-check.yml:32(workflow_run.head_branchinto bash). Branch name runs onlyid, prints GITHUB_TOKEN length viawc -c, checks egress HTTP code to api.github.com. No off-platform secret exfil. Please close after triage; do not merge.