Document safe-outputs GitHub App permission narrowing#15297
Conversation
…rements Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
|
||
| Each safe output type requires specific GitHub permissions. When using GitHub App tokens (`app:`), permissions are **automatically narrowed per-job** to match only what's needed. The table below shows the minimum permissions required for each safe output type: | ||
|
|
||
| | Safe Output Type | `contents` | `issues` | `pull-requests` | `discussions` | `actions` | `security-events` | `organization-projects` | Notes | |
There was a problem hiding this comment.
Done in commit e6d3075. Removed the detailed permissions table while keeping the GitHub App token documentation explaining per-job narrowing and auto-revocation.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
This PR documents the previously undocumented security model for GitHub App tokens in safe outputs, specifically explaining per-job token narrowing and auto-revocation. It also clarifies the fallback-as-issue field's permission implications for create-pull-request.
Changes:
- Documented GitHub App per-job token minting, automatic permission narrowing, and auto-revocation behavior
- Explained
fallback-as-issuefield and its impact on permission requirements (defaulting totruerequiresissues: write, setting tofalseonly requirescontents: write+pull-requests: write) - Generalized token documentation to cover all GitHub App configurations, not just MCP server tokens
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/src/content/docs/reference/tokens.mdx | Added explanation of per-job permission narrowing for GitHub App tokens and cross-reference to safe-outputs documentation |
| docs/src/content/docs/reference/safe-outputs.md | Added comprehensive "How GitHub App Tokens Work" section explaining per-job minting, permission narrowing, auto-revocation, and safe shared configuration; updated create-pull-request documentation to explain fallback-as-issue field and permission implications |
| docs/src/content/docs/reference/frontmatter-full.md | Updated comments for safe-outputs and app configuration sections to document automatic per-job narrowing and token auto-revocation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Safe outputs with GitHub Apps automatically narrow permissions per-job and revoke tokens at job end, but this critical security behavior was undocumented. Additionally, implicit permission requirements (e.g.,
create-pull-requestrequiringissues: writefor fallback) were not explained.Changes
GitHub App token behavior — Documented per-job minting, automatic permission narrowing to match job's
permissions:block, and auto-revocation viaDELETE /installation/token. Explains why org-wide Apps with broad permissions are safe.Fallback field documentation — Clarified that
create-pull-requestdefaults tofallback-as-issue: true(requiresissues: write), and setting it tofalsereduces permissions tocontents: write+pull-requests: write.Token documentation generalization — Updated tokens reference to explain that per-job permission narrowing applies to all GitHub App configurations, not just MCP server tokens.
Frontmatter reference — Added notes about automatic per-job narrowing and token auto-revocation in safe-outputs and app configuration sections.
Example
Per-job token minted with only
contents: write+pull-requests: write, even if App has broader permissions configured.Screenshot
Documentation explains the GitHub App security model with per-job narrowing and auto-revocation.
Original prompt
safe-outputs.app:permission narrowing + (?) implicit permission inflation #15274💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.