Skip to main content
تشغيل أي مهارة في Manus
بنقرة واحدة

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

النجوم٢
التفرعات٠
آخر تحديث٨ يوليو ٢٠٢٦ في ١٢:١٧

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

التثبيت

التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.

SKILL.md
readonly