Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Granite: Granular Runtime Enforcement for GitHub Actions Permissions

About

Modern software projects use automated CI/CD pipelines to streamline their development, build, and deployment processes. GitHub Actions is a popular CI/CD platform that enables project maintainers to create custom workflows -- collections of jobs composed of sequential steps -- using reusable components known as actions. Wary of the security risks introduced by fully-privileged actions, GitHub provides a job-level permission model for controlling workflow access to repository resources. Unfortunately, this model is too coarse-grained to reduce the attack surface pertaining to permission misuse attacks: All actions within a job share the same permissions granted to the job. This violates the principle of least privilege and can lead to broader software supply chain attacks, whenever a compromised action exploits the granted permissions to compromise the repository resources. In this paper, we present Granite, a runtime proxy-based system that enforces fine-grained permissions for GitHub Actions at the step-level granularity within a job. Granite transparently monitors requests made by JavaScript and composite actions during workflow execution and checks them against predefined step-level policies at runtime. We evaluate Granite in terms of compatibility, security, and performance overhead using a dataset of 500 workflows comprising 12,916 jobs from the most-starred GitHub repositories that use GitHub Actions. Our analysis reveals that 52.7% of the jobs can be protected by Granite against permission misuse attacks. We evaluate Granite on 20 top-starred repositories (63 actions, 58 workflows), validate attack prevention using 10 permission misuse attacks across 42 overprivileged jobs, and measure an average overhead of 55% (3.67 seconds) per job, concluding that Granite effectively reduces CI/CD attack surfaces.

Mojtaba Moazen, Amir.M Ahmadian, Musard Balliu• 2025

Related benchmarks

TaskDatasetResultRank
Overprivileged Job Detection20 GitHub Repositories latest (various)
Overprivileged Job Count42
21
Static vs Dynamic Permission Precision Analysis20 GitHub Repositories latest (various)
False Positives0.00e+0
21
Workflow Compatibility Analysis20 GitHub Repositories latest (various)
Failed Jobs0.00e+0
21
Showing 3 of 3 rows

Other info

Follow for update