invalid-permissions
What it does
Section titled “What it does”Reports a permission scope or value that GitHub does not have.
Why it matters
Section titled “Why it matters”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).
Example
Section titled “Example”on: pushpermissions: content: read id-token: read contents: writejobs: a: runs-on: ubuntu-latest permissions: read steps: - run: echoConfiguration
Section titled “Configuration”github-actions: lint: rules: invalid-permissions: warn # off (default), warn, errorEnabled by the presets: github-actions/actionlint.
Suppress one line with sudsy-disable-next-line invalid-permissions in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”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. |