Interview Prep/DevSecOps/Identity, Least Privilege & OIDC for CI

What are the common mistakes in OIDC trust policies for CI?

AdvancedProductionIdentity, Least Privilege & OIDC for CI
Answer
  • Missing sub condition entirely (any GitHub repo in the world can assume the role).
  • Wildcards like repo:acme/*:* on privileged roles.
  • Trusting ref:refs/heads/* instead of a protected branch or environment.
  • Using pull_request workflows for roles that can deploy.
  • One role shared by all repos with admin permissions.
  • Forgetting that sub formats change if you customise them (GitHub lets orgs customise the OIDC subject template), breaking or widening matches.

Audit trust policies with IAM Access Analyzer and a periodic script that lists roles trusting the GitHub OIDC provider.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Identity, Least Privilege & OIDC for CI