Join our Newsletter — 33% off our NHI Course
Home› Guides› Infrastructure as code platform health check: a recurring…
Template Cloud Security

Infrastructure as code platform health check: a recurring security checklist

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 14 November 2026 13 min read
On this page

An infrastructure as code platform can rewrite every cloud account it manages, and its controls decay quietly: state files collect readers, platform tokens outlive the people who created them, apply identities gain scope one exception at a time and engineers start fixing production by hand. This health check is a recurring, measurable review of a live infrastructure as code (IaC) platform: the orchestration service or self-hosted server that plans and applies changes, its state backends, its runners, its policy engine and the cloud identities it applies with. It turns the questions an auditor or platform security lead would ask into twelve metrics with formulas, thresholds and evidence, so each quarter can be compared with the last. It is written for cloud platform owners, DevSecOps leads, internal audit and the CISO's office.

This page measures; it does not explain how to configure the platform. For hardening of admin roles, service accounts, keys, logs and lifecycle, read Securing the infrastructure as code platform itself; for the discipline as a whole (state, secrets, scanning, drift), read the Infrastructure as Code Security Guide. Return to them for every finding this review raises.

What this health check covers

The review covers one IaC platform end to end: workspaces or stacks, the remote state backend, stored variables and credentials, runner pools, the policy engine, the module and provider sources it trusts, and the cloud identities that carry out applies. Pipelines that call the platform are reviewed in the CI/CD server health check, and the cloud accounts themselves in the CNAPP and CSPM platform health check; they appear here only where the IaC platform depends on them.

  • Who runs it: the IaC platform owner collects the figures; the cloud security or DevSecOps lead reviews them; the head of cloud engineering and the CISO or delegate sign off red items.
  • How it differs from the securing guide: that page explains what to set. This check asks, with numbers, whether those settings still hold across every workspace this quarter: how many people can read state, how many apply identities reach more than one environment, how many production changes bypassed the platform.
  • Why the identity angle matters: most metrics measure non-human identities: platform API tokens, runner identities and the cloud roles used to apply. See the IaC credential security guide and IaC identity policy checks.
  • Common questions it answers: "IaC platform security audit checklist", "how to audit infrastructure as code state access", "IaC security KPIs" and "how do we prove production changes go through the pipeline".

Key takeaways

  • State is the crown jewel. Count who can read it, whether it is encrypted, versioned and recoverable, and whether it holds plaintext secrets. A state reader often learns every credential the configuration ever touched.
  • Measure apply identity blast radius. The share of workspaces whose apply role can write to more than one environment is the clearest single indicator of how far one compromised run could reach.
  • Out-of-band changes undo the model. Track production write events from identities that are not platform apply roles or break-glass; every one is either drift, an emergency or an intruder.
  • Overrides and drift show real behaviour. Policy overrides and stale drift reveal where the guardrails are being bypassed, not where they are documented.
  • Thresholds are a starting point. The bands are NHI Mgmt Group recommendations; agree your own once and keep them stable so trends mean something.

How to use this template

Copy the metrics table and the findings log into your own tracker and run this infrastructure as code platform health check at the cadence below. Collect each figure from the data source types described, score it against the green, amber and red bands, and log every amber or red result as a finding with an owner and a due date. Keep each completed review with its raw exports: the quarter-on-quarter trend is as important as any single score, and auditors will ask how a figure was produced.

Cadence and sign-off

ReviewFrequencyOwnerApproverEvidence kept
Platform API token and stored credential reviewMonthlyIaC platform ownerNHI or secrets management leadToken and variable metadata export (never values), expiry dates, owners
Out-of-band production write reviewMonthlyCloud security leadHead of cloud engineeringCloud audit log extract filtered to non-apply identities, explanation per event
Full metrics review (this page)QuarterlyIaC platform ownerHead of cloud engineering and CISO or delegateCompleted metrics table, raw exports, findings log
State backend access and recovery testQuarterly access review; restore test twice a yearIaC platform ownerSecurity risk or GRCBackend access policy export, restore test record with timings
Independent sample testAnnuallyInternal audit or second line riskAudit committeeSample of production changes traced from merge request to cloud audit event
Event-driven reviewAfter a platform compromise advisory, a provider or module supply chain alert, or a platform migrationCloud security leadCISO or delegateAffected workspaces, credentials rotated, state integrity check

The engineers who administer the platform should not be the only people approving figures about their own access; this applies the separation of duties principle in NIST SP 800-53 Rev. 5 AC-5. The NSA and CISA guidance on defending CI/CD environments also calls for regular audits of administrative accounts and logs that record who committed, reviewed and deployed each change, which this scorecard evidences.

Metrics

NHI Mgmt Group recommended thresholds; adjust to your risk appetite. Record the numerator, denominator and data source the first time and reuse them every quarter. "Workspace" means the unit the platform plans and applies (workspace, stack, project or environment), and "apply identity" means the cloud role or service account a run uses to make changes.

IDMetricFormulaData source typeGreenAmberRed
IAC-01State readers on the approved listHuman and machine principals able to read production state who are on the approved list ÷ all principals able to read production stateState backend access policy export, platform workspace permission export100%None (no amber band)Below 100%
IAC-02Protected state backendsState backends with encryption at rest, object versioning or equivalent history, and deletion protection all enabled ÷ all state backendsStorage configuration export, backend settings in platform configuration100%90% to below 100%Below 90%
IAC-03Plaintext secrets in stateWorkspaces whose current state contains a confirmed plaintext credential ÷ workspaces scannedSecrets scanner results over state snapshots0%Above 0% to 5%, all rotated within 7 daysAbove 5%, or any production credential not rotated within 7 days
IAC-04Platform API tokens with expiryOrganisation, team and user API tokens for the platform that have an expiry of 90 days or less ÷ all active platform API tokensPlatform token inventory export95% or more80% to below 95%Below 80%, or any organisation-wide token with no expiry
IAC-05Single-environment apply identitiesWorkspaces whose apply identity can write to exactly one environment or account ÷ all workspacesWorkspace to apply identity mapping, cloud IAM policy analysis95% or more80% to below 95%Below 80%, or any non-production workspace that can write to production
IAC-06Stored credentials marked sensitiveWorkspace variables holding credentials that are flagged sensitive or write-only, so the platform never displays them after entry ÷ all workspace variables holding credentialsWorkspace variable metadata export100%95% to below 100%Below 95%
IAC-07Out-of-band production writesCount of write events in production accounts by identities that are neither platform apply identities nor approved break-glass roles, per monthCloud provider audit logs joined to the apply identity register0 unexplained1 to 5, each explained and reconciledAbove 5, or any unexplained event
IAC-08Production applies with independent approvalProduction applies approved by someone other than the author of the change ÷ all production appliesPlatform run history with approver, merge request records100%98% to below 100%Below 98%
IAC-09Mandatory policy overridesProduction applies that proceeded after overriding a mandatory policy check ÷ all production appliesPolicy engine decision logs, platform run historyBelow 1%1% to 5%Above 5%, or any override without a recorded reason
IAC-10Stale driftProduction workspaces with detected drift unreconciled for more than 14 days ÷ all production workspacesDrift detection results, scheduled plan outputBelow 2%2% to 10%Above 10%
IAC-11Pinned and approved dependenciesWorkspaces with a committed dependency lock file and every module sourced from the approved registry at a fixed version ÷ all workspacesRepository scan of root configurations, module registry source list95% or more80% to below 95%Below 80%
IAC-12Runner pool isolationRunner pools that serve exactly one environment tier and hold network routes and credentials for that tier only ÷ all runner poolsRunner pool configuration, run history with runner identifiers100%80% to below 100%Below 80%, or any pool shared by production and non-production

Report the absolute count beside every percentage. One privileged red item (an unapproved reader of production state, a non-expiring organisation token, a development workspace that can write to production) makes the line red whatever the percentage says.

Interpreting the metrics together

  • IAC-05 and IAC-12: a narrowly scoped apply identity on a runner pool shared with production still exposes production. Read scope and runner isolation together.
  • IAC-07 and IAC-10: rising drift with out-of-band writes usually means engineers are fixing production by hand because the platform is slow. Treat it as a process finding as well as a security one.
  • IAC-08 and IAC-09: high approval rates mean little if overrides are routine. Read them as a pair.
  • IAC-01 and IAC-03: plaintext secrets in state turn every state reader into a credential holder, so a red IAC-03 raises the severity of any IAC-01 gap.

How to collect the data

Export raw rows rather than dashboard percentages. Store the exports with the findings log and record the query or report used, so the next review is calculated the same way.

  1. Freeze the date: agree the measurement date and take every export within one working day of it.
  2. Build the workspace register: list every workspace with its environment tier, owning team, apply identity, runner pool and state backend location. Most later metrics join to this register.
  3. Read the state backend: export the storage access policy and the platform's workspace permissions, then resolve groups to members for IAC-01. Export storage settings (encryption, versioning, deletion protection) for IAC-02.
  4. Scan state: run a secrets scanner over the current state snapshot of every workspace for IAC-03, in a controlled environment, keeping findings metadata only. See how to find secrets in IaC state files.
  5. Export platform tokens and variables: token type, scope, creator, created date and expiry for IAC-04; the sensitive or write-only flag on every credential variable for IAC-06. Never export values.
  6. Analyse apply identity scope: for each apply identity, list the accounts or projects where it holds write permissions, using the cloud provider's IAM policy analysis or access reports, for IAC-05.
  7. Query cloud audit logs: filter production write events and exclude the apply identity register and approved break-glass roles. Every remaining event goes into IAC-07 with an explanation from the team that made it.
  8. Pull run and policy history: production applies with author, approver and policy decision, for IAC-08 and IAC-09; scheduled plan or drift detection output for IAC-10.
  9. Scan repositories and runner configuration: check root configurations for committed lock files and module sources for IAC-11, and runner pool assignments, network routes and attached credentials for IAC-12.
  10. Sample the reds: for every red metric, check five to ten records directly in the platform or cloud console to confirm the figure is real before it reaches a report.

Red flags that need action now

  • A principal reading production state who is not on the approved list, or a state backend open to all authenticated users of the cloud account.
  • A production credential found in plaintext in state and not yet rotated.
  • An organisation-wide platform API token with no expiry, or one belonging to a person who has left.
  • A non-production workspace or runner pool that can write to production accounts.
  • An unexplained write to a production account by an identity outside the apply identity register: treat it as a possible compromise (MITRE ATT&CK T1078.004 Cloud Accounts, T1578 Modify Cloud Compute Infrastructure) and follow the IaC platform compromise playbook.
  • A mandatory policy override on a production apply with no recorded reason or approver.
  • A state backend with versioning or deletion protection switched off, or a failed restore test.
  • A module or provider sourced from an unapproved registry or an unpinned branch in a production workspace. See the IaC module and provider supply chain guide.
  • Platform audit logging disabled, or platform audit events missing from the SIEM for more than 24 hours. The OWASP Top 10 CI/CD Security Risks lists insufficient logging and visibility as CICD-SEC-10.

Findings log

Keep one running log across quarters so repeat findings stay visible. Escalate a finding that is red for two consecutive quarters to the CISO, and one that recurs three times to the risk register.

IDFindingMetricSeverityOwnerDue dateStatus
HC-IAC-01[n] principals outside the approved list can read production state in [backend]IAC-01[Red][IaC platform owner][Date][Open / In progress / Closed]
HC-IAC-02[n] workspaces with plaintext credentials in state, including [n] productionIAC-03[Severity][Workspace owning team][Date][Status]
HC-IAC-03[n] apply identities with write access to more than one environmentIAC-05[Severity][Cloud IAM lead][Date][Status]
HC-IAC-04[n] unexplained production writes by [identity]IAC-07[Severity][Cloud security lead][Date][Status]
HC-IAC-05[Finding][Metric ID][Severity][Owner][Date][Status]

Remediation map

Finding typeWhere to fix it
Excess state readers, unprotected backends, platform admin sprawlSecuring the infrastructure as code platform itself
Plaintext secrets in stateHow to find secrets in IaC state files; Secrets Management Guide
Non-expiring platform tokens, stored cloud keysIaC credential security guide; Workload Identity Federation Guide
Cross-environment apply identitiesIaC identity policy checks; Infrastructure as code platform rollout playbook
Out-of-band writes and stale driftConfiguration Drift and Baseline Enforcement Guide
Routine policy overridesCheckov and IaC Scanners Guide (policy gate design)
Unpinned modules and providersIaC module and provider supply chain guide
Shared or persistent runner poolsSelf-hosted CI/CD Runners and Build Agents

References

Related NHI Mgmt Group resources: Securing the infrastructure as code platform itself, Infrastructure as Code Security Guide, Workload Identity Federation Guide, CI/CD server health check.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.