这篇论文实测了给LLM补上运行时调用关系后,K8s安全补丁的正确率从11%飙到78%。对搞云原生安全的人值得一看。
论文提出KuTIE系统,结合Istio调用边、Trivy KSPM发现和服务账户绑定构建实时集群上下文,用于改进LLM生成的Kubernetes安全配置补丁。在包含36个部署、4个命名空间、31个可注入发现(覆盖7个依赖类)的VulnCare医疗集群上测试。248次试验显示,拓扑上下文将依赖类补丁正确率从11.1%提升至78.0%(Δ=0.669),其中凭证和网络策略类提升达Δ=0.95,而拓扑无关的对照未受影响(Δ=0.0)。
Does Runtime Topology Context Improve LLM-Generated Kubernetes Security Patches?
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% ($Δ= 0.669$), a gap that holds for every model and for six of seven classes, from credential and network-policy ($Δ= 0.95$) to role-based access control ($Δ= 0.31$); a topology-independent control exhibits no such effect ($Δ= 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.