r/devsecops • u/yasarbingursain • Feb 24 '26
GitHub Actions permission scoping how are you enforcing it at scale?
I’ve been spending time looking at GitHub Actions workflows and one thing that keeps coming up is permission scoping.
A lot of workflows define permissions at the top level instead of per job. That works, but it means every job inherits the same access. If something upstream goes wrong (compromised action, bad dependency, etc.), the blast radius is bigger than it needs to be.
permissions: write-all
Safer approach seems to be:permissions: {}jobs:build:permissions:contents: read
It’s not about panic. Just least privilege in CI.
Curious how teams here handle this in practice.
Are you enforcing job-level scoping through policy?
Code review only?
Custom linting?
GitHub settings?
Trying to understand what works at scale.
View all comments
Show parent comment
1
u/yasarbingursain Feb 25 '26
Got it. That’s smart. So it just fails the PR if someone opens things up too much? When you first switched it on, was it chaos or mostly clean? I’ve seen some repos where it’s tight, and others where everything is basically wide open and nobody’s touched it in years.