{"id":4649,"date":"2026-07-24T06:05:18","date_gmt":"2026-07-24T06:05:18","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2026\/07\/24\/ai-agents-are-writing-your-infrastructure-code-is-anyone-governing-it\/"},"modified":"2026-07-24T06:05:18","modified_gmt":"2026-07-24T06:05:18","slug":"ai-agents-are-writing-your-infrastructure-code-is-anyone-governing-it","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2026\/07\/24\/ai-agents-are-writing-your-infrastructure-code-is-anyone-governing-it\/","title":{"rendered":"AI Agents Are Writing Your Infrastructure Code. Is Anyone Governing It?"},"content":{"rendered":"<div><img data-opt-id=53616897  fetchpriority=\"high\" decoding=\"async\" width=\"770\" height=\"330\" src=\"https:\/\/devops.com\/wp-content\/uploads\/2026\/07\/ai_infrastructure_governance_770x330.jpg\" class=\"attachment-large size-large wp-post-image\" alt=\"\" \/><\/div>\n<p><img data-opt-id=782228988  fetchpriority=\"high\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/devops.com\/wp-content\/uploads\/2026\/07\/ai_infrastructure_governance_770x330-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail wp-post-image\" alt=\"\" \/><\/p>\n<p><a href=\"https:\/\/devops.com\/the-rise-of-coding-assistants-supercharging-developer-productivity\/\" target=\"_blank\" rel=\"noopener\">AI agents and coding assistants<\/a> now generate a growing share of the Terraform, Kubernetes and cloud configuration code running in production, but the security quality of that code has not improved in step with its volume. <a href=\"https:\/\/www.veracode.com\/blog\/spring-2026-genai-code-security\/\" target=\"_blank\" rel=\"noopener\">Veracode\u2019s Spring 2026 GenAI Code Security Update<\/a> found that only 55% of AI code-generation tasks produce secure code out of the box, a number that has barely moved in two years, even as syntax correctness surpassed 95%. For platform engineering, DevOps and SRE teams, that gap between \u2018it compiles\u2019 and \u2018it\u2019s safe to run\u2019 is quickly becoming the defining infrastructure risk of 2026.<\/p>\n<p>This is not a hypothetical concern. It\u2019s showing up in the numbers, in the incident reports and in the conversations platform teams are having right now about who or what is actually allowed to touch production infrastructure.<\/p>\n<h3>Infrastructure Code Volume is Exploding, AI is Driving It<\/h3>\n<p>Infrastructure as code (IaC) used to be authored almost entirely by humans, reviewed by humans and merged by humans. That model is breaking down. As generative AI (GenAI) tools embed themselves into developer workflows, teams are generating infrastructure definitions faster than review processes were ever designed to handle. Recent platform engineering research found that 71% of cloud teams have seen a measurable increase in IaC volume directly attributable to GenAI (<a href=\"https:\/\/www.env0.com\/insights\/iac-governance-tools-in-2026-policy-as-code-drift-detection-and-what-platform-teams-actually-use\" target=\"_blank\" rel=\"noopener\">env0, 2026<\/a>).<\/p>\n<p>That volume increase would be manageable if AI-generated infrastructure code were reliably safe. It isn\u2019t. <a href=\"https:\/\/devops.com\/giving-ai-agents-the-keys-to-real-infrastructure\/\" target=\"_blank\" rel=\"noopener\">DevOps.com<\/a> recently highlighted this exact mismatch, noting that \u201cAI coding assistants can generate pull requests faster than most teams can review them, and that mismatch is creating a new kind of bottleneck across engineering organizations.\u201d Engineering leaders are left with two bad options: Slow everything down to manually review every AI-generated change or accept a growing volume of unreviewed risk moving into production.<\/p>\n<p>Platform engineering was already becoming the default operating model for managing this kind of complexity. <a href=\"https:\/\/www.gartner.com\/en\/infrastructure-and-it-operations-leaders\/topics\/platform-engineering\" target=\"_blank\" rel=\"noopener\">Gartner<\/a> projects that <em>80% of large software engineering organizations will have dedicated platform engineering teams by 2026<\/em>, up from roughly 45% in 2022. This shift was originally driven by developer self-service and toolchain consolidation. In 2026, governing AI-generated infrastructure has become just as central to platform teams\u2019 mandate.<\/p>\n<h3>What the Data Actually Shows About AI-Generated Infrastructure Code<\/h3>\n<p>It\u2019s worth being precise about where AI models fail, because not every vulnerability class is equally likely. Veracode\u2019s testing \u2014 run across 80 coding tasks, four languages and four critical vulnerability categories, evaluated against more than 150 large language models (LLMs) \u2014 found sharply uneven results:<\/p>\n<p>SQL Injection (CWE-89): 82% secure \u2014 models handle well-known, heavily documented patterns reasonably well.<\/p>\n<p>Insecure Cryptographic Algorithms (CWE-327): 86% secure \u2014 another \u2018easy win\u2019 category models have learned to avoid.<\/p>\n<p>Cross-Site Scripting (CWE-80): 15% secure \u2014 a persistent failure point.<\/p>\n<p>Log Injection (CWE-117): 13% secure \u2014 the single worst-performing category, and one directly relevant to logging and observability configuration in infrastructure code.<\/p>\n<p>Model size barely moves the needle. Even flagship 2026 releases \u2014 GPT-5.1 and 5.2, Gemini 3 and Claude 4.5 and 4.6 \u2014 cluster around the same 55% overall security pass rate as their predecessors. The one meaningful exception is reasoning-focused models, which reach 70\u201372%, still short of what most security teams would consider acceptable for unreviewed production deployment.<\/p>\n<p>This pattern maps directly onto infrastructure code. Identity &amp; access configuration is exactly the kind of \u2018contextual reasoning\u2019 problem the Veracode report flags as an LLM weak point, since it requires tracking how permissions and data flow across dozens of resources rather than pattern-matching a single line. That helps explain the documented rise in identity-related misconfigurations in AI-assisted environments, the same general class of issues implicated in a large share of cloud security incidents industry-wide. When AI agents are the ones defining identity &amp; access management (IAM) roles, security groups and network policies at scale, the cost of getting this wrong compounds fast.<\/p>\n<p>The financial exposure is well quantified. IBM and the Ponemon Institute\u2019s <a href=\"https:\/\/www.ibm.com\/reports\/data-breach\" target=\"_blank\" rel=\"noopener\">Cost of a Data Breach Report 2025<\/a>, which is based on 600 breached organizations, found that <em>breaches spanning multiple environments cost <\/em><em>a<\/em><em>n average<\/em><em> of<\/em> <em>$5.05 million to resolve<\/em>, while public cloud breaches average $4.18 million and cross-environment incidents take 276 days to identify and contain, 59 days longer than on-premises breaches. Every one of those breaches started with a configuration that someone or something created and nobody governed.<\/p>\n<h3>Why This is a Platform Team Problem, Not Just an AppSec One<\/h3>\n<p>It\u2019s tempting to file \u2018AI writes insecure code\u2019 under application security and move on. That framing misses what\u2019s actually happening in infrastructure, specifically. Application code vulnerabilities are typically confined to a single service. Infrastructure code vulnerabilities \u2014 an overly permissive IAM policy, an open security group, a misconfigured storage bucket \u2014 can expose an entire environment.<\/p>\n<p>That\u2019s precisely why platform engineering, not just AppSec, has to own this problem. Platform teams are the ones who define the paved road: The templates, modules and guardrails that determine what \u2018correct\u2019 infrastructure looks like before a single line of Terraform gets written, whether by a human or an agent. Gartner\u2019s platform engineering guidance is explicit that internal platforms exist to give developers safe, reviewed defaults rather than open-ended tooling access, and that mandate now has to extend to AI agents as first-class consumers of the platform, not exceptions to it.<\/p>\n<p>The industry data on infrastructure drift reinforces why \u2018review after the fact\u2019 isn\u2019t sufficient. The <a href=\"https:\/\/dora.dev\/research\/2023\/\" target=\"_blank\" rel=\"noopener\">DORA 2023 State of DevOps Report<\/a> found <em>that teams experiencing frequent configuration drift had 2.3 times higher change failure rates<\/em> than teams with consistent IaC hygiene. AI-generated infrastructure changes, applied quickly and often outside a slow, deliberate review cycle, are a direct accelerant for exactly this kind of drift.<\/p>\n<h3>What Governance Actually Looks Like for Agent-Generated Infrastructure<\/h3>\n<p>Governing AI-generated infrastructure code in 2026 looks different from the manual code review model most teams still default to. Four capabilities now show up consistently in mature platform engineering practices:<\/p>\n<ul>\n<li>Policy as Code Enforced Before Generation, not After: Waiting for a CI\/CD pipeline to catch a policy violation means an engineer or an agent has already spent cycles producing code that gets rejected. Teams using pre-plan policy validation with tools such as HashiCorp Sentinel report a 45% reduction in policy violation-related build failures compared to teams enforcing policy only after the plan stage. The lesson generalizes directly to AI-generated infrastructure: Constraints belong upstream of generation, not downstream of it.<\/li>\n<li>RBAC and Identity Scoping That Treats Agents as First-Class Actors: Mature platforms are extending role-based access control (RBAC), resource quotas and audit logging to AI agents the same way they would to a new hire \u2014 with scoped permissions, not blanket production access. This matters because a significant share of developers reportedly fails to adjust default permission scopes in AI-generated code before deployment, a pattern that becomes far riskier when the \u2018developer\u2019 is an autonomous agent operating at machine speed.<\/li>\n<li>Continuous Drift Detection With Automated Correction, not Just Alerts: The days of drift detection tools that simply notify a human and wait are ending. Platform teams increasingly expect infrastructure to self-correct: Reverse unauthorized changes, reconcile state automatically and flag only the exceptions that genuinely require judgment.<\/li>\n<li>Compliance Validation Built Into the Generation Step Itself: Rather than generating infrastructure code and then scanning it for problems, the more resilient pattern is validating intent against organizational policy at the moment of generation, so the code that comes out the other side is compliant by construction, not by correction.<\/li>\n<\/ul>\n<h3>Closing the Gap: Governing Infrastructure From Intent<\/h3>\n<p>This is the exact problem StackGen\u2019s intent-to-infrastructure platform was built to address. Instead of treating AI-generated Terraform and Kubernetes manifests as raw output that still needs a separate governance layer bolted on afterward, StackGen translates infrastructure intent \u2014 expressed in natural language or high-level policy \u2014 directly into infrastructure code that is validated against organizational security and compliance standards as it\u2019s generated, not after the fact.<\/p>\n<p>That distinction matters given what the Veracode data shows: Security failures cluster in exactly the areas requiring contextual, cross-resource reasoning \u2014 identity, access scope, log handling \u2014 rather than isolated syntax errors a linter would catch. StackGen\u2019s approach pairs generation with policy enforcement so that platform teams retain control over what \u2018correct\u2019 infrastructure looks like, while developers and AI agents alike can request infrastructure without needing to be Terraform or IAM experts themselves. Role-specific capabilities \u2014 including Aiden for Platform Engineering and Aiden for Governance \u2014 extend this further into drift detection, remediation and continuous compliance, so infrastructure stays aligned with policy long after the initial deployment, whether the original change came from a person or an agent.<\/p>\n<h3>A Practical Checklist for Governing AI-Generated Infrastructure<\/h3>\n<p>For platform, DevOps and SRE teams evaluating where they stand today, five questions are worth answering honestly:<\/p>\n<ol>\n<li>Can you identify which infrastructure changes in the last quarter were AI-generated? If the answer is no, you have a visibility gap before you have a governance gap.<\/li>\n<li>Do AI agents operate under the same RBAC and quota constraints as your most junior engineer, or do they have broader effective access?<\/li>\n<li>Is policy validated before infrastructure code is generated, or only after it\u2019s submitted for review?<\/li>\n<li>Does your drift detection auto-remediate, or does it just add another alert to an already-saturated queue?<\/li>\n<li>Could you produce an audit trail today showing who or what approved a specific production infrastructure change?<\/li>\n<\/ol>\n<p>Teams that can\u2019t answer all five confidently aren\u2019t behind because AI adoption outpaced them technically. They\u2019re behind because governance was designed for a world where every infrastructure change had a human name attached to it. That world is already gone for a meaningful share of production changes, and that\u2019s where StackGen\u2019s Aiden for Infrastructure helps create infrastructure, keeping these guardrails.<\/p>\n<h3>Frequently Asked Questions<\/h3>\n<ul>\n<li>Can AI agents write secure infrastructure code?<\/li>\n<\/ul>\n<p>Not reliably without guardrails. Veracode\u2019s 2026 testing found that AI models produce secure code in only about 55% of generation tasks overall, with particularly weak performance on vulnerability classes that require contextual reasoning, such as identity &amp; access configuration.<\/p>\n<ul>\n<li>What is infrastructure-from-code governance?<\/li>\n<\/ul>\n<p>Infrastructure-from-code governance refers to enforcing security, compliance and access policies at the moment infrastructure code is generated \u2014 whether by a human or an AI agent \u2014 rather than relying solely on post hoc review or scanning.<\/p>\n<ul>\n<li>Why does platform engineering matter for AI infrastructure risk?<\/li>\n<\/ul>\n<p>Platform engineering teams define the templates, guardrails and self-service workflows that determine what infrastructure gets deployed. As AI agents generate a growing share of that infrastructure, platform teams are the natural owners of the policy layer that governs agent behavior.<\/p>\n<ul>\n<li>What\u2019s the business cost of ungoverned AI-generated infrastructure?<\/li>\n<\/ul>\n<p>According to IBM and the Ponemon Institute\u2019s Cost of a Data Breach Report 2025, breaches spanning multiple cloud environments cost an average of $5.05 million and take 276 days to identify and contain, underscoring the financial stakes of ungoverned configuration drift.<\/p>\n<h3>The Bottom Line<\/h3>\n<p>AI has already changed who or what is writing infrastructure code. It hasn\u2019t yet changed how that code gets governed at most organizations, and that gap is where the next wave of cloud incidents will come from. Platform teams that extend policy as code, RBAC and continuous compliance to AI agents now \u2014 rather than treating agent-generated infrastructure as a special case \u2014 will be the ones who capture AI\u2019s productivity gains without inheriting its security debt.<\/p>\n<p><a href=\"https:\/\/devops.com\/ai-agents-are-writing-your-infrastructure-code-is-anyone-governing-it\/\" target=\"_blank\" class=\"feedzy-rss-link-icon\">Read More<\/a><\/p>\n<p>\u200b<\/p>","protected":false},"excerpt":{"rendered":"<p>AI agents and coding assistants now generate a growing share of the Terraform, Kubernetes and cloud configuration code running in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4650,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-4649","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/4649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/comments?post=4649"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/4649\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media\/4650"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=4649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=4649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=4649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}