Stop AI coding agents from shipping production changes you didn't authorize.
When Cursor / Codex / Copilot / Claude Code opens a PR that touches deploy/, .github/workflows/, or any path you mark sensitive, Deploy Gate blocks the merge until a named human signs an approval and produces a signed receipt that proves who authorized what against which policy.
- ⛔ Fails closed by default for production environments
- ✍️ Ed25519-signed receipts bound to the exact action
- ⚡ <200ms enforcement in the GitHub status check
- 🆓 MIT-licensed action
"GitHub asks 'did a reviewer approve?' Deploy Gate asks 'did a named human authorize this exact AI action?' and gives you signed proof."
Add to your workflow:
# .github/workflows/deploy-gate.yml name: Deploy Gate on: pull_request: types: [opened, synchronize, reopened, ready_for_review] branches: [main] jobs: gate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: permission-protocol/deploy-gate@v2 with: pp-api-key: ${{ secrets.PP_API_KEY }}
Free for unlimited signers and unlimited public repos. Paid tiers add policy controls and audit retention. See pricing.
- Get API key at https://app.permissionprotocol.com
- Add secret:
gh secret set PP_API_KEY -b "pp_live_..."
- Open a PR and watch deploy-sensitive changes block until approval
Full install guide: INSTALL.md
On push and workflow_dispatch the action runs in deploy mode: it finds the PR that merged the commit, verifies that PR's approval, and redeems it once. Put it before your Vercel, Netlify, Railway or Fly.io deploy step and turn off the provider's own Git deploys. See INSTALL.md.
on: push: branches: [main] jobs: deploy: runs-on: ubuntu-latest environment: production permissions: contents: read pull-requests: read steps: - uses: actions/checkout@v4 - uses: permission-protocol/deploy-gate@v2 with: pp-api-key: ${{ secrets.PP_API_KEY }} - run: npx vercel deploy --prod --yes --token "$VERCEL_TOKEN" env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
AI agents are moving from "suggest text" to "take actions": committing code, modifying workflows, and deploying to production. GitHub controls like branch protection, environments, and required reviewers gate humans, not agents.
Deploy Gate is the missing primitive: a deterministic gate keyed to the exact action the agent is taking, with a signed authority receipt as the audit artifact.
When audit time comes, you do not want to hand over a mutable PR comment thread. You want a chain of signed receipts that can be independently verified.
v2 defaults to fail-closed when the Permission Protocol API is unavailable. A security tool that fails open in a network blip is not a security tool.
| Environment | fail-mode |
Result on API unavailable |
|---|---|---|
Production (production, prod, live by default) |
closed or open (forced to closed) |
❌ Fails closed. No deploy. |
Non-production (staging, preview, etc.) |
closed (default) |
❌ Fails closed. No deploy. |
| Non-production | open (opt-in) |
✅ Pass with ::warning:: log |
Inputs:
-
wait-for-approval: defaults totrue. In deploy mode, wait up to 30 minutes for a human approval or renewal and resume automatically. PR mode still returns missing approvals immediately so the PR can show its signing link. Setfalseto return missing or expired approvals immediately in deploy mode. -
Transient verification failures (network errors, HTTP 500/502/503/504, rate limits and temporary GitHub policy-read failures) recover through non-redeeming reads every 15 seconds. PR mode and deploy mode with approval waiting disabled have a five-minute recovery budget. Denials, auth/scope failures, revoked or invalid signatures and unavailable tenant keys stop immediately. A final redeeming request is sent only once. A lost response can recover through a read of the exact still-valid consumed attempt, with current policy and signer checks; an unresolved outcome requires inspection. Production never fails open.
-
Durable stopped-workflow recovery: a separate coordinator can restart a confirmed read-only approval timeout through the normal gate. These changes are proposed and unreleased; existing
v2installs do not yet include them. -
fail-mode:closed(default) oropen— only honored in non-production environments. -
production-environments: comma-separated environment names treated as production, defaultproduction,prod,live. -
fail-open-timeout: API timeout in seconds. It controls timeout duration only, not failure policy.
- BREAKING: defaults to fail-closed. To restore v1 behavior, set
fail-mode: openand removeproduction-environments.
Block -> Approve -> Verify -> Merge.
PR opened
│
▼
Deploy Gate checks for valid receipt
│
├── Receipt exists ----------> Merge allowed
│
└── No receipt --------------> Blocked
│
▼
PR comment with approval link
│
▼
Human approves + signs
│
▼
Re-run CI -> Merge allowed
- Blocks risky PRs with a required status check
- Posts a PR comment with a direct approval link
- Unblocks the PR instantly after approval
- Produces a tamper-evident approval receipt
- Stops draft PRs without reporting approval; marking ready reruns receipt verification (unreleased)
| Option | Human authorization on AI action | Cryptographic proof | Default under outage |
|---|---|---|---|
| GitHub required reviewer only | Partial | No | Often workflow-dependent |
| PR comments + screenshots | No | No | Open to mutation |
| Deploy Gate | Yes | Yes (Ed25519 receipt) | Fails closed for production |
The next Action release rejects approvals carried forward from an earlier PR head. The read-only verification result is checked before any redemption request, so a rejected receipt is not consumed. Each new PR head needs a fresh approval for its exact SHA. There is no carry-forward opt-in. Final redemption and reconciliation responses are also checked before reporting approval.
This client check relies on the verifier reporting carry-forward accurately; the server must also enforce receipt scope against the exact current head. These changes are unreleased until included in a new Action release.
- Trust + compliance: https://permissionprotocol.com/trust
- Support: https://permissionprotocol.com/contact
- Live demo: https://permissionprotocol.com/r/demo
- Reference verifier (CLI): https://github.com/permission-protocol/pp-cli
MIT - see LICENSE
