## Live cluster maps help language models fix cloud flaws without breaking software

URL: https://theprimary.com/ai-tech/2026-12-04/kubernetes-llm-security-repairs
Published: 2026-12-04T13:59:36.022Z
Updated: 2026-12-04T13:59:37.813Z
Category: AI-Tech

Automated security repairs risk severing critical network paths and crashing services unless language models receive real-time maps of how software components interact across a running cluster.

Modern software rarely runs as a single, self-contained engine. Instead, developers divide large programs into dozens or hundreds of independent components called microservices, each running inside a lightweight software wrapper called a container. To coordinate these swarms of software across server farms, companies rely on an orchestration platform called Kubernetes. The platform schedules workloads, groups containers into operational units called pods, isolates distinct environments into boundaries called namespaces, and provides a unified configuration language that dictates which workloads can talk to each other, what privileges they hold, and which secret keys they can read.

Because a single cluster can involve thousands of interdependent configuration settings, managing security posture by hand has become nearly impossible. A small error, such as granting excessive operating system privileges to a web server or leaving an internal database open to arbitrary connections, provides an opening for intruders. In recent years, engineering teams have started using automated scanners to flag these flaws and have turned to large language models to write configuration repairs automatically. Language models can draft configuration files in seconds, suggesting fixes that strip risky permissions and enforce strict security baselines.

Yet these automated repairs frequently create a quiet catastrophe across live networks. Farooq Shaikh, a computer science researcher at Dynatrace Research in Linz, Austria, posted a study on August 31, 2026, to the open-access preprint server arXiv, investigating why language models struggle to patch cloud environments. The core problem is that an automated security scanner assesses each software deployment in isolation, pointing out an insecure parameter without knowing how that workload interacts with other services across the cluster. When an automated language model attempts to fix the isolated flaw using general security best practices, it often breaks the application it intended to protect.

## Why do standard security patches break running systems?

Security patches break running systems because a configuration change applied to a single component can unintentionally dismantle the runtime dependencies that neighbouring applications rely on to function. In a distributed cloud environment, software components form a fragile, interconnected web. An individual service must bind to a network port to listen for incoming requests, exercise specific operating system privileges to start its processes, retrieve shared cryptographic tokens to authenticate with internal partners, and send outbound traffic across the internal network.

When a security scanner detects that a container holds broad privileges, it flags the issue as a violation of basic hardening guidelines. If an automated model receives this scanner alert in isolation, it reliably applies textbook security logic: it strips away the broad privileges, restricts outgoing network traffic, or deletes overly permissive access rules. In doing so, the model achieves static security compliance, clearing the alert from the scanner dashboard. However, the service stripped of its port-binding privileges can no longer start, a restrictive network firewall rule suddenly blocks outgoing calls to downstream databases, and a severed access rule prevents the application from reading its required credentials.

Computer scientists call the unintended operational damage caused by such repairs the functional blast radius, distinguishing it from an attack blast radius that measures how far an intruder can penetrate. In a complex application like a hospital claims system, an automated fix might successfully close a security loophole on an internet-facing portal while simultaneously crashing laboratory communications, pharmacy orders, and payment settlements. Because traditional security scanners evaluate static manifest text rather than live runtime execution, they remain blind to these cascading failures.

The underlying reason for this blind spot stems from how models behave without operational context. Farooq, explaining the failure mechanism in response to questions from Primary, noted that without a connection map, a language model lacks cluster-specific facts to guide its generation. Consequently, it defaults to plausible-looking fixes from its training data, such as inventing non-existent secret identifiers, dropping all operating system capabilities, or applying default-deny network rules that eliminate alerts while severing vital operational links. Farooq said the topology map provides the model with the exact information it needs to provide the most secure fix while preserving connectivity.

## How does runtime topology change automated repairs?

Runtime topology changes automated repairs by providing language models with an operational map of live service calls, open ports, and required access credentials before any code is generated. To evaluate whether this operational context could prevent broken deployments, Shaikh built an experimental system called KuTIE, short for Kubernetes Topology Intelligence Engine. The system extracts a live snapshot of cluster activity to guide both the prioritization of security threats and the generation of configuration repairs.

To assemble this live operational map without requiring complex modifications to individual applications, the system gathers telemetry from an internal networking layer known as a service mesh. Using request counters exported by the Istio service mesh into a monitoring system called Prometheus, the engine reconstructs directed communication edges between services across a five-minute observation window. It pairs these live network traces with security audit reports generated directly within the cluster by Trivy Operator, an open-source tool developed by Aqua Security that audits running resources against standard hardening benchmarks. A normalization table aligns Kubernetes internal object identifiers with Prometheus network labels, ensuring that configuration resources and live network traffic point to the exact same software components.

To address the challenge of tracking short-lived or dynamically generated pods during rolling application updates, the system organizes its graph above the ephemeral container level. Farooq told Primary that the graph aggregates Istio request counters into edges between workload identities rather than individual pod instances. Because the name resolution map keys on stable workload names, rolling updates alter the underlying pods without disrupting the recorded communication edges between services, though Farooq acknowledged that the implementation has not been evaluated against genuine label schema changes where object mappings alter fundamentally.

The system then feeds these combined data streams into an attack graph, weighting paths by the severity of scanner findings across multi-hop network chains. To prioritize remediation, the engine indexes the container threat matrix from the MITRE ATT&CK framework using a semantic vector search library called FAISS, matching concatenated rule titles against documented intrusion techniques. When prompting a language model to repair a vulnerable workload, the system prepends live cluster facts directly into the prompt. The prompt explicitly informs the model which inbound clients depend on the workload, which outbound services the workload calls, which network ports must remain open, and which exact secret objects the workload is permitted to read by inspecting role bindings.

Before any generated patch reaches a production workload, it passes through a validation and health gate. The engine uses the standard Kubernetes command-line tool, kubectl, to perform a dry-run validation against the platform schema, checking that the patch syntax is legal. The patch is then evaluated against a deterministic functional blast radius protocol, which credits a repair as successful only if it clears the original security finding while keeping the workload fully ready and preserving all previously observed network communication paths.

## Does supplying connection maps improve patch accuracy?

Supplying connection maps improves patch accuracy by dramatically increasing the proportion of repairs that resolve security flaws without severing operational dependencies. To test this effect under controlled experimental conditions, Shaikh constructed a custom healthcare benchmark cluster called VulnCare. The testing ground spans 36 distinct software deployments distributed across four namespaces, representing an enterprise hospital environment with long service chains extending across pharmacy, claims clearing, banking settlement, and medical imaging services.

Across this cluster, the researcher injected 31 distinct security findings across seven operational dependency classes, including network policies, credential management, access controls, container capabilities, storage configurations, and pod security baselines. Each finding was formally classified as either topology-dependent, meaning a correct fix requires awareness of external service connections or shared permissions, or topology-independent, meaning the flaw can be resolved strictly within the boundaries of the isolated manifest. The evaluation ran across 248 distinct trials, comparing patch generation under a blind condition, where the language model saw only the scanner alert, against the topology-aware condition, where the model received the live operational context.

Across all 248 trials, providing live cluster context raised the correctness rate for topology-dependent security patches from 11.1 percent to 78.0 percent. This improvement represented an absolute difference of 66.9 percentage points, a gain that held across every evaluated model and across six of the seven tested dependency classes. In classes involving credential handling and network policies, where fixes frequently risk severing communication edges, correctness increased by 95 percentage points. Farooq said in response to questions from Primary that the blind results were especially striking because models confidently produce repairs that look plausible and satisfy scanner checks while completely disrupting critical infrastructure.

In access control configurations governed by role-based permissions, correctness increased by 31 percentage points. Farooq explained that role-based access control proved significantly harder for models because multiple fields must align simultaneously under strict matching rules. In experimental runs, models frequently identified the correct resource type but slipped when narrowing resource names or selecting appropriate operational verbs, illustrating the difficulty of balancing security restrictions against necessary functional permissions.

The single dependency category that failed to improve under topology conditioning was the policy class. In that scenario, resolving the finding required an annotation change, but providing the running container image digest steered several models to rewrite the application image reference instead, severing communication with downstream verification services. Farooq observed that extraneous context can inadvertently prompt models to attempt invasive structural edits rather than simple metadata updates, accidentally breaking connections that should have remained untouched. Meanwhile, topology-independent control findings exhibited no change in correctness between the blind and topology-aware conditions, showing a difference of zero percentage points. This control confirmed that the dramatic improvement stemmed directly from the supplied connection maps rather than generic prompt expansion.

## What are the limits of automated cluster patching?

The reported experimental findings represent a controlled benchmark evaluation on a single simulated cluster rather than an operational guarantee across production enterprise environments. While the results demonstrate that live connection graphs reduce destructive patching errors, the paper has been peer reviewed and was presented by Farooq Shaikh at the ESORICS LLM4SEC workshop. The experimental trials took place inside a 36-deployment environment run on kind, an open-source tool that executes Kubernetes clusters inside local container environments, paired with Cilium networking software.

Real-world enterprise environments feature higher traffic variability, transient network errors, and asynchronous dependencies that a short five-minute observation window might fail to capture. Farooq noted that the primary operational boundary involves intermittent or bursty workflows, such as disaster recovery routines or infrequent settlement jobs. If an operation remains quiet during the telemetry collection window, an automated system risks misinterpreting that silence as an absence of dependency, potentially approving a security patch that severs vital recovery paths. Furthermore, the evaluation focused on isolating the prompt conditioning mechanism; the automated graph ranking and technique annotation components were documented in the system architecture but were not isolated in separate comparative ablation measurements.

Regarding the contribution of threat weighting, Farooq explained that while individual graph components were not measured separately, prioritising attack paths is crucial for administrators who cannot fix every vulnerability simultaneously. Guiding models with attack paths helps highlight critical transit nodes across an enterprise network. For engineering teams operating large-scale cloud infrastructure, these findings highlight both the promise and the boundaries of artificial intelligence in infrastructure security. Automated models possess sufficient programming competence to write valid configuration code, but code generation alone is insufficient without operational grounding. To safely automate maintenance across complex digital systems, automated tools must understand how software components behave while running, ensuring that closing a digital door does not inadvertently bring down the entire building.
