Skip to main content
Execute qualquer Skill no Manus
com um clique

workflow-run-deploy-gate-fork-pr-ref-name-escalation

Estrelas2
Forks0
Atualizado8 de julho de 2026 às 12:17

Security trap when authoring/reviewing a GitHub Actions deploy (or any privileged job) triggered by `on: workflow_run` and gated on the triggering run's BRANCH NAME. Use when: (1) a `workflow_run` job gates on `github.event.workflow_run.head_branch == 'main'` (or conclusion == 'success') to decide a privileged deploy / publish / OIDC-cloud action, (2) you are wiring CI-gated auto-deploy-on-merge ("deploy after the CI workflow passes on main"), (3) reviewing a workflow that mints cloud creds (WIF/OIDC, `id-token: write`) off a `workflow_run` event. The trap: `head_branch` is the UNQUALIFIED ref name, and a FORK's default branch is also named `main`. A fork-PR's CI run (event `pull_request`) can complete `success` with `head_branch=='main'`; the upstream `workflow_run` deploy then runs in the PRIVILEGED upstream context and ships the fork's `head_sha` to prod. The "fork CI can't read secrets/OIDC" intuition is a trap — that's the CI job; the deploy is a SEPARATE privileged job. Fix: also gate on the triggering

Instalação

Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.

SKILL.md
readonly