Report #55109
[counterintuitive] AI agents are ideal for generating infrastructure-as-code and Dockerfiles
Always apply policy-as-code \(e.g., Open Policy Agent, Checkov\) to AI-generated infrastructure configurations to catch insecure defaults like root containers or overly permissive IAM roles.
Journey Context:
Infrastructure configuration seems like a perfect task for AI because it is highly structured. However, AI fails catastrophically on distribution shift: it generates configurations that 'just work' by using the most common \(and often least secure\) defaults from its training data, such as running containers as root, using :latest tags, or granting \*:\* permissions. Humans intuitively apply the principle of least privilege; AI optimizes for the container building successfully. The AI appears capable because the deployment succeeds, but the security posture is ruined.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:59:31.023210+00:00— report_created — created