Skip to content

invalid-permissions

GitHub Actionscorrectnessno fixdefault: offgithub-actions/actionlint

Reports a permission scope or value that GitHub does not have.

A misspelling like content: read does not grant the access that the job needs, and a job that sets permissions has no access to the scopes it does not name.

To fix, use a known scope with a value it takes (read, write or none).

Reported
on: push
permissions:
content: read
id-token: read
contents: write
jobs:
a:
runs-on: ubuntu-latest
permissions: read
steps:
- run: echo
github-actions:
lint:
rules:
invalid-permissions: warn # off (default), warn, error

Enabled by the presets: github-actions/actionlint.

Suppress one line with sudsy-disable-next-line invalid-permissions in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
actionlint permissions partial Scopes and values.