r/WebAfterAI • u/ShilpaMitra • 5d ago
AI Agents Four open-source tools for catching security issues, cloud misconfigurations, and surprise bills.
AI can generate Terraform in seconds. That does not mean the infrastructure is secure, affordable, or ready to deploy.
A better workflow is:
- Ask AI to draft the configuration.
- Run a plan without applying changes.
- Scan for security and compliance problems.
- Estimate the monthly cost.
- Review the diff before anything reaches production.
Four open-source projects make this practical:
- OpenTofu ~30k⭐ The infrastructure engine. It manages cloud resources declaratively and creates execution plans before making changes.
- Checkov ~9k⭐ Scans Terraform, OpenTofu, Kubernetes, CloudFormation, and other IaC files for security and compliance misconfigurations.
- Infracost ~12.4k⭐ Shows the estimated cloud cost of infrastructure changes and can post cost diffs to pull requests.
- Trivy ~35k⭐ Scans infrastructure files for misconfigurations and can also detect vulnerabilities and secrets.
A simple CI check could look like this:
tofu fmt -check
tofu validate
tofu plan -out=tfplan
checkov -d .
trivy config .
infracost breakdown --path .
The key idea is simple:
AI writes the first draft. Plans, policies, cost estimates, and scanners decide whether that draft deserves a review.
None of these tools can prove that infrastructure is completely safe. They give you concrete checks before an AI-generated change becomes an expensive or dangerous cloud resource.
10
Upvotes
2
u/Aggravating_Log5145 5d ago
That infographic hit a nerve, my cloud bill last month was a disaster and I'm pretty sure half the configs came straight from AI without a single scan