What does `permissions: {}` do, and `permissions: read-all`?
BeginnerConceptSecrets, Variables, Environments & Permissions
Answer
permissions: {} grants nothing (not even contents: read), so the token is useless except for public reads; good default for jobs that only lint public code or call external APIs. read-all grants read on every scope, write-all grants write on every scope. In a public repo, permissions: {} at the top with per-job grants is the tightest posture.
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