→ Back to Home
Infrastructure as Code

Coder Registry Hijack Exposes Critical Blind Spots in Infrastructure as Code Supply Chains

A security disclosure by the Cloud Security Alliance detailed an infrastructure supply chain compromise where an attacker hijacked access to Coder's registry infrastructure via a compromised CDN API key. For an estimated 14-hour window, registry traffic was rerouted to deliver tampered, credential-harvesting Terraform modules. These poisoned modules were engineered to extract sensitive authentication data—including cloud provider access tokens, CI/CD pipeline secrets, SSH keys, and AI provider credentials—from environments where developer workspaces and agentic tooling were dynamically provisioned using those module definitions. This incident marks a dangerous escalation in IaC security threats. Infrastructure as Code codebases have historically enjoyed high levels of implicit trust inside continuous integration and workspace provisioning systems. Because provisioning tools such as Terraform and OpenTofu typically execute with elevated privileges across cloud accounts, injecting malicious code into an upstream module directly compromises the entire management plane. The exposure of AI model credentials and Model Context Protocol (MCP) tokens is particularly alarming, as modern cloud developer environments increasingly rely on autonomous coding agents that hold long-lived tokens with extensive resource access. The attack fits squarely into a broader pattern of software supply chain compromises shifting from application packages toward infrastructure orchestration artifacts. Over the past several years, platform engineering teams have aggressively standardized on remote module registries and automated workspace provisioning to accelerate developer velocity. However, security practices for IaC dependencies have consistently lagged behind application dependency scanning. While Software Bills of Materials (SBOMs) and cryptographic hash verification are routine for container images and binaries, Terraform modules are frequently consumed using unpinned remote sources or branch references without strict digest verification. Platform engineers and DevOps practitioners must immediately treat third-party IaC registries with zero trust. Organizations should audit their Terraform and OpenTofu configurations to ensure every external module reference is pinned to immutable commit hashes rather than floating tags or bare branch references. Furthermore, enterprise platform teams should mirror critical upstream modules into private, internally managed registries that enforce static analysis and signature verification prior to distribution. Finally, ephemeral developer environments and CI runners must adhere to strict least-privilege principles, employing short-lived, dynamically scoped credentials and runtime egress filtering to prevent unexpected outbound data exfiltration.
#infrastructure as code#terraform#cloud security#supply chain security#devops
Read original source