Skepra / Web recovery & resilience

Review workflow token permissions before approval

A workflow change can include a permissions change as well as a code change. Use this checklist to trace where access is set, identify what the file explicitly grants, and record questions that need an authorized repository review.

Discuss a workflow change that needs a permissions review

Check the token's role

Start by identifying the credential under review. GitHub describes GITHUB_TOKEN as the token Actions uses to authenticate a workflow on its behalf. Treat the review as an inspection of the access configured for that token, rather than inferring access from a workflow name. The documentation says permissions can be configured to the minimum a workflow or job requires. Use that as the decision standard for the proposed edit.

Source: Use GITHUB_TOKEN for authentication in workflows.

Find each permissions declaration

Read the workflow-level permissions key first. GitHub documents that a top-level key applies to all jobs. Then inspect each job for a job-level key, since the syntax allows permissions to be set within a specific job as well. For the change review, make a small map of the workflow and jobs, and note which declaration governs each part. Compare the proposed file with the version being replaced so the reviewer can see the scope of the edit.

Source: Workflow syntax for GitHub Actions; Use GITHUB_TOKEN for authentication in workflows.

Verify listed and unlisted access

When a permissions declaration assigns an access level to any permission, GitHub says permissions omitted from that declaration are set to none. Read the complete declaration rather than assuming an omitted entry inherits an access level. For each proposed value, record the job or workflow that needs it and the reason supplied by the change owner. If the reason is unclear, leave it as an approval question instead of adding access by guesswork.

Source: Workflow syntax for GitHub Actions.

Confirm least access and repository constraints

Compare the proposed permissions with the stated needs of the workflow, and ask whether each grant can be removed while still meeting that need. GitHub recommends giving GITHUB_TOKEN the least access the workflow requires. The documentation also says organization owners can restrict the token's write access at repository level. When a proposal depends on write access, record that this restriction needs to be checked by someone authorized to review the repository configuration.

Source: Use GITHUB_TOKEN for authentication in workflows; Workflow syntax for GitHub Actions.

Handoff and limits

Record the workflow file, affected jobs, permission declarations before and after the edit, the stated reason for each proposed grant, and the person responsible for approval. Mark repository or organization defaults as unchecked until an authorized reviewer inspects the applicable settings. The cited documentation explains permission placement and least-access guidance; it does not establish the defaults or current settings for a particular repository, enumerate scopes here, or show whether a reader's workflow needs a change. This checklist is a review aid, not evidence that a workflow was inspected or that a proposed change is appropriate.

Source: Workflow syntax for GitHub Actions; Use GITHUB_TOKEN for authentication in workflows.

Questions

Does an omitted permission mean it should be added?

No. In a declaration that sets an access level, unlisted permissions are set to none. Check the documented need before proposing a grant.

Can this checklist tell me the repository's token defaults?

No. Have an authorized reviewer inspect the applicable repository or organization settings and record the result.