View on GitHub

Agentic Workflows — Field Guide

A field guide to using GitHub Workflows and Agentic Workflows

← Previous: pull_request_target Table of Contents Next: The “Apparent vs. Actual” Trigger Surface →

The “Approve and run workflows” Gate

GitHub gates workflow execution from forks behind a manual approval click (“Approve and run workflows”), governed by repo/org Actions → General → Fork pull request workflows from outside collaborators setting12:

Setting Behavior
Require approval for first-time contributors who are new to GitHub Approval needed only for accounts < 2 months old
Require approval for first-time contributors (default) Approval needed until the contributor has had a merged PR or commit
Require approval for all outside collaborators Always require approval for non-org-members
Require approval for all external contributors (orgs only) Always require approval for anyone without write access

The gate applies to pull_request and pull_request_target. It does not apply to:

The approval gate is dangerous, not protective

The “Approve and run workflows” button looks like a security feature. Treat it as the opposite. Three structural problems make it actively harmful:

  1. Alert fatigue. Every first-time fork contributor produces a button click that lists every workflow the PR touches. A repo with 15 workflows shows 15 entries. After the maintainer has clicked through dozens of legitimate first-time PRs, the click becomes muscle memory. The hundredth click is no more deliberate than the first.
  2. The UI does not show what is being approved. There is no per-workflow toggle, no preview of the diff, no preview of the events the workflows are subscribed to, no list of secrets that will be exposed, no indication that some workflows use pull_request_target (full secrets, write token) versus plain pull_request (read-only, no secrets). The maintainer is approving an opaque blob of YAML files they have likely never read.
  3. A single click runs all of them. The only way approve only the safe ones is through the Actions UI, but even there it’s difficult to see the potential ramifications for approvals. Approving the CI workflow you actually wanted to run also approves the auto-merge workflow, the slash-command listener, and any pull_request_target workflow in the repo. Worse yet, you could also be approving workflows included in the pull request’s changes.

Concrete failure modes when a maintainer clicks the button because they “think they’re supposed to”:

Design rule: assume the approval gate will always be clicked. The only safe workflows are ones that produce the same outcome whether the actor is a trusted maintainer or an anonymous fork contributor. Concretely:


← Previous: pull_request_target Table of Contents Next: The “Apparent vs. Actual” Trigger Surface →