You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ci): harden release-proposal-dispatch against untrusted main_start_ref (#2045)
# What does this PR do?
Harden `release-proposal-dispatch` against untrusted `main_start_ref`
Block three privilege-escalation paths for an authorised release
operator who selects an attacker-controlled `main_start_ref`:
- Reject `refs/pull/*` and require the resolved commit be reachable from
`origin/main` or the matching `origin/hotfix/<crate>/N.x.x` branch.
- Reject `pre-release-hook` / `pre-release-replacements` anywhere in the
checked-out `Cargo.toml` / `release.toml`, since cargo-release would
execute them with the job's OIDC mint capability.
- Move `inputs.main_start_ref` from inline template expansion into an
`env:` mapping on the ephemeral-branch step to close a shell-injection
sink.
Also extract the hotfix branch regex into `HOTFIX_REF_PATTERN` at
workflow level so all three call sites stay in sync.
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments