Skip to content
TheChatArchiveThe Chat Archive
gpt-4.1-mini-2025-04-14· OpenAIHugging Face LMArena Human Preference 140K

title: GitHub Actions Permission Inheritance subtitle: Permissions only flow downward…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with o3-2025-04-16’s answer.
  1. User

    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 this paragraph below am not so happy with it, this a personal self-contained note

    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. I want it to feel semi-formal it is a note to myself after, this feel like an enterprise document

  2. Assistant

    Certainly! Here's a polished, semi-formal revision of your paragraph that keeps it clear and personal but with a bit more polish:


    It's a Security Boundary
    This design acts as a crucial security boundary. If a reusable workflow is compromised, it cannot gain permissions beyond what I explicitly allow. Even if malicious code somehow makes its way into a workflow I rely on, it remains confined to the access I’ve granted—no unexpected privilege escalation is possible.


    Would you like it a bit more casual or more formal? I can adjust tone accordingly!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.