List the `permissions` scopes you use most and what needs them.
IntermediateConceptSecrets, Variables, Environments & Permissions
Answer
| Scope | Needed for |
|---|---|
contents: read/write |
checkout private repo / push commits, create tags and releases |
id-token: write |
requesting an OIDC token |
packages: write |
pushing to GHCR |
pull-requests: write |
commenting, labeling PRs |
issues: write |
issue comments and labels |
checks: write |
creating check runs with annotations |
statuses: write |
commit statuses |
security-events: write |
uploading SARIF to code scanning |
attestations: write |
artifact attestations |
actions: read/write |
reading or cancelling runs, managing caches |
deployments: write |
deployment records outside environments |
pages: write |
GitHub Pages deploys |
More on Secrets, Variables, Environments & Permissions
Where can secrets be defined, and what is the precedence?BeginnerHow are secrets protected in transit and in logs, and what are the limits?IntermediateAre secrets available to every step automatically?BeginnerWhy is it a bad idea to store structured data like JSON or a whole `.env` file as one secret?IntermediateWhat is an environment, and which protection rules can it have?BeginnerWhen does a job wait for environment approval, and what does the reviewer see?Intermediate