Conversation
Shxnque
requested review from
justaugustus and
spencerschrock
and removed request for
a team
September 26, 2026 16:12
Author
|
CI is green now — the earlier Recap of the change for review: |
… input
The untrusted-context pattern flags head_commit/commits[*].author.{name,email}
as attacker-controllable script-injection inputs, but not the committer
equivalents. A commit's committer name and email are attacker-settable git
metadata in exactly the same way as the author fields, and are surfaced on
push (head_commit, commits[*]) and via workflow_run.head_commit — so they carry
the same Script Injection risk in a run: step.
Adds head_commit.committer.{email,name} and commits.*.committer.{email,name} to
untrustedContextPattern, mirroring the existing author handling, plus table
tests (4 positive + a committer.date negative to keep the match precise).
Addresses a remaining gap in ossf#3915 (raised by @pnacht); complementary to ossf#5226,
which covers the fork/repo/workflow_run fields and does not touch committer.
Signed-off-by: Shxnque <shinque03@gmail.com>
Shxnque
force-pushed
the
feat/dangerous-workflow-committer-untrusted
branch
from
October 2, 2026 15:18
b240124 to
26d4094
Compare
This branch has not been deployed
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.
What
Adds
head_commit.committer.{email,name}andcommits.*.committer.{email,name}tountrustedContextPatterninchecks/raw/dangerous_workflow.go, mirroring the existingauthor.*handling.Why
The Dangerous-Workflow check already treats
head_commit/commits[*].author.{name,email}as attacker-controllable Script-Injection inputs, but not the committer equivalents. A commit's committer name and email are attacker-settable git metadata in exactly the same way as the author fields (git commit --amend --author/GIT_COMMITTER_*), and are surfaced onpush(head_commit,commits[*]) and viaworkflow_run.head_commit. Interpolating them into arun:step is the same injection class the check exists to catch.This is the
committergap raised by @pnacht in #3915:It is complementary to #5226 (which adds the
fork.forkee.*,pull_request.head.repo.{description,homepage}andworkflow_run.*fields) — there is no overlap; that PR does not touchcommitter.Scope discipline
Minimal, parity-only change. It follows the issue's own scoping guidance (prioritise fields an unprivileged external actor controls) and deliberately does not add write-access-only fields (e.g.
milestone.title,project_card.note).Tests
Added to
TestUntrustedContextVariables:head_commit.committer.{name,email}→ detected (true)commits[2].committer.{name,email}→ detected (true)head_commit.committer.date→ not matched (false) — keeps the pattern precise (a date is not injectable free-text).Validated as a pass/reject matrix against
containsUntrustedContextPattern(all pass; existingauthor.*and trusted-field cases unchanged).gofmtclean. Full suite via CI.Refs #3915.