AI coding agents speed up Terraform and Kubernetes authoring, but under context pressure they frequently ship subtle security regressions or skip optional local linters altogether. Two patterns show up repeatedly in PR reviews:
Indirect IAM privilege escalation across statements: Neither iam:PassRole nor lambda:CreateFunction looks like Action: "*" on its own, yet granting both on Resource: "*" lets any principal attach an admin role to a new Lambda function, EC2 instance, or ECS task.
EKS Pod host escape defaults: Generated manifests omit automountServiceAccountToken: false , mount hostPath volumes into pods, or request CAP_SYS_ADMIN capabilities.
Running one set of heuristics inside the developer's MCP server and a completely different scanner in CI creates drift. The agent thinks the diff is clean; CI rejects the PR 10 minutes later.
1.…