What is the `GITHUB_TOKEN`, and how long does it live?
BeginnerConceptSecrets, Variables, Environments & Permissions
Answer
A GitHub App installation token automatically created for each job, scoped to the repository running the workflow, with permissions from the permissions key (or the repo/org default). It expires when the job completes, or after 24 hours at most. It cannot access other repositories (except public ones read-only), cannot trigger most new workflow runs, and is revoked at job end, so leaking it after the fact is low impact. Leaking it during a running job is not.
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