Infrastructure-as-Code (IaC) Security
O que é Infrastructure-as-Code (IaC) Security?
Infrastructure-as-Code (IaC) SecurityThe discipline of scanning, policy-checking, and securing IaC templates (Terraform, OpenTofu, Pulumi, CloudFormation, Helm, Kubernetes manifests) before they provision misconfigured cloud resources.
Infrastructure-as-Code (IaC) security treats declarative provisioning templates as a primary security artifact: most cloud misconfigurations now originate not from manual console edits but from Terraform, OpenTofu, Pulumi, AWS CloudFormation, Bicep, Helm, or raw Kubernetes manifests committed to a repo and applied by CI. Programs combine static analysis tools (Checkov, KICS, tfsec, Terrascan, Snyk IaC, Trivy config-scan), policy-as-code engines that enforce rules at plan-time (OPA/Rego, Conftest, HashiCorp Sentinel, Checkmarx Cloudguard, Wiz Code), drift-detection comparing live state to source-of-truth, and secret scanners that block hard-coded credentials in `.tf` and `values.yaml`. Increasingly, IaC security extends 'left' into developer workflows (IDE plugins, pre-commit hooks) and 'right' into runtime correlation (proving the deployed S3 bucket matches the reviewed module). Common findings include public S3 buckets, over-broad IAM `*`, missing encryption-at-rest, security groups open to 0.0.0.0/0, and Kubernetes pods running as root.
● Exemplos
- 01
A pull-request CI step runs Checkov against the Terraform plan and blocks a merge that would create an S3 bucket without server-side encryption.
- 02
An OPA policy denies any Kubernetes manifest that mounts the Docker socket or runs with `privileged: true`.
● Perguntas frequentes
O que é Infrastructure-as-Code (IaC) Security?
The discipline of scanning, policy-checking, and securing IaC templates (Terraform, OpenTofu, Pulumi, CloudFormation, Helm, Kubernetes manifests) before they provision misconfigured cloud resources. Pertence à categoria Segurança em nuvem da cibersegurança.
O que significa Infrastructure-as-Code (IaC) Security?
The discipline of scanning, policy-checking, and securing IaC templates (Terraform, OpenTofu, Pulumi, CloudFormation, Helm, Kubernetes manifests) before they provision misconfigured cloud resources.
Como funciona Infrastructure-as-Code (IaC) Security?
Infrastructure-as-Code (IaC) security treats declarative provisioning templates as a primary security artifact: most cloud misconfigurations now originate not from manual console edits but from Terraform, OpenTofu, Pulumi, AWS CloudFormation, Bicep, Helm, or raw Kubernetes manifests committed to a repo and applied by CI. Programs combine static analysis tools (Checkov, KICS, tfsec, Terrascan, Snyk IaC, Trivy config-scan), policy-as-code engines that enforce rules at plan-time (OPA/Rego, Conftest, HashiCorp Sentinel, Checkmarx Cloudguard, Wiz Code), drift-detection comparing live state to source-of-truth, and secret scanners that block hard-coded credentials in `.tf` and `values.yaml`. Increasingly, IaC security extends 'left' into developer workflows (IDE plugins, pre-commit hooks) and 'right' into runtime correlation (proving the deployed S3 bucket matches the reviewed module). Common findings include public S3 buckets, over-broad IAM `*`, missing encryption-at-rest, security groups open to 0.0.0.0/0, and Kubernetes pods running as root.
Como se defender contra Infrastructure-as-Code (IaC) Security?
As defesas contra Infrastructure-as-Code (IaC) Security costumam combinar controles técnicos e práticas operacionais, conforme detalhado na definição acima.
Quais são outros nomes para Infrastructure-as-Code (IaC) Security?
Nomes alternativos comuns: IaC scanning, Policy-as-Code for IaC, Terraform security.
● Termos relacionados
- cloud-security№ 209
Má configuração na nuvem
Falha de segurança causada por configurações incorretas ou inseguras de serviços cloud, como armazenamento exposto, políticas IAM fracas ou portas de gestão abertas.
- cloud-security№ 280
CSPM (Cloud Security Posture Management)
Categoria de ferramentas que avaliam continuamente contas de nuvem face a boas práticas e referenciais de conformidade para detetar e corrigir configurações incorretas.
- cloud-security№ 939
Política como Código
Prática de definir regras de segurança, conformidade e governança em código legível por máquina para que sejam versionadas, testadas, revistas e aplicadas automaticamente.
- cloud-security№ 848
OPA (Open Policy Agent)
Motor de políticas generalista, graduado pela CNCF, que desacopla decisões de autorização das aplicações e do controlo de admissão do Kubernetes usando a linguagem Rego.
- cloud-security№ 1103
Segurança como Código
Prática de exprimir controlos, testes e infraestrutura de segurança como código-fonte para que sejam versionados, revistos, automatizados e entregues continuamente com as aplicações.
- appsec№ 1145
Shift-Left Security
Prática de antecipar as atividades de segurança no ciclo de vida do software para encontrar e corrigir vulnerabilidades antes que o código chegue à produção.