← Back to blog

Produce OSCAL Evidence for IaC Compliance in Regulated Programs

September 12, 2026
Produce OSCAL Evidence for IaC Compliance in Regulated Programs

For regulated programs, the reliable pattern is combining policy-as-code, shift-left IaC scanning, and a machine-readable evidence pipeline. This satisfies control families under NIST SP 800-53 and FedRAMP while producing OSCAL and SBOM artifacts auditors can actually consume. The immediate next step is to add automated policy checks to the pull request stage of your CI pipeline before anything else changes.


TL;DR:

  • Automated policy checks should be added to the pull request stage of the CI pipeline to enable continuous compliance before deployment.
  • Tag scanner outputs with control IDs and convert them into OSCAL assessment results to support ongoing authorization processes.
  • Use a combination of static, organizational, and Cloud-specific scanners to ensure comprehensive shift-left IaC validation, following a structured order and severity prioritization.
  • Validate policies in non-production environments before enforcement, then produce and store evidence artifacts like SARIF reports and SBOMs for audit readiness.
  • Combine pre-deploy checks with runtime monitoring tools, such as AWS Config or Azure Policy, to detect and remediate drift, maintaining compliance throughout the resource lifecycle.

Primereadysub
Strengthen Your Government Modernization Program
Rutledge & Associates supports secure, scalable modernization through compliance automation, DevOps pipelines, and data analytics for public-sector programs.
Explore modernization capabilities

Table of Contents

What Does Infrastructure as Code Compliance Actually Map To?

Infrastructure as code compliance means proving, with evidence a machine can read, that every provisioned resource satisfies a named control. That distinction matters for ISSOs preparing an authorization package because a passed pipeline check is not evidence unless it is tagged, stored, and traceable to a control ID.

Three mapping patterns cover most regulated workloads. Static application security testing (SAST) scan results typically satisfy SA-11 (developer security testing). IaC scanning and configuration enforcement map to CM-6 (configuration settings) and CM-7 (least functionality). Software composition analysis and SBOM generation feed the SR family (supply chain risk management).

  • SAST findings → SA-11 developer testing evidence
  • IaC scan and policy enforcement results → CM-6 / CM-7 configuration controls
  • SBOM and dependency scan output → SR-family supply chain controls

Statistic Callout: A practitioner mapping of federal DevSecOps pipelines shows that tagging scanner outputs with control IDs and converting them into OSCAL assessment results is what lets programs pursue continuous authorization to operate instead of a point-in-time review. Document the pipeline itself as a control implementation inside your System Security Plan. Auditors need to see the automation described as part of the control, not bolted on after the fact.

How Do You Turn Governance Rules Into Enforceable Policy Code?

Policy as code means writing your governance rules in a format a machine can evaluate against a Terraform plan, a CloudFormation template, or a Kubernetes manifest, then storing that logic in version control alongside the infrastructure it governs. The three dominant authoring formats are OPA's Rego language, Kyverno for Kubernetes admission policies, and cfn-guard for CloudFormation. All three belong in the same repository as your IaC, reviewed through the same pull request process.

Microsoft's policy-as-code guidance lays out a testing lifecycle worth adopting regardless of cloud provider:

  • Deploy new policy assignments in a development environment with enforcement disabled first
  • Run PUT and PATCH tests against representative resources to confirm the policy evaluates correctly
  • Validate edge cases (tagged exceptions, legacy resources, cross-region deployments) before enabling enforcement
  • Only then flip enforcement on, progressively, environment by environment

Pro Tip: Grant remediation tasks a dedicated managed identity with the narrowest permission set that still lets it fix noncompliant resources. A remediation identity with broad write access defeats the purpose of least-privilege enforcement.

Conftest and OPA running locally in a developer's IDE catch violations before a commit even happens, which federal DevSecOps guidance credits with cutting remediation cost substantially compared to catching the same issue post-deploy.

Which Scanners Belong in a Shift-Left IaC Pipeline?

No single scanner catches everything, so regulated programs typically run three complementary tools rather than betting on one. OPA and Conftest handle custom organizational logic that generic scanners cannot anticipate. Checkov provides broad, out-of-the-box static checks across hundreds of misconfiguration patterns. cfn-guard specializes in CloudFormation-specific rule enforcement where AWS-native syntax matters.

AWS's public sector guidance recommends this exact three-tool mix for validating FedRAMP 20x Key Security Indicators (KSIs) before deployment, tagging each scan output with the KSI identifier it validates.

Placement across the pipeline follows a natural progression:

  1. Local and IDE checks catch violations at write time, before a commit exists
  2. Pull request checks run the full policy suite against the proposed change
  3. CI plan analysis evaluates the Terraform or CloudFormation plan output, not just static files
  4. Pre-deploy gating blocks the merge or release if critical checks fail

Severity tiering keeps this from becoming noise developers ignore. Critical KSI violations should block the build outright; lower-risk findings should warn without stopping the pipeline. Each warning needs a remediation link or inline guidance, not just a red X, or developers will start treating every failure as background static.

How Do You Test Policies and Generate Audit Evidence?

Validating a policy before enforcement means more than checking that it deploys. Assign the policy in a non-production environment with enforcementMode disabled, run the associated remediation task, then confirm the result two ways: through the policy engine's own evaluation and through a direct check of the actual environment state. Both should agree before you trust the policy in production.

Once validated, the pipeline needs to produce artifacts an authorizing official can actually review. That means collecting SARIF output from static scanners, raw scanner JSON, generated SBOMs, and signed image provenance predicates, then converting the bundle into OSCAL assessment results tied to specific control IDs.

  • Collect SARIF and scanner JSON from every gating tool in the pipeline
  • Attach SBOM output and signed build provenance to the same release artifact
  • Convert the bundle into OSCAL assessment results mapped to control IDs
  • Commit the generated evidence back to the repository on every successful run

That last habit, often called the "bot commits evidence" pattern, keeps an audit trail that updates itself instead of relying on someone remembering to screenshot a dashboard before a review. Present this evidence bundle to ISSOs and Authorizing Officials as a living artifact tied to the release, not a document assembled after the fact. Producing OSCAL from CI artifacts is what makes continuous authorization to operate realistic instead of aspirational.

What Happens After Deployment: Drift Detection and Runtime Monitoring?

Compliance does not end at deploy time. A resource that passed every pre-deploy check can drift out of compliance hours later through a manual console change or an emergency fix that skipped the pipeline. Cloud-native runtime evaluators exist precisely for this gap: AWS Config with conformance packs and Azure Policy both continuously reevaluate live resources against the same control logic you enforced pre-deploy, then map violations back to the same control IDs.

OWASP's IaC security guidance treats continuous monitoring and remediation as a distinct runtime stage, separate from the develop and deploy stages most teams focus on first.

A tiered response model keeps this manageable:

  • Auto-remediate critical drift immediately (an open security group, a disabled encryption setting)
  • Alert and ticket for non-critical drift that needs human judgment before reverting
  • Feed both outcomes into the same evidence pipeline that captures pre-deploy results

Runtime evidence and pre-deploy evidence together give an authorizing official a continuous picture instead of a single snapshot, which is the entire point of continuous monitoring under most modern authorization frameworks.

Practical Checklist: Standing Up IaC Compliance in a Regulated Program

Getting from ad hoc scanning to a defensible compliance program follows a predictable sequence. Skipping steps tends to surface later as an audit finding, so treat this as sequential rather than a menu.

  1. Set branch protection rules requiring passing policy checks before any merge to a protected branch
  2. Define pipeline stages in order: lint, plan, scan, policy check, sign and store artifact
  3. Establish an evidence storage convention (a dedicated repository or bucket, versioned, with retention rules)
  4. Build a promotion path from dev to pre-production to production, gating each transition on evidence
  5. Document a rollback and emergency change process that still generates evidence, even under time pressure
  6. Assign deployment identities the minimum permissions needed, scoped per environment
  7. Set a reporting cadence with your ISSO so evidence review happens on a schedule, not only during formal audits

Pro Tip: Build your emergency change process before you need it. A break-glass deployment that skips policy checks but never generates after-the-fact evidence is the single most common finding in regulated program audits.

Our government IT compliance checklist expands on evidence retention conventions if your program needs a longer reference.

How Rutledge & Associates Applies This in Government Modernization Work

A specialized IT modernization firm builds compliance automation as a defined-scope deliverable rather than staff augmentation. That means owning the pipeline, the policy set, and the evidence output as a single work package, not a rotating cast of contractors touching different pieces.

The delivery pattern mirrors what this article describes: policy-as-code gates built into CI/CD, scanner output mapped to control families, and OSCAL artifacts generated automatically rather than assembled by hand before a review...

The practical effect for a government client: audit preparation shifts from a quarterly scramble to a byproduct of normal deployment activity, because the evidence already exists in the repository.

How Should Secrets and Sensitive Data Be Handled in IaC?

Secrets baked directly into Terraform variables or CloudFormation parameters are one of the most common findings in IaC audits, and they are entirely preventable. The rule is simple to state and easy to violate under deadline pressure: no plaintext credential, API key, or connection string ever enters a version-controlled file, full stop.

Practical handling starts with a secrets manager native to the platform, whether that's AWS Secrets Manager, Azure Key Vault, or HashiCorp Vault, referenced by the IaC template through a dynamic lookup rather than a hardcoded value. The template references the secret's location; it never contains the secret itself.

Pre-commit scanning catches what human review misses. Tools that scan for credential patterns before a commit reaches the repository stop the leak before it becomes a git history problem, because a secret committed once and later removed still lives in the repository's history unless that history gets rewritten.

For compliance mapping specifically, secrets handling touches multiple control families at once: access control (AC), identification and authentication (IA), and system and communications protection (SC) under NIST SP 800-53. Auditors will ask how secrets rotate, who can retrieve them, and whether access is logged. An IaC template that provisions a secrets manager policy alongside the resource it protects answers that question structurally instead of through a written procedure someone has to remember to follow.

State encryption matters here too. Terraform state files frequently contain resource attributes that look benign but include connection details or generated passwords; storing state in an encrypted backend with restricted access is not optional in a regulated environment.

How Should Secrets and Sensitive Data Be Handled in IaC? — overview diagram

What Auditing and Reporting Tools Go Beyond Static Scanning?

Static scanners answer "does this template violate a rule?" They do not answer "can I show an auditor a defensible history of every change and its approval?" That second question needs a different category of tooling built around evidence assembly and reporting rather than detection.

Machine-readable evidence formats sit at the center of this. Converting scanner output, SBOM data, and policy evaluation results into OSCAL assessment results gives an Authorizing Official a structured, queryable record instead of a folder of disconnected PDFs. This is the difference between compliance documentation and compliance evidence.

Dashboards that aggregate policy compliance across accounts and environments matter for programs running multi-cloud or multi-account architectures, where a single account's clean scan tells you nothing about the other forty accounts in the organization. Our multi-cloud governance guide covers evidence aggregation patterns across account boundaries in more depth.

Reporting cadence tools, meaning anything that automatically routes a compliance summary to an ISSO on a schedule rather than waiting for someone to request it, close the loop between automated detection and human accountability. A pipeline that generates perfect evidence nobody reviews until the week before an audit deadline has not actually reduced audit risk; it has just relocated where the scramble happens.

Version-controlled audit trails, where every policy change, every exception granted, and every remediation action lives in git history with an associated pull request and approval, function as a reporting tool in their own right. An auditor asking "who approved this exception and why" gets an answer in seconds instead of an email thread reconstruction.

What Common Regulatory Standards Shape IaC Compliance Beyond NIST and FedRAMP?

NIST SP 800-53 and FedRAMP dominate federal and state government conversations, but regulated organizations working across sectors run into a wider set of requirements that shape how IaC templates get written and enforced.

GDPR affects IaC most directly through data residency and encryption requirements. A Terraform module that provisions a database without an explicit region constraint can silently place regulated data outside its permitted jurisdiction, which is a policy check worth writing regardless of whether GDPR applies to your specific workload.

HIPAA-covered workloads need IaC templates that enforce encryption at rest and in transit by default, with audit logging enabled on every resource that touches protected health information. Policy-as-code rules that reject any storage resource deployed without encryption configured catch this class of violation before it reaches production, rather than relying on a manual review checklist.

PCI-DSS brings network segmentation requirements into IaC directly. Templates that provision cardholder data environments need policy checks confirming the resource sits inside the correct network segment, with security groups that don't inadvertently expose it to broader network access than the standard permits.

State-level requirements add another layer for public-sector work specifically. CJIS compliance, relevant for law enforcement data handling, imposes its own encryption and access logging requirements that IaC policy checks can enforce structurally rather than procedurally. Our CJIS compliance guide covers those controls in more detail for agencies handling criminal justice information.

The common thread across all of these: writing the requirement as a policy-as-code rule instead of a procedure document means the control gets checked on every deployment, not just when someone remembers to run the checklist.

What Version Control Practices Support IaC Compliance?

Every IaC template, every policy rule, and every pipeline configuration belongs in version control with the same review discipline applied to application code. That statement sounds obvious, yet the most common audit finding in regulated environments is still a manually applied change that never went through git at all.

Branch protection rules enforce this structurally. Require passing status checks, including policy evaluation, before any merge to a protected branch reaches production. Require at least one approving review from someone other than the author. Disable force pushes to branches that feed production deployments, since a rewritten history destroys the audit trail a reviewer relied on.

Commit messages and pull request descriptions function as informal compliance documentation when written with intention. A pull request that references the control ID a change addresses, or the ticket number authorizing an exception, turns git history into a searchable compliance record without any extra tooling.

Tagging and release conventions matter more in regulated programs than typical software projects. A tagged release that corresponds exactly to what got deployed, with the evidence bundle attached or linked, lets an auditor trace forward from a control requirement to the exact commit that satisfies it and backward from a deployed resource to the review that approved it.

Change management gets harder during emergency fixes, and that is exactly when compliance discipline tends to slip. Define an expedited review path in advance, one that still requires at least one approval and still generates evidence, rather than allowing a "just this once" exception that becomes the pattern every time deadline pressure hits.

What Version Control Practices Support IaC Compliance? — overview diagram

How Do IaC Compliance Tools Integrate With Cloud Governance Platforms?

Policy-as-code tools running in a CI/CD pipeline catch problems before deployment. Cloud governance platforms, like AWS Organizations with Service Control Policies or Azure Management Groups with Azure Policy, enforce boundaries at the account and subscription level regardless of what any individual pipeline does. Regulated programs need both, and the integration between them is where a lot of coverage gaps hide.

The practical pattern: pipeline-level policy checks catch a misconfiguration in a specific template before it merges. Account-level governance policies catch the same class of misconfiguration if it somehow reaches deployment anyway, whether through a bypassed pipeline, a manual console change, or a third-party integration that doesn't go through your CI/CD process at all.

Mapping the same control ID to both layers avoids a common failure mode where pipeline checks and account-level policies drift apart over time, each maintained by a different team with no shared source of truth. Store both policy sets in the same repository structure, even if they deploy through different mechanisms, so a single pull request can update the pipeline check and the account-level guardrail together.

Conformance packs in AWS Config and policy initiatives in Azure Policy group related controls into a single deployable unit, which matters when you're trying to prove a whole control family is enforced rather than individual rules scattered across dashboards. Our government multi-cloud governance guide walks through aggregating conformance pack results across accounts for programs running distributed infrastructure.

How Do You Sustain IaC Compliance Once the Pipeline Is Built?

The pipeline gets built once. Sustaining compliance is a longer, less technical problem, and it's the one most programs underestimate.

Training needs to reach beyond the DevSecOps team that built the pipeline. Developers who write Terraform or CloudFormation day to day need to understand what a policy failure actually means and how to fix it, not just that a red status check exists. A policy failure that returns a control ID and a one-line remediation suggestion teaches the developer something; a bare "FAILED" teaches them to ask someone else to fix it.

Ownership needs a name attached to it. Policy-as-code programs succeed or fail based on organizational alignment as much as tooling, which means someone specific needs to own each policy rule, review it on a schedule, and retire rules that no longer reflect current requirements. A policy set with no owner accumulates stale rules that developers learn to route around.

Executive sponsorship determines whether teams treat policy failures as blocking or as friction to negotiate away. A compliance lead without backing from program leadership will lose that negotiation eventually, usually right before a deadline, which is exactly when the exception matters most.

Process changes that stick tend to be small and specific: a required field in every pull request template referencing the control being addressed, a recurring calendar review of policy exceptions granted that month, a rotation for who presents evidence to the ISSO. None of these require new tooling. They require someone deciding they matter and checking that they happen.

Priorities for ISSOs and Engineering Leads

Start with a small policy set mapped to your highest-value controls, not a comprehensive rule library on day one. A program that ships ten well-mapped policies beats one that ships two hundred nobody trusts.

Tier enforcement deliberately. Blocking every failure regardless of severity trains developers to see the pipeline as an obstacle rather than a safeguard, and that resentment outlasts the pipeline itself. Pair every failure with a specific remediation path.

Governance is the part teams skip and later regret. Name a policy owner, get sponsorship above the engineering team, and set a real cadence for reviewing what the rules actually catch.

— Randy

How Primereadysub Supports Compliance-as-Code Programs

Primereadysub is the alternative to staff augmentation for agencies and prime contractors building compliance automation into their IaC pipelines. Rather than supplying bodies to sit inside your existing team, Primereadysub owns a defined scope, meaning the policy set, the pipeline integration, and the evidence output ship as a complete package with a clear delivery date and a clear owner.

That model fits the pattern this article describes: policy-as-code, shift-left scanning, and OSCAL-formatted evidence generation delivered as an outcome rather than a set of recommendations someone internal has to implement alone. The company holds certifications and works primarily with state agencies and prime contractors on compliance-heavy modernization programs.

If your program needs pipeline-generated evidence mapped to NIST or FedRAMP controls without adding headcount, visit the Primereadysub landing page to review case studies and request a scope conversation.

Sources

The Azure policy-as-code guide covers testing and enforcement workflow. AWS's FedRAMP 20x blog details multi-tool scanning. OWASP's IaC cheatsheet provides lifecycle best practices. ISPE's regulated-company guidance addresses validated environments.

FAQ

Can You Explain Infrastructure as Code in Simple Terms?

Infrastructure as code means defining servers, networks, and cloud resources in text files that a tool reads and deploys automatically, instead of clicking through a console by hand. The same file can be reviewed, versioned, and reused, which is what makes it possible to check compliance rules against it before anything gets deployed.

What Is the Most Widely Used IaC Tool?

Terraform is generally regarded as the most widely adopted IaC tool because it works across multiple cloud providers with one syntax, though AWS CloudFormation and Azure Bicep remain common for teams committed to a single cloud.

Is Kubernetes Considered Infrastructure as Code?

Kubernetes manifests function as infrastructure as code because they declare the desired state of workloads and infrastructure in version-controlled files, and tools like Kyverno apply the same policy-as-code enforcement model to them that Checkov or cfn-guard apply to Terraform and CloudFormation.

What Is a Concrete Example of IaC in a Regulated Environment?

A Terraform module that provisions an encrypted S3 bucket with a specific IAM policy, logging enabled, and a tag mapping it to a control ID is a working example. The same template runs through policy-as-code checks in CI before deployment, and its scan output feeds the OSCAL evidence bundle presented to an Authorizing Official.

How Do You Ensure Ongoing IaC Compliance Rather Than a One-Time Check?

Pair pre-deploy policy checks in CI/CD with post-deploy runtime monitoring through tools like AWS Config conformance packs, so drift gets caught after deployment as well as before it, with both feeding the same evidence pipeline.