TL;DR: Static analysis of a clean financial services codebase found that only 20% of enforcement points consulted a policy engine, while the other 80% were buried in application code, according to EnforceAuth. The finding underscores that authorization is still being improvised in code paths, which weakens governance, auditability, and policy consistency across modern application estates.
NHIMG editorial — what this means for NHI practitioners
By the numbers:
Questions worth separating out
Q: How should security teams find authorization logic hidden in application code?
A: Start with static discovery across repositories and look for role checks, ownership predicates, ORM filters, middleware guards, and feature gates.
Q: Why does hidden authorization logic make least privilege harder to enforce?
A: Least privilege depends on knowing exactly where and how access decisions are made.
Q: What do teams get wrong about policy engines and application access control?
A: They often assume a policy engine eliminates the need to inspect code.
Practitioner guidance
- Inventory embedded authorization decision points Scan applications for role checks, ownership filters, middleware guards, and feature gates so you can see where access is actually decided.
- Centralise high-risk authorization paths first Move the most sensitive checks into a policy engine before trying to rewrite every access rule.
- Treat generated policy stubs as migration candidates Use OPA Rego stubs as a starting point for review, not as production policy.
What's in the full announcement
EnforceAuth's full post covers the operational detail this post intentionally leaves for the source:
- The repository-scanning approach used to identify authorization decision points across codebases
- Examples of the role checks, ORM filters, and middleware guards the scanner surfaces in practice
- How the OPA Rego stubs are generated from discovered decision points for migration work
- Roadmap details for Cedar output and AuthZEN-compatible decision modeling
👉 Read EnforceAuth's announcement on Zift and hidden authorization decisions in code →
Authorization decisions in code: what IAM teams need to fix?
Explore further