Skip to content

IaC rules

All 65 built-in rules untrust iacscan evaluates. The input format (Terraform plan JSON, CloudFormation, ARM, Bicep, GCP Deployment Manager or a Kubernetes manifest) is detected automatically.

Source

Generated from untrust 1.3.0 (commit 7ef462d9a0c3).

ARM template

Rule Cloud Resource Severity Requires How to fix Policy
IAC-AZ-KV-NETDENY Azure Microsoft.KeyVault/vaults high Default-deny network access Set properties.networkAcls.defaultAction to 'Deny' and allow only known networks.
IAC-AZ-KV-PURGE Azure Microsoft.KeyVault/vaults high Enable purge protection Set properties.enablePurgeProtection to true so keys cannot be permanently purged during the soft-delete window.
IAC-AZ-KV-SOFTDELETE Azure Microsoft.KeyVault/vaults medium Enable soft delete Set properties.enableSoftDelete to true to allow recovery of deleted keys.
IAC-AZ-STORAGE-HTTPS Azure Microsoft.Storage/storageAccounts high Require HTTPS-only storage traffic Set properties.supportsHttpsTrafficOnly to true.
IAC-AZ-STORAGE-NOPUBLIC Azure Microsoft.Storage/storageAccounts high Disable anonymous blob access Set properties.allowBlobPublicAccess to false.
IAC-AZ-VM-BOOTDIAG Azure Microsoft.Compute/virtualMachines high Confidential VM must not enable boot diagnostics A Confidential VM (securityProfile.securityType = ConfidentialVM) must not set diagnosticsProfile.bootDiagnostics.enabled: boot diagnostics backs the serial console and copies the guest console output/screenshots to a host-readable storage account. P-05
IAC-AZ-VM-DISKENC Azure Microsoft.Compute/virtualMachines high Confidential VM must encrypt its OS disk A Confidential VM must set storageProfile.osDisk.managedDisk.securityProfile.securityEncryptionType to DiskWithVMGuestState so the OS disk is encrypted. VMGuestStateOnly / NonPersistedTPM leave the OS disk in cleartext, and encryptionAtHost uses host-held keys; neither satisfies confidential OS-disk encryption. P-05
IAC-AZ-VM-SECUREBOOT Azure Microsoft.Compute/virtualMachines high Enable Secure Boot Enable securityProfile.uefiSettings.secureBootEnabled. P-05
IAC-AZ-VM-VTPM Azure Microsoft.Compute/virtualMachines high Enable vTPM Enable securityProfile.uefiSettings.vTpmEnabled. P-05

CloudFormation

Rule Cloud Resource Severity Requires How to fix Policy
IAC-CFN-01 AWS AWS::EC2::Instance high Require IMDSv2 (MetadataOptions.HttpTokens = required) Set Properties.MetadataOptions.HttpTokens to 'required' so IMDSv1 is rejected.
IAC-CFN-02 AWS AWS::EC2::Instance high Enable AMD SEV-SNP when CpuOptions declares it On a confidential instance set Properties.CpuOptions.AmdSevSnp to 'enabled'.
IAC-CFN-03 AWS AWS::EC2::Instance high Enable Nitro Enclaves when EnclaveOptions is declared On an enclave instance set Properties.EnclaveOptions.Enabled to true.
IAC-CFN-04 AWS AWS::EC2::LaunchTemplate high Require IMDSv2 in the launch template Set Properties.LaunchTemplateData.MetadataOptions.HttpTokens to 'required'.
IAC-CFN-05 AWS AWS::EC2::LaunchTemplate high Enable AMD SEV-SNP when the launch template declares CpuOptions Set Properties.LaunchTemplateData.CpuOptions.AmdSevSnp to 'enabled'.
IAC-CFN-06 AWS AWS::EC2::LaunchTemplate high Enable Nitro Enclaves when the launch template declares EnclaveOptions Set Properties.LaunchTemplateData.EnclaveOptions.Enabled to true.
IAC-CFN-07 AWS AWS::EC2::Instance high Confidential instance must encrypt its EBS volumes On a confidential EC2 instance (AMD SEV-SNP or Nitro Enclaves) set Ebs.Encrypted: true on every BlockDeviceMappings entry; memory encryption with a plaintext disk still leaks data at rest. P-05
IAC-CFN-08 AWS AWS::EC2::LaunchTemplate high Confidential instance must encrypt its EBS volumes (launch template) On a confidential launch template (AMD SEV-SNP or Nitro Enclaves) set Ebs.Encrypted: true on every LaunchTemplateData.BlockDeviceMappings entry; memory encryption with a plaintext disk still leaks data at rest. P-05

GCP Deployment Manager

Rule Cloud Resource Severity Requires How to fix Policy
IAC-GCPDM-BUCKET-PAP GCP storage.v1.bucket high Enforce public access prevention Set properties.iamConfiguration.publicAccessPrevention to 'enforced'.
IAC-GCPDM-BUCKET-UBLA GCP storage.v1.bucket medium Require uniform bucket-level access Set properties.iamConfiguration.uniformBucketLevelAccess.enabled to true.
IAC-GCPDM-CSDEBUG GCP compute.v1.instance high Confidential Space must not run the debug image Launch from the production Confidential Space image (not the confidential-space-debug variant) and keep tee-container-log-redirect off, so the operator cannot read the workload via serial console or redirected logs. P-05
IAC-GCPDM-CVM GCP compute.v1.instance high Enable Confidential VM Set properties.confidentialInstanceConfig.enableConfidentialCompute to true. P-05
IAC-GCPDM-INTEGRITY GCP compute.v1.instance medium Enable integrity monitoring Set properties.shieldedInstanceConfig.enableIntegrityMonitoring to true. P-05
IAC-GCPDM-SECUREBOOT GCP compute.v1.instance high Enable Secure Boot Set properties.shieldedInstanceConfig.enableSecureBoot to true. P-05
IAC-GCPDM-SERIAL GCP compute.v1.instance high Confidential VM must not expose the interactive serial console A Confidential VM (confidentialInstanceConfig.enableConfidentialCompute) must not enable the interactive serial console: remove the metadata item serial-port-enable or set it to false, so the operator has no console channel into the guest. Also ensure it is not enabled project-wide via commonInstanceMetadata. P-05
IAC-GCPDM-VTPM GCP compute.v1.instance high Enable vTPM Set properties.shieldedInstanceConfig.enableVtpm to true. P-05

Kubernetes

Rule Cloud Resource Severity Requires How to fix Policy
IAC-K8S-01 Kubernetes Pod high Confidential pod must use a confidential-containers runtimeClass Set spec.runtimeClassName to a confidential-containers runtime (kata-cc / kata-qemu-snp / kata-qemu-tdx).
IAC-K8S-02 Kubernetes Pod high Confidential pod must not run privileged containers Remove securityContext.privileged: true from every container of a confidential pod.
IAC-K8S-03 Kubernetes Pod medium Confidential pod must disable container privilege escalation Set securityContext.allowPrivilegeEscalation: false on every container.
IAC-K8S-04 Kubernetes Pod high Confidential pod must not mount hostPath volumes Remove hostPath volumes from a confidential pod; they breach the guest boundary.
IAC-K8S-05 Kubernetes Pod high Confidential pod must pin container images by digest Pin every container image by digest (repo@sha256:...); a mutable tag can be repointed after attestation.
IAC-K8S-06 Kubernetes Pod high Confidential pod must not share the host network namespace Remove spec.hostNetwork: true; host networking exposes the guest to the host network.
IAC-K8S-07 Kubernetes Pod high Confidential pod must not share the host PID namespace Remove spec.hostPID: true; a shared PID namespace lets host and guest see each other's processes.
IAC-K8S-08 Kubernetes Pod high Confidential pod must not share the host IPC namespace Remove spec.hostIPC: true; a shared IPC namespace breaches the guest/host boundary.
IAC-K8S-09 Kubernetes Pod high Confidential pod must bind an attestation policy Bind a Kata agent policy or initdata to the pod (e.g. the io.katacontainers.config.agent.policy annotation, or initdata); without one the guest runs the default permissive policy and the host can exec in and read secrets.
IAC-K8S-10 Kubernetes Pod high Confidential pod's inline agent policy must not be permissive Do not make a host request rule (exec, stream read/write, SetPolicyRequest, CopyFileRequest, AllowRequestsFailingPolicy) unconditionally true in the Kata agent policy; ship a restrictive policy, ideally via initdata so it is measured into the attestation evidence.

Terraform

Rule Cloud Resource Severity Requires How to fix Policy
IAC-AWS-01 AWS aws_instance high Require IMDSv2 tokens Set metadata_options.http_tokens to required. P-07
IAC-AWS-02 AWS aws_instance high Encrypt the root volume Set root_block_device.encrypted to true; review replacement impact.
IAC-AWS-03 AWS aws_instance medium Disable automatic public IPv4 assignment Set associate_public_ip_address to false for private workloads.
IAC-AZ-01 Azure azurerm_linux_virtual_machine high Confidential VM must enable Secure Boot and vTPM An azurerm_linux_virtual_machine that is a Confidential VM (os_disk.security_encryption_type set) must set secure_boot_enabled = true and vtpm_enabled = true; without both, the attestation root of trust is absent. P-05
IAC-AZ-02 Azure azurerm_linux_virtual_machine_scale_set high Confidential VM scale set must enable Secure Boot and vTPM An azurerm_linux_virtual_machine_scale_set that is a Confidential VMSS (os_disk.security_encryption_type set) must set secure_boot_enabled = true and vtpm_enabled = true; without both, the fleet's attestation root of trust is absent. P-05
IAC-AZ-03 Azure azurerm_linux_virtual_machine high Confidential VM must not enable boot diagnostics An azurerm_linux_virtual_machine that is a Confidential VM must not declare a boot_diagnostics block: it backs the serial console and copies the guest console output/screenshots to a host-readable storage account. P-05
IAC-AZ-04 Azure azurerm_linux_virtual_machine_scale_set high Confidential VM scale set must not enable boot diagnostics An azurerm_linux_virtual_machine_scale_set that is a Confidential VMSS must not declare a boot_diagnostics block: it backs the serial console and copies the guest console output/screenshots to a host-readable storage account. P-05
IAC-CS-DEBUGIMG GCP google_compute_instance high Confidential Space must not run the debug image Launch from the production Confidential Space image (not the confidential-space-debug variant) and keep tee-container-log-redirect off, so the operator cannot read the workload via serial console or redirected logs. P-05
IAC-CS-WIFBIND GCP google_iam_workload_identity_pool_provider high Confidential Space key release binds to a code measurement A Workload Identity Federation provider federating Confidential Space attestation tokens (oidc.issuer_uri = https://confidentialcomputing.googleapis.com) must set an attribute_condition that binds a code measurement: require assertion.dbgstat == 'disabled-since-boot' and pin assertion.submods.container.image_digest to the workload image. Binding only the audience or service account proves identity, not code — the same gap CSPACE-KEYBIND-01 fails at scan time.
IAC-CVM-EGRESS Azure azurerm_linux_virtual_machine high CVM network security groups deny outbound internet A Confidential VM (os_disk.security_encryption_type set) must block outbound internet egress on every network interface: Azure applies a default AllowInternetOutBound rule, so a NIC path is open unless the NIC NSG or the subnet NSG carries an explicit Outbound DENY that covers all of it — protocol *, destination port * (or 0-65535), a source that covers the VM (* or VirtualNetwork), and a destination that covers the internet for both families (the Internet/* service tag, or 0.0.0.0/0 AND ::/0) — and no Outbound ALLOW reopens the internet (allow destinations are unioned before the breadth test). Any service tag other than VirtualNetwork and AzureLoadBalancer counts as a broad public destination, so an allow to AzureCloud, Storage, Sql, EventHub, ServiceBus, AzureCosmosDB, AzureMonitor and the rest FAILs: service tags are tenant-agnostic, so a VM can exfiltrate released secrets to attacker-owned resources behind them. Restrict egress to the specific CIDRs the workload needs. Not evaluated at deploy time (the live Azure scan covers these) and read as SKIP, never a false pass: NSGs, NICs, subnets or rules supplied by a variable/module/data reference or not in the plan, masked/unknown-until-apply fields, count/for_each resources with more than one instance, an ASG source on a deny, and malformed destination CIDRs. Scope: only azurerm_linux_virtual_machine; Windows Confidential VMs (azurerm_windows_virtual_machine) and Confidential VM scale sets are not yet covered.
IAC-GCP-01 GCP google_compute_instance high Enable Secure Boot Enable Secure Boot with a compatible guest image. P-05
IAC-GCP-02 GCP google_compute_instance high Enable vTPM Set shielded_instance_config.enable_vtpm to true. P-05
IAC-GCP-03 GCP google_compute_instance medium Enable integrity monitoring Set shielded_instance_config.enable_integrity_monitoring to true. P-05
IAC-GCP-04 GCP google_compute_instance high Confidential VM must enable confidential computing A google_compute_instance that configures confidential_instance_config must turn confidential compute on: set enable_confidential_compute = true, or a confidential_instance_type of SEV, SEV_SNP, or TDX; otherwise the VM runs unprotected despite looking confidential. P-05
IAC-GCP-05 GCP google_compute_instance high Confidential VM must not expose the interactive serial console A google_compute_instance that is a Confidential VM (confidential_instance_config set) must not enable the interactive serial console: remove metadata["serial-port-enable"] or set it to false, so the operator has no console channel into the memory-encrypted guest. GCP disables it by default. P-05
IAC-GCS-UBLA GCP google_storage_bucket medium Require uniform bucket-level access Set uniform_bucket_level_access to true to disable per-object ACLs.
IAC-GKE-CONF GCP google_container_cluster high Enable Confidential GKE Nodes on the cluster A google_container_cluster that configures confidential_nodes must set confidential_nodes.enabled = true to enforce encryption of data in-use; otherwise the cluster's nodes are not confidential. P-05
IAC-GKE-NODE-CONF GCP google_container_node_pool high Enable Confidential GKE Nodes on the node pool A google_container_node_pool that configures node_config.confidential_nodes must set its enabled = true to enforce encryption of data in-use; otherwise the pool's nodes are not confidential. P-05
IAC-KMS-01 AWS aws_kms_key high No public principal on an attestation-gated KMS op Remove any Allow statement granting an attestation-gated KMS op (Decrypt, GenerateDataKey*, DeriveSharedSecret, ReEncryptFrom, CreateGrant, or kms:* / *) to a public principal (* / AWS:*, or Allow+NotPrincipal); scope the key to the enclave's execution role.
IAC-KMS-02 AWS aws_kms_key high No public principal on a KMS key Remove any Allow statement that grants a KMS action to a public principal (* / AWS:*, or Allow+NotPrincipal); scope every grant to specific principals. Unlike IAC-KMS-01 this applies to every key, not just attestation-gated ops.
IAC-KMS-ATTEST AWS aws_kms_key high Attestation-gated KMS op requires RecipientAttestation Bind every Allow statement granting an attestation-gated KMS op to a real code measurement via a kms:RecipientAttestation:* condition (ImageSha384/PCR0 or PCR8 with a non-zero value); never leave it unconditioned, all-zeros, or bound only to identity PCRs (PCR3/PCR4).
IAC-KMS-GRANT AWS aws_kms_grant high No attestation-gated KMS op in a grant on an enclave key Remove any attestation-gated KMS op (Decrypt, GenerateDataKey*, DeriveSharedSecret, ReEncryptFrom, CreateGrant) from an aws_kms_grant on an attestation-gated key: grants are evaluated independently of the key policy, so a gated op granted here bypasses the policy's RecipientAttestation condition. Release to the enclave through the key policy's attested statement, not a standing grant.
IAC-NITRO-01 AWS aws_instance high Enable Nitro Enclaves on an enclave host An aws_instance that configures enclave_options must set enclave_options.enabled = true; a host that declares Nitro Enclaves but leaves them disabled runs the workload outside any enclave.
IAC-NITRO-EGRESS AWS aws_security_group high Nitro enclave host security group restricts public egress In Terraform, a security group attached to a Nitro-enclave / confidential EC2 host must not allow egress to the public internet (0.0.0.0/0 or a broad range, on any protocol). Restrict egress to the specific endpoints the workload needs (KMS, your API) via narrow CIDRs or a VPC endpoint; broad egress is an exfiltration path for released secrets. Security groups supplied by a variable, module output, or data source, or the VPC default SG, are not evaluated at deploy time (the live AWS scan covers them); CloudFormation security groups are not yet covered.
IAC-NITRO-LT AWS aws_launch_template high Enable Nitro Enclaves on an enclave launch template An aws_launch_template that configures enclave_options must set enclave_options.enabled = true; an EKS node group or ASG using it otherwise launches instances with Nitro Enclaves off.
IAC-S3-01 AWS aws_s3_bucket_public_access_block high Restrict public bucket access Set restrict_public_buckets to true so a public bucket policy cannot grant access.
IAC-S3-WRITE AWS aws_s3_bucket_policy high No public write to the bucket Remove any Allow statement that lets a public principal (* / AWS:*, or Allow+NotPrincipal) write, delete, or rewrite the ACL/policy of the bucket (s3:PutObject, DeleteObject, PutObjectAcl, PutBucketPolicy, PutBucketAcl, or s3:* / *); scope those actions to specific principals.
IAC-SKR-POLICY Azure azurerm_key_vault_key high Secure Key Release policy must pin a measurement Give release_policy.json an authority whose allOf pins the attested environment (e.g. x-ms-sevsnpvm-measurement / x-ms-sevsnpvm-is-debuggable=false); a release policy with no claim conditions releases the key to anything the issuer attests.
IAC-TRAIL-01 AWS aws_cloudtrail high Enable CloudTrail log file validation Set enable_log_file_validation to true so trail logs are tamper-evident.
IAC-WIF-DIGEST GCP google_iam_workload_identity_pool_provider high Pin a Workload Identity Federation attribute condition Set attribute_condition to a CEL expression that pins the external identity (e.g. the repository and a ref/digest claim); without it the provider accepts any token the issuer signs.