Interview Prep/GitHub Actions/Secrets, Variables, Environments & Permissions

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.

All GitHub Actions questions Roadmap: GitHub Actions

More on Secrets, Variables, Environments & Permissions