🚀 CloudSEK featured in the 2026 Frost Radar™!
Read more
Infrastructure-as-Code security is the practice of enforcing security requirements inside infrastructure definitions, correcting misconfigurations and excess privileges before deploying cloud infrastructure.
CloudSEK's investigation into the March 2026 LiteLLM supply chain compromise identified more than 2,500 organizations and roughly 434,000 CI/CD pipelines potentially exposed. Harvested material covered AWS, Google Cloud, and Azure credentials, SSH keys, Kubernetes tokens, and pipeline secrets.
Pipelines that build infrastructure hold the credentials that create it. Template scanning that stops at the template leaves the most privileged component in the delivery chain unexamined, which is where the last two years of cloud incidents have concentrated.
IaC security operates at five gates between an engineer writing a template and an existing cloud resource. Each gate catches a different class of problem, and skipping one pushes its findings downstream into production.
Infrastructure-as-Code security works by parsing template files into a resource model, evaluating that model against security policy, and returning a pass or fail verdict the pipeline acts on.
Scanners parse Terraform, CloudFormation, Kubernetes manifests, Helm charts, ARM, Bicep, and Dockerfiles into a structured representation of resources and attributes. Rules then test that representation for public exposure, missing encryption, permissive ingress, and unmanaged identity permissions.
File-level analysis misses risk that only appears when resources reference each other. Graph evaluation follows those references, so a bucket that looks private in isolation gets flagged once a policy attached elsewhere grants public read, and plan-aware analysis resolves variables and module inputs before judging the final configuration.
Open Policy Agent and its Rego language express organizational requirements as executable policy, evaluated by Conftest against Terraform plans, Kubernetes manifests, and JSON configuration. Policy expressed this way is versioned, reviewed, and tested like any other code in the repository.
Terraform state records every attribute of every managed resource, including database passwords and generated keys, in plain text. State belongs in an encrypted remote backend with access restricted to the deployment role, and credentials belong in a secrets manager referenced at runtime. CloudSEK's investigation into public Postman workspaces found more than 30,000 leaking access tokens and API keys, the same failure mode transferred to a different artifact. Leaked API keys behave identically whether they escape through a shared collection or a committed state file.
Environments diverge from their definitions through emergency console changes, automated remediation, and vendor-side defaults. Drift detection compares live configuration against committed code and reports the difference, which restores the assumption that reviewing the template tells anyone what is running.
Insecure infrastructure code introduces seven risks that scale with every reuse of the template. OWASP catalogues the pipeline half of this problem in its Top 10 CI/CD Security Risks, covering dependency chain abuse, poisoned pipeline execution, and insufficient pipeline access control.
Infrastructure-as-Code security matters because one insecure attribute in a reused template becomes the same insecure attribute in every environment built from it. Correction at the definition stage carries five effects that post-deployment tooling cannot reproduce.

Checkov, Trivy, and KICS carry active maintenance through 2026, and each covers a different span of template formats. Several tools on older comparison lists have since been archived or folded into other projects, and pipeline coverage degrades quietly when a frozen scanner keeps returning green.
Tool choice matters less than where the gate sits in the delivery sequence. A scanner running only on a nightly schedule reports findings after deployment, converting a preventive control into a slower version of posture management.
Security scanners hold a privileged position in the pipeline, with simultaneous access to cloud credentials, repositories, and container infrastructure. That position made them a target in March 2026.
On March 19, the TeamPCP group force-pushed malicious code into 76 of 77 tags of the aquasecurity/trivy-action GitHub Action and all seven tags of aquasecurity/setup-trivy, alongside a trojanized Trivy binary. Four days later, credentials harvested from that compromise were used against Checkmarx, poisoning the kics-github-action and ast-github-action workflows. The Trivy incident carries CVE-2026-33634 at CVSS 9.4 and reached CISA's Known Exploited Vulnerabilities catalog within days.
Payloads in each wave scraped runner memory for cloud provider credentials, Kubernetes tokens, SSH keys, and pipeline secrets. Stolen tokens then reached LiteLLM's PyPI publishing pipeline, producing the AI supply chain exposure CloudSEK documented across 2,500 organizations. Every wave in that cascade entered through a tool teams had installed to improve security, which reframes supply chain defense as a pipeline problem before it is a vendor problem.
Mutable tags supply the mechanism behind every wave in that cascade. An Action referenced as v0.34.2 resolves to whatever commit the tag currently points at, and a force-push silently changes what runs. Pinning to a full commit SHA removes that pathway entirely.
IaC security prevents insecure configurations from reaching a cloud account, and CSPM finds them once they arrive. Runtime cloud security handles what happens after that, and a working program funds all three.
A program that blocks risk differs from one producing advisory reports across practices. Enforcement placement carries more weight in that difference than scanner selection does.
IaC security identifies insecure configurations before deployment. However, secure IaC templates do not guarantee a secure production environment. Manual changes, configuration drift, shadow assets, and resources created outside IaC workflows can introduce exposures that the original code does not capture.
CloudSEK BeVigil complements IaC security by continuously monitoring the external attack surface after deployment. It discovers internet-facing assets and identifies vulnerabilities and misconfigurations across cloud infrastructure, web applications, APIs, DNS, SSL, networks, and other exposed services.
This provides an outside-in validation layer. IaC scanners such as Checkov, Trivy, and KICS assess infrastructure definitions before deployment. BeVigil assesses the deployed environment and shows what is externally exposed. It can identify configuration drift, forgotten assets, exposed services, cloud misconfigurations, and other potential initial-access vectors that may not appear during template review.
Together, these controls cover both infrastructure intent and outcome: IaC security reduces risk before deployment, while BeVigil verifies that the live external attack surface remains consistent with the intended secure configuration.
No. Any team provisioning cloud resources through automation replicates a misconfiguration across every environment that reuses the template.
No. Console-created and manually provisioned resources appear in no template, so drift detection and external scanning remain necessary alongside template review.
Both. Engineering teams author the definitions and fix findings, while security defines the policy set and the severity threshold that blocks a build.
No. Scans complete in seconds against a template, and correcting a configuration before provisioning costs far less time than remediating a live resource.
Yes. Checkov, Trivy, and KICS include secret detection, though they catch only what reaches the repository and not values held in excluded variable files.
Yes. Versioned policy files, scan results, and pipeline logs document which control ran against which change, and when it blocked a deployment.
