Granite: Granular Runtime Enforcement for GitHub Actions Permissions
summary
The gist
Granite is a runtime proxy-based system that enforces fine-grained permissions for GitHub Actions at the step-level granularity within a job.<ref:2512.11602#pg7>.
In short
Granite is a runtime proxy system that enforces fine-grained permissions for GitHub Actions at the step level within a job. It solves GitHub's coarse permission model by monitoring JavaScript and composite actions during execution. This allows systems to enforce least privilege by ensuring each action only uses the specific permissions granted to its individual step, significantly reducing security risks.
Key concepts
- Coarse-Grained Permissions
- GitHub currently grants all actions within a job the same set of permissions. Granite addresses this by enforcing permissions at the step level, meaning each individual action gets its own tailored access rights instead of sharing the entire job's broad privileges.
- Step Dispatcher
- This component analyzes each step in a workflow to determine if it is a composite, JavaScript, or Docker action. It evaluates templates and context to populate the necessary information for Granite to apply the correct enforcement mechanism for that specific step.
- Proxy-Based Shim Layer
- For JavaScript actions, Granite inserts a proxy layer that secretly intercepts all network communication between the action and external repositories. This allows Granite to inspect requests in real-time against defined security policies before they are executed.
- MITM Proxy for Composite Actions
- Composite actions are intercepted using mitmproxy within an isolated Docker container. This setup allows Granite to perform SSL-capable network traffic inspection, checking the action's requests against policies to prevent unauthorized operations like writing to pull requests.
Terminology used across episodes
This episode discusses
The paper
Granite: Granular Runtime Enforcement for GitHub Actions Permissions · Read on arXiv
KTH Royal Institute of Technology · Chalmers University of Technology
GitHub Actions is a popular CI/CD platform that lets maintainers build workflows from reusable third-party actions, organized into jobs of sequential steps. To control access to repository resources, GitHub enforces token permissions only at the job level. This violates the principle of least privilege: every step shares the job's full permissions, so a single compromised action can misuse all of them, as witnessed by the recent tj-actions compromise, enabling broader software supply chain attacks. We present Granite, the first system to enforce fine-grained, step-level permissions for GitHub Actions at runtime. Untrusted steps never hold the real token; a separate controller issues each step an identifier token and supplies the real token only to requests that meet the step's policy. Granite builds on GitHub's self-hosted runner, requires no workflow changes, and transparently handles JavaScript, composite, and Docker actions. Across 500 workflows (12,915 jobs) from the most-starred GitHub repositories, 46.3% of jobs are overprivileged and can be protected by Granite. On 46 repositories and 127 unique actions, Granite preserves the behavior of every job that runs on the unmodified runner, except one it blocks by design. Reproducing 10 permission-misuse attacks over 42 overprivileged jobs, including attempts to bypass its enforcement, Granite prevents all of them and removes write access from about 83.3% of the steps that hold it under GitHub's current model. Its average per-step overhead is 7.9%, making Granite a practical and effective tool to reduce the attack surface in CI/CD pipelines.
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "Granite: Granular Runtime Enforcement for GitHub Actions Permissions".
Title and authors: Nadia: So we're looking at this paper called Granite: Granular Runtime Enforcement for GitHub Actions Permissions, written by Mojtaba Moazen and Amir Ahmadian, and it tackles the idea that GitHub Actions currently gives every action in a job the same permissions, which isn't very safe.
Elias: Right, so they are looking at how to enforce permissions at the step level instead of just the whole job level. The implication here is that we can stop those actions from abusing their overly broad access to things like pull requests or other repository resources >
Priya: It sounds like they're trying to solve that problem where one slightly malicious action can compromise everything in a job, which means they need a way to check permissions while the workflow is actually running.
Nadia: Exactly. The authors are showing how this system works by building something that acts as a runtime proxy, monitoring what JavaScript and composite actions try to do as they execute their tasks during the workflow run >
Elias: I'm interested in how they manage that enforcement without slowing everything down too much, because if we add a lot of checks, the CI/CD pipeline becomes unusable for developers.
Priya: That's a big concern for me. If this system introduces significant delays or complexity into every single step, it defeats the purpose of streamlining development workflows in the first place.
The paper's summary: Nadia: They start by showing that GitHub’s current job-level permission model is too coarse-grained, and they use data from five hundred workflows and about thirteen thousand jobs to prove that overprivileged jobs are very common, at about forty six point six percent of the time <ref:2512.11602#pg2>
Elias: And they find that when they test this system against twenty popular repositories, Granite manages to identify about forty two overprivileged jobs, which is nearly sixty percent of them being high or critical severity >
Priya: So the summary points out that before you even have a solution like Granite, the problem is already widespread in GitHub's current setup. The data shows how prevalent this issue is in real-world usage >
Nadia: And then they use it to actually implement proof-of-concept exploits to show exactly how easy it is for an action with broad permissions to cause damage, like being able to write and confirm any pull request on a repository >
Elias: The core finding they're emphasizing is that by using Granite, which enforces step-level permissions dynamically, they can reduce the attacks surface by about eighty three point three percent per overprivileged job <ref:2512.11602#pg2>
Priya: That reduction in attack surface sounds important because it means less potential for supply chain attacks where one bad action can spread its damage across the entire project >
The paper's improvements: Nadia: The paper discusses a few key improvements they've built into Granite, focusing on how it handles different types of actions and context. They introduce a step dispatcher that figures out what kind of action it is—whether it’s a JavaScript action, a composite action, or just a simple command >
Elias: And for those JavaScript actions, they use a proxy-based shim layer to transparently intercept the communication that the action tries to make with its target repository during execution. That's how they get visibility into what the code is actually trying to do >
Priya: So if we think about it from a measurement side, this means they are capturing traffic on behalf of the action and checking those requests against predefined policies for that particular step. It sounds like they are creating a feedback loop between what the action wants to do and what it's actually allowed to do >
Nadia: And for composite actions, Granite relies on something called mitmproxy running inside an isolated Docker container to intercept all the network traffic within that bundled action. This lets them verify those complex bundles against policies, like checking if a composite action is allowed to write on pull requests >
Elias: They also introduce dynamic context awareness where the verifier checks the request against action policies based on runtime inputs and event types, like figuring out what the goal of an action is based on the event that triggered it >
Priya: That contextual awareness is interesting because it moves beyond just static rules. It means they can adjust permissions based on what's actually happening at that moment in the workflow execution, which should make the enforcement much smarter and more relevant to each step >
Conclusion: Nadia: So to wrap up, Granite is this runtime proxy system that enforces fine-grained permissions for GitHub Actions at the step level within a job. They've shown it can prevent permission misuse attacks by making sure an action only uses the permissions granted to that particular step >
Elias: The implications are big because they confirm that you can actually reduce the number of steps with write access by about eighty three point three percent per overprivileged job, which is a significant reduction in the attack surface >
Priya: From my view what this means for someone just running workflows is that we get a much tighter control over who or what can do what during execution, instead of relying on the broad permissions of the entire job >
Nadia: And they also showed that they can adapt their security posture by switching between enforcement and learning modes when a policy isn't available, which gives developers some transparency into what permissions are actually required for each step >
Elias: It’s a practical approach to addressing this, showing how to be both secure and still functional within the CI/CD environment >
Priya: I just want to say that while the ninety four percent overhead for composite actions sounds high, it's worth looking at how much of that is necessary for real-world security versus what might be overkill for some simpler workflows <ref:2512.11602#pg1>
Nadia: Exactly, it’s a tool designed to reduce risk in CI/CD pipelines by focusing on the actual execution context rather than just the job container. That's Granite for now.
More episodes
- The day in conversation for 2026-12-05
- Daily Summary for 2026-12-05
- 2607.15118-Automated Template-free Synthesis of Instruction-Centric Leakage Contracts for Black-Box CPUs
- 2610.37722-FVH-Bench: Evaluating Image Generator Safety Beyond Overtly Harmful Imagery
- 2512.23849-Security Without Detection: Economic Denial as a Primitive for Edge and IoT Defense
- 2605.05807-LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attribution
- 2607.02932-PromptPET: Prompt Obfuscation Against Profiling by AI Agents
- 2309.05646-A Novel Supervised Deep Learning Solution to Detect Distributed Denial of Service (DDoS) attacks on Edge Systems using Convolutional Neural Networks (CNN)
- The day in conversation for 2026-12-04
- Daily Summary for 2026-12-04