Skip to content

CICD-179 · Default GitHub token permissions to none ​

Encyclopedia · Workflow security fundamentals · All snippets

Previous · CICD-178 · Next · CICD-180

1. Where it fits ​

  • Placement .github/workflows/ci.yml, at workflow level, or within jobs for a named job mapping.
  • Prerequisites trusted repository, verified inputs and read-only default access.
  • Platforms github-actions, gitea-actions.

2. Copy the snippet ​

yaml
permissions: {}

3. How it works ​

These permissions limit the job token. An external service credential has its own access policy.

4. Verify the result ​

Add explicit minimum permissions only to jobs that need them.

Validation syntax-validated (YAML parse). Status definitions.