Skip to content

fix(ci): scope the OIDC scrub to the automation step - #181

Merged
pleb merged 1 commit into
mainfrom
fix/scope-oidc-scrub-to-step
Aug 30, 2026
Merged

fix(ci): scope the OIDC scrub to the automation step#181
pleb merged 1 commit into
mainfrom
fix/scope-oidc-scrub-to-step

Conversation

@pleb

@pleb pleb commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

What

scrub-oidc-env previously did two things: it wrote empty ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN values to GITHUB_ENV, and it deleted the same variables from the automation process before importing the runtime. This drops the GITHUB_ENV step and keeps only the in-process deletion.

Why

The GITHUB_ENV write outlives the step that made it and cannot be undone within the job. Any later step that legitimately needs OIDC would find the variables blanked for expression evaluation, setup-kipp's own registry exchange included.

It bought nothing in exchange. When the job grants id-token: write, the runner injects fresh values into every step process, so the GITHUB_ENV write never actually stopped a later step from minting a token. The protection that matters is the in-process deletion, which is what keeps a model-directed tool call inside the automation from reaching the OIDC endpoint, and that is unchanged (including the guard that refuses to run if either variable survives).

Net effect: the control is now scoped to the step that asked for it, instead of leaking across the job.

Changes

  • Removed the Scrub OIDC request variables step.
  • Rewrote the scrub-oidc-env input description to state the guarantee and its step scope.
  • Expanded the in-script comment to record why in-process deletion is used rather than a GITHUB_ENV write.

The GITHUB_ENV write outlived the step and could not be undone, so it
disarmed any later step that legitimately needed OIDC, including
setup-kipp's own registry exchange. It never protected a later step
either: the runner re-injects fresh values into every step process, so
the variables were always repopulated downstream regardless.

Deleting the variables from the automation process is sufficient and
keeps the control scoped to the step that asked for it.
@github-actions

Copy link
Copy Markdown
Contributor

🛡️ SHA Pinned Actions Report

✅ All 31 file(s) passed — actions are allowed and pinned as required.

@pleb
pleb enabled auto-merge August 30, 2026 23:53
@pleb
pleb merged commit 5af5403 into main Aug 30, 2026
1 check passed
@pleb
pleb deleted the fix/scope-oidc-scrub-to-step branch August 30, 2026 23:55
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