Subscribe to the Non-Human & AI Identity Journal

What are prevent controls in NHI security?

Prevent controls are automated mechanisms that block NHI hygiene violations before they happen — at the point of creation rather than after the fact. Examples: CI/CD pipeline gates that fail builds containing hardcoded secrets, IAC policy enforcement requiring owner tags, and cloud policy controls preventing overly broad permissions at creation time.

Why Prevent Controls Matter for NHI Hygiene

Prevent controls are the difference between reducing NHI risk and simply documenting it. For Non-Human Identities, the goal is to stop bad states at creation time: secrets committed into code, service accounts created with excess privilege, or infrastructure deployed without ownership and expiry. That matters because prevention scales better than cleanup in environments where identities are created by pipelines, templates, and autonomous systems.

NHI security guidance from the Ultimate Guide to NHIs shows why this is so urgent: 97% of NHIs carry excessive privileges, and 96% of organisations store secrets outside secrets managers in vulnerable locations such as code, config files, and CI/CD tools. Once those mistakes are deployed, downstream detection is often too late. NIST’s NIST Cybersecurity Framework 2.0 reinforces the same principle through secure-by-design governance and continuous risk reduction.

In practice, many security teams discover preventable NHI misconfigurations only after a leaked credential, overbroad role, or exposed pipeline has already been used.

How Prevent Controls Work in Practice

Prevent controls sit inside the workflows that create and change NHIs, not beside them. In CI/CD, they can block builds that contain hardcoded secrets or unapproved token formats. In infrastructure-as-code, they can reject deployments that omit owner tags, expiry metadata, or policy boundaries. In cloud control planes, they can deny creation of accounts, roles, or service principals that exceed allowed scope. This is where Top 10 NHI Issues is useful: the dominant failure modes are not exotic, they are repeatable hygiene misses.

The strongest prevent controls are policy-as-code rules evaluated at request time. Current guidance suggests combining static checks with runtime approval logic so that the control can inspect intent, ownership, environment, and blast radius before the change lands. That aligns well with NIST’s NIST Cybersecurity Framework 2.0, especially where organisations need repeatable governance across build, deploy, and runtime stages.

  • Block secret creation outside approved vaults and secret managers.
  • Deny privileged role creation unless least-privilege conditions are met.
  • Require expiry, owner, and purpose fields for every NHI object.
  • Fail deployments when policy drift introduces standing access or wildcard permissions.

The operational pattern is simple: define a forbidden state, encode it as policy, and stop it before it becomes production reality. These controls tend to break down in highly dynamic platform teams that bypass central pipelines because local provisioning paths are harder to govern.

Common Variations and Edge Cases

Tighter prevent controls often increase delivery friction, requiring organisations to balance speed against assurance. That tradeoff is real, especially where platform teams need rapid experimentation or where legacy systems cannot easily support modern policy hooks. Best practice is evolving, but there is no universal standard for how much enforcement should occur in the pipeline versus at the cloud control plane.

One common edge case is service account sprawl across multiple toolchains. If identities are created in SaaS consoles, scripts, and manual admin workflows, a single gate will not be enough. Another is agentic or automated workloads that change behaviour based on task context. In those environments, static RBAC alone is often too blunt, and teams should pair prevent controls with just-in-time issuance, workload identity, and short-lived secrets. The broader lifecycle concerns are covered in 52 NHI Breaches Analysis and the Ultimate Guide to NHIs — Standards, both of which show how weak creation controls become incident patterns later.

For teams adopting cloud-native identity models, Cisco DevHub NHI breach remains a useful reminder that prevention fails when tool sprawl, developer autonomy, and missing guardrails converge.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Non-Human Identity Top 10 NHI-03 Creation-time policy blocks prevent weak NHI hygiene from ever reaching production.
NIST CSF 2.0 PR.AC-4 Least-privilege access controls directly support prevent controls for NHIs.
NIST AI RMF GOVERN Prevent controls need governance for automated and autonomous identity creation paths.

Enforce policy gates on NHI creation, scope, and secret handling before deployment is allowed.

Related resources from NHI Mgmt Group