Measure the percentage of cloud resources managed through approved code paths versus those created manually or by script. Then segment the result by account, environment, and resource type so the score shows where governance is weakest. A single overall number is useful, but breakdowns reveal where remediation effort will have the biggest security impact.
Why This Matters for Security Teams
infrastructure as code coverage is not just a change-management metric. It shows how much of the cloud estate is governed through reviewable, versioned, and repeatable paths rather than ad hoc console actions or one-off scripts. That distinction matters because manual creation is where drift, privilege bypass, and untracked exposure usually enter the environment. NIST Cybersecurity Framework 2.0 frames this as a governance and control consistency problem, not merely an engineering preference.
For cloud teams, the practical risk is that a high overall score can hide weak pockets in sensitive accounts, fast-moving sandboxes, or special-purpose resource types. A resource created outside approved code paths may still look compliant after the fact, but it was never subject to the same policy checks, review gates, or rollback discipline. That is why coverage should be measured by account, environment, and resource class, then tied back to operational ownership. The same logic appears in NHIMG research on cloud compromise patterns, including the 230M AWS environment compromise, where weak identity and control discipline amplified blast radius.
In practice, many security teams discover low IaC coverage only after a risky resource has already been created outside the intended pipeline, rather than through deliberate governance reporting.
How It Works in Practice
Measuring IaC coverage starts with defining the denominator. Most teams do best when they count all in-scope cloud resources, then classify each one by provenance: approved code pipeline, approved automation, manual console action, or unmanaged script. The goal is not to shame every exception. It is to reveal where governance is strong enough to be trusted and where it is being bypassed.
A practical measurement model usually combines cloud inventory, deployment logs, and policy enforcement data. The inventory tells you what exists. The pipeline or change records tell you what was created through approved code. CloudTrail, activity logs, or equivalent control-plane telemetry help identify manual creation and out-of-band changes. For a more durable control model, teams should pair coverage reporting with policy gates described in the NIST Cybersecurity Framework 2.0, especially asset management, change control, and monitoring functions.
- Measure coverage as a percentage of resources created or modified through approved IaC pipelines.
- Segment results by account, environment, business unit, and resource type.
- Track exceptions separately so temporary break-glass actions do not distort the baseline.
- Validate the metric against control-plane logs, not only against repository records.
- Use trendlines to show whether remediation is reducing manual creation over time.
NHIMG research also highlights why this visibility matters. In the 2024 Non-Human Identity Security Report, 88.5% of organisations said their non-human IAM practices lag behind or are merely on par with human IAM, which is a useful warning sign for cloud control maturity more broadly. Coverage improves fastest when platform teams make approved code the easiest path to production, while still preserving documented emergency overrides.
These controls tend to break down in highly decentralized environments where teams can create resources across many accounts without centralized logging or consistent tagging because the denominator becomes unreliable.
Common Variations and Edge Cases
Tighter IaC enforcement often increases operational friction, so teams have to balance governance depth against deployment speed. That tradeoff is real, especially in research, M&A, or incident-response environments where one-off resources are sometimes unavoidable. Current guidance suggests treating those cases as explicit exceptions with short expiry, not as permanent gaps in the metric.
There is no universal standard for this yet, but most mature teams distinguish between “coverage of provisioned infrastructure” and “coverage of managed lifecycle.” The second measure is usually more demanding because it includes updates, deletions, and drift correction, not just initial creation. It is also important to avoid false precision. A resource may be created through code and still become unmanaged if later modified directly in the console. That is why change detection matters as much as initial provisioning.
One common edge case is platform services that are intentionally abstracted away from application teams, such as managed databases or serverless integrations. Another is shared foundational infrastructure, where a small number of privileged operators may legitimately use controlled scripts instead of repo-driven workflows. In those environments, the metric should be paired with approval records, configuration baselines, and owner attestations rather than treated as a simple pass or fail. The Snowflake breach is a reminder that strong perimeter assumptions do not compensate for weak operational control over sensitive systems.
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 CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | GV.OC-01 | IaC coverage is a governance metric for controlled cloud change. |
| NIST CSF 2.0 | PR.IP-12 | Change management should show what was deployed through approved code paths. |
| OWASP Non-Human Identity Top 10 | NHI-01 | Unmanaged scripts and manual actions often create hidden identity and access risk. |
Track provisioning provenance and reduce manual change paths through approved pipelines.
Related resources from NHI Mgmt Group
- How should teams close Infrastructure as Code skills gaps without slowing delivery?
- What do security teams get wrong about policy-as-code in cloud deployments?
- How should teams govern secrets in infrastructure as code pipelines?
- What should security teams measure before modernising identity infrastructure?