GITHUB_TOKEN

A short-lived access token GitHub creates for each job so the workflow can call the GitHub API for its own repository.

An over-privileged token lets any compromised step change your repository.

In more detail

It expires when the job ends, but its default scope can be broad. The permissions key narrows it, for example contents: read for the whole workflow and contents: write only for the one job that must push. Under pull_request from a fork it is read-only.

Related terms

Taught in

References

Certification courses