Skip to main content

Permissions

The action only requests the permissions it needs for the chosen delivery method.

PermissionWhen required
contents: readAlways — needed to check out the repo and read the git history
contents: writeWhen writing the output file back to the repository
models: readWhen using the github-models provider (the default)
pull-requests: writeWhen post_pr_comment: 'true' (the default)
issues: writeWhen post_issue: 'true'
discussions: writeWhen post_discussion: 'true'
administration: writeWhen post_discussion: 'true' and Discussions may not yet be enabled on the repo

Minimal permissions example (PR comment only)

permissions:
contents: read
pull-requests: write
models: read

Writing output file to the repository

When using a push trigger (or any other event where no PR exists), you need contents: write to commit the assessment file back:

permissions:
contents: write
models: read

All delivery methods enabled

permissions:
contents: write
pull-requests: write
issues: write
discussions: write
administration: write # only if Discussions may not be enabled yet
models: read