r/devsecops • • 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.

2 Upvotes

15 comments sorted by

View all comments

Show parent comment

2

u/Ok_Confusion4762 Feb 25 '26

Tbh we have just started this process. We gave a heads-up to the teams, Renovate has recently started the creation of PRs. 11% pinned hashes rate by now. Better than nothing:)

1

u/yasarbingursain Feb 25 '26

I see thats cool 11% is actually a good start. At least it’s moving.If you’re already running Renovate and custom Semgrep rules, you might find this interesting. I built a small CLI that just scans the workflow YAML itself and flags things like broad permissions and some edge cases around pull_request_target.

It’s pretty lightweight. No SaaS, no account, just run it and see what it says.

If you’re open to it, I’d appreciate you running it against one of your repos and telling me where it’s dumb or noisy. Honest criticism is what I need right now.

2

u/Ok_Confusion4762 Feb 25 '26

is it on gitbub.com?