title: GitHub Actions Permission Inheritance subtitle: Permissions only flow downward through reusable workflows created: 2025-07-07 updated: 2025-07-18 tags:
GitHubActions
Security
Type/Note aliases:
gha-permissions
workflow-token-scope
github-token-inheritance status: evergreen moc: "[[GitHub Actions Security]]" related:
"[[What is GITHUB_TOKEN]]"
"[[Workflow Security]]"
"[[GitHub Actions Runtime Permission Failures]]"
"[[GitHub Actions Security Benefits of Permission Inheritance]]"
"[[GitHub Actions Default Permissions Surprise]]"
"[[GitHub Actions Secure by Default with Empty Permissions]]"
GitHub Actions Caller vs Called Permissions
🗒️ Today I Learned
A reusable (called) workflow can never increase its own GITHUB_TOKEN permissions. Example: If a caller grants contents: read, the called workflow cannot upgrade to contents: write. The highest level it can reach is whatever the caller passes down. Think of permissions as water flowing through pipes: the caller sets the maximum pressure, and the called workflow can only maintain or reduce it - never increase it.
🤔 Why This Matter?
It's a Security Boundary
This prevents supply-chain attacks. A compromised reusable workflow can't escalate privileges beyond what you explicitly grant. Even if someone sneaks malicious code into a workflow you're using, they're stuck with the permissions you gave them.
Permissions Flow One Way
Like water through pipes, permissions only flow downward. This makes permission models predictable - you never have to worry about a called workflow surprising you with elevated access.
Explicit Control
You always know the maximum damage a reusable workflow can do because YOU set the ceiling. No hidden permission escalations, no unexpected access to your secrets or code.
🔧 In Practice
The final permissions are determined by comparing the caller's granted permissions with the called workflow's requested permissions on a per-permission basis. The most restrictive permission always wins.
Permission Caller Grants Called Requests Result
✅ Match write write write
⬇️ Downgrade write read read
❌ Upgrade read write read
👀 See Also
You might also be interested in:
[[GitHub Actions Secrets Inheritance]] - Do secrets follow the same pattern?
[[Organization Permission Policies]] - Setting org-wide ceilings
[[OIDC Token Permissions]] - How OIDC tokens inherit permissions
———————-
I want you to help me enhance below sub-section part of the note above, I have given you the entire note for context. I am not so happy with this sub-section. For more context this a personal self-contained note. I want it to feel semi-formal as it is a note to myself after all, I don't want it to feel like an enterprise document.
It's a Security Boundary
This prevents supply-chain attacks. A compromised reusable workflow can't escalate privileges beyond what you explicitly grant. Even if someone sneaks malicious code into a workflow you're using, they're stuck with the permissions you gave them.