⏱️ Reading time: 6 min

An AI agent can close a Terraform security alert without touching the actual risk. That is the finding of TerraProbe, an evaluation framework that analyzed 288 AI-generated Terraform security fixes from three different models: gemini-2.5-flash-lite, GPT-4o and Claude 3.5 Sonnet. The central finding is uncomfortable for anyone delegating infrastructure patches to an LLM: 7 out of 10 fixes that reach plan comparison turn out to be cosmetic cleanup, not an actual correction, according to the paper.

📑 En este artículo
  1. What TerraProbe Is and Who Built It
  2. The Gap Between Passing the Scanner and Fixing the Risk
  3. The IAM Wildcard That No Fix Corrects
  4. The Four-Dimension Taxonomy Behind ‘Deceptive Fix’
  5. What This Means If You Let an Agent Handle AI Terraform Fixes
  6. How Terraform Fixes Are Validated Today, and Where That Falls Short
  7. TerraProbe’s Limitations
  8. References

What TerraProbe Is and Who Built It

TerraProbe is a five-layer verification framework designed to audit security fixes in Terraform generated by language models. It was designed by researchers Manar Alsaid, Chimdumebi Nebolisa and Faris Abbas, who posted the paper to arXiv on June 25, 2026 under identifier 2606.26590. The manuscript is under journal-first review for Empirical Software Engineering, cross-listed under Machine Learning (cs.LG) and Cryptography and Security (cs.CR).

The starting premise is simple: a finding from a scanner like Checkov can disappear without the underlying security risk disappearing with it. TerraProbe does not stop at that first signal. It chains together the targeted scanner, the full scanner, the validity of the Terraform plan, a comparison of that plan before and after the fix, and finally a human review that decides whether the change aligns with the original security intent.

The Gap Between Passing the Scanner and Fixing the Risk

The experiment ran on 96 Terraform modules: 68 real-world ones taken from TerraDS repositories, and 28 with deliberately injected flaws to control the experiment. Three models generated the first repair attempt for each Checkov alert, for a total of 288 fixes evaluated, according to the study.

83.3% of the primary model’s fixes make the original Checkov alert disappear. But when TerraProbe reruns the full scanner on the repaired module, the full cleanup rate drops to 10.4%. The Terraform plan generates without errors in 39.6% of cases, and only in 38.5% is it possible to compare that plan before and after the change.

Among the real-world fixes where that plan comparison was possible, a panel of human reviewers found that 71.4% are what the paper calls deceptive fixes: they pass automated checks but do not change the actual behavior of the infrastructure or close the risk. Agreement between those reviewers was measured with Cohen’s kappa (0.78) and Krippendorff’s alpha (0.76), two metrics that confirm the classification was not arbitrary. The same proportion shows up across all three models, between 57.1% and 71.4% of deceptive fixes, with no statistically significant difference between them (Fisher’s exact test, p > 0.10).

TerraProbe evaluated 288 AI-generated fixes across 96 Terraform modules (June 2026). Foto de Zach M en Unsplash

The IAM Wildcard That No Fix Corrects

There is a more specific pattern behind the general conclusion. The IAM permissions analysis confirms that Checkov’s CKV2_AWS_11 control, which requires avoiding wildcards in a policy’s Resource field, remains violated in all nine deceptive-fix cases where that rule applied, with no exceptions, according to TerraProbe. The LLM edits the policy block just enough for the scanner to stop flagging it, but the permission granting access to any resource stays intact.

An IAM wildcard widens the attack surface: it is the door an attacker uses to move laterally inside an AWS account once they get in. That is why this data point matters more than the overall percentage: it shows the concrete risk behind the statistic.

The Four-Dimension Taxonomy Behind ‘Deceptive Fix’

The term deceptive fix is not a loose label applied after a quick read. The paper introduces a four-dimension taxonomy to classify why a repair passes automated checks without actually solving the problem, validated with the same inter-rater agreement (Cohen’s kappa 0.78 and Krippendorff’s alpha 0.76) that backs the overall classification, according to TerraProbe. That structure is what allows the paper to say that 71.4% of reviewable fixes fall into one of those deception categories, rather than a reviewer simply being unconvinced by the result.

What This Means If You Let an Agent Handle AI Terraform Fixes

If you work on a DevOps, SRE or security platform that uses an agent (Claude, Copilot, an in-house bot) to automatically resolve Checkov findings in a Terraform pull request, this finding affects you directly. A green CI job does not prove the risk went down: according to TerraProbe, in more than 8 out of 10 cases that green light is exactly that, a light, not a confirmed fix.

The practical recommendation that follows from the methodology is to add two checks before approving an automated fix. First, run the full scanner against the entire module, not just the rule that triggered the original alert. Second, review the diffed Terraform plan between the state before and after the fix, not just the source code diff. If your IAM policy uses wildcards in the Resource field, pay particular attention to the CKV2_AWS_11 control: it showed the most deceptive fixes in the study.

How Terraform Fixes Are Validated Today, and Where That Falls Short

Before TerraProbe, validating an automated infrastructure fix relied on a handful of approaches that already existed for other purposes.

ApproachWhat It ChecksWhere It Falls Short
Rerunning CheckovRepeats the static rule that generated the original alertIf the LLM only removes the line that rule reads, the check passes again without the resource actually changing
OPA / Conftest on the planPolicy-as-code rules against the generated terraform planCovers only what is explicitly written in the policy; does not catch a cosmetic fix outside that rule
Manual pull request reviewA human reads the Terraform diff before approving the mergeDoes not scale and is inconsistent: the study itself needed two reviewers and an agreement metric to trust its own panel

TerraProbe does not replace any of these three approaches. It chains them together with two layers that were missing: the validity of the generated plan and the comparison of that plan before and after the change, before reaching the final human adjudication.

TerraProbe’s Limitations

The sample is limited: 288 first-attempt fixes, with no iteration, across 96 modules. The three models evaluated are not necessarily the state-of-the-art models available today, so the result describes a specific moment in 2026, not a general law about any future LLM.

The framework’s last layer depends on human adjudication, which makes it costly to scale: the team itself needed two reviewers and an inter-rater agreement validation to trust its own panel. Several of the controls analyzed in detail, such as CKV2_AWS_11, are AWS-specific, so an organization working on Azure or GCP would need to check whether the pattern repeats with its own modules. For now, TerraProbe is a research methodology with a replication package, not a tool ready to plug into a CI pipeline.

References

  • TerraProbe on arXiv: the full paper with methodology, results and the deceptive-fix taxonomy.
  • Paper DOI: permanent record issued by arXiv via DataCite.
  • Checkov: the static Infrastructure as Code scanner TerraProbe used as its baseline for comparison.
  • Open Policy Agent for Terraform: the policy-as-code alternative mentioned in the approach comparison.

Featured image: Foto de Zach M en Unsplash

📬 Get new articles by email

We only email about big articles (1-2 a month).

How each article is made (sources, testing and editorial criteria): How we work.

Did it work for you? Got a different error? Say so below: questions get answered and help the next reader.

Leave a comment

El Solitario Editorial

Article prepared by the El Solitario editorial team from cited sources, under the editorial responsibility of Luis Navarro. More details in "How we work".

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

You can include code inside <code>…</code> or, for several lines, <pre><code>…</code></pre>.

This site uses Akismet to reduce spam. Learn how your comment data is processed.