Infrastructure-as-Code changed how we deploy applications. Instead of manually configuring servers, we declare the desired state in YAML, HCL, or JSON files and let tools build the infrastructure. This is a massive improvement for consistency and repeatability — but it also means that security misconfigurations are now committed to repositories, reviewed in pull requests, and deployed systematically across every environment. A single insecure default in a Terraform module or Kubernetes manifest propagates to every deployment that uses it.
The Configuration Security Gap
Most IaC files are written by developers focused on functionality. They need the container to start, the port to be accessible, the database to connect. Security considerations — running as non-root, setting read-only filesystems, restricting network access, limiting resource consumption — are afterthoughts when they are considered at all. The defaults in most container images and IaC tools favour ease of use over security.
Consider a typical docker-compose.yml for a web application:
services:
app:
image: myapp:latest
privileged: true
ports:
- "3306:3306"
environment:
- DB_PASSWORD=production_password_123
This snippet contains four security issues: the container runs in privileged mode (giving it full host access), the database port is exposed to all interfaces, a production password is hardcoded in the file, and no resource limits prevent a compromised container from consuming all host resources. Each issue is individually dangerous; combined, they provide a direct path from application compromise to host takeover.
What the Scanner Detects
ShieldReport's IaC Scanner analyses manifest files for security anti-patterns across three platforms:
- Docker Compose: Privileged mode, host network mode, exposed ports on all interfaces (0.0.0.0), missing resource limits, hardcoded secrets in environment variables, writable root filesystem, and host path mounts to sensitive directories.
- Kubernetes: Missing security contexts, containers running as root, missing network policies, hostPath mounts, privileged pods, missing resource requests/limits, service accounts with excessive permissions, and exposed NodePort services.
- Terraform: Public S3 buckets, unencrypted storage volumes, security groups with 0.0.0.0/0 ingress, IAM policies with wildcard permissions, missing logging configurations, and unencrypted database instances.
Each finding includes the specific line number, severity, and a concrete fix — not just "this is wrong" but "change this value to this."
Shift Left: Scanning Before Deployment
The most expensive place to find a misconfiguration is in production. The second most expensive is in staging. The cheapest is at the time the code is written. IaC scanning in the development workflow — as part of code review or CI/CD — catches issues when the fix is a one-line change in a PR, not a production hotfix requiring change management approval.
Paste your Docker Compose, Kubernetes YAML, or Terraform file into ShieldReport's IaC Scanner and get immediate feedback on security issues — with specific line numbers, severity ratings, and exact fixes for each finding.