# Does Runtime Topology Context Improve LLM-Generated Kubernetes Security Patches?

arXiv: https://arxiv.org/abs/2607.25995 · HTML: https://mlsanity.com/paper/2607.25995/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 32 references that are in the map.
- First posted on arXiv 28 Jul 2026.

## Builds on (most cited first, 15 of 15)

- [GenKubeSec: LLM-Based Kubernetes Misconfiguration Detection, Localization, Reasoning, and Remediation](https://mlsanity.com/paper/2405.19954/) (2024)
- [MicroRemed: Benchmarking LLMs in Microservices Remediation](https://mlsanity.com/paper/2511.01166/) (2025)
- [LLMSecConfig: An LLM-Based Approach for Fixing Software Container Misconfigurations](https://mlsanity.com/paper/2502.02009/) (2025)
- [KGSecConfig: A Knowledge Graph Based Approach for Secured Container Orchestrator Configuration](https://mlsanity.com/paper/2112.12595/) (2021)
- [How Safe Are AI-Generated Patches? A Large-scale Study on Security Risks in LLM and Agentic Automated Program Repair on SWE-bench](https://mlsanity.com/paper/2507.02976/) (2025)
- [Red Teaming Program Repair Agents: When Correct Patches can Hide Vulnerabilities](https://mlsanity.com/paper/2509.25894/) (2025)
- [AttacKG+:Boosting Attack Knowledge Graph Construction with Large Language Models](https://mlsanity.com/paper/2405.04753/) (2024)
- [KubeIntellect: A Modular LLM-Orchestrated Agent Framework for End-to-End Kubernetes Management](https://mlsanity.com/paper/2509.02449/) (2025)
- [Graphene: Infrastructure Security Posture Analysis with AI-generated Attack Graphs](https://mlsanity.com/paper/2312.13119/) (2023)
- [Risk Assessment Graphs: Utilizing Attack Graphs for Risk Assessment](https://mlsanity.com/paper/2307.14114/) (2023)
- [KubeFence: Security Hardening of the Kubernetes Attack Surface](https://mlsanity.com/paper/2504.11126/) (2025)
- [KubeGuard: LLM-Assisted Kubernetes Hardening via Configuration Files and Runtime Logs Analysis](https://mlsanity.com/paper/2509.04191/) (2025)
- [A Systematic Study of LLM-Based Architectures for Automated Patching](https://mlsanity.com/paper/2603.01257/) (2026)
- [Inside Job: Defending Kubernetes Clusters Against Network Misconfigurations](https://mlsanity.com/paper/2506.21134/) (2025)
- [MetaKube: An Experience-Aware LLM Framework for Kubernetes Failure Diagnosis](https://mlsanity.com/paper/2603.23580/) (2026)

## Built on by (most cited first, 2 of 2)

- [Coding Agents Aren't Enough! Evaluating an Enterprise Security Brain for Agentic Cloud Investigations](https://mlsanity.com/paper/2609.30345/) (2026)
- [Contextualization of Third-Party Cloud Security Findings](https://mlsanity.com/paper/2610.08895/) (2026)

## Abstract (arXiv)

Kubernetes is central to the cloud-native ecosystem, orchestrating containerised workloads. Recent work suggests that large language models (LLMs) can automate cluster security remediation, generating configuration patches from Kubernetes Security Posture Management (KSPM) findings without human authoring. Such systems, however, prompt the model with each finding in isolation from the live service call graph, assuming general hardening knowledge suffices. This assumption breaks down whenever a patch must preserve a runtime service dependency invisible to the model: an otherwise compliant fix then carries a destructive functional blast radius, crashing downstream callers or silently severing call edges across the cluster. Whether live cluster context improves patch correctness has not been measured under controlled conditions across multiple dependency classes. We introduce KuTIE (Kubernetes Topology Intelligence Engine), which builds a live cluster context from Istio call edges, Trivy KSPM findings, and the service-account bindings a workload reads, and conditions LLM patch generation on it. It is evaluated on VulnCare, a purpose-built 36-deployment, four-namespace healthcare cluster with 31 injectable findings across seven dependency classes, each labelled by topology dependence against cluster ground truth. Across 248 trials, topology context raises topology-dependent patch correctness from 11.1% to 78.0% (Delta = 0.669), a gap that holds for every model and for six of seven classes, from credential and network-policy (Delta = 0.95) to role-based access control (Delta = 0.31); a topology-independent control exhibits no such effect (Delta = 0.0), isolating the result from generic prompt enrichment. Supplying the live service-call graph and the service-account bindings it exposes thus improves remediation of topology-dependent findings well beyond scanner-only context.
