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

📄 arXiv: 2607.25995v1 📥 PDF

作者: Farooq Shaikh

分类: cs.CR, cs.AI

发布日期: 2026-07-28

备注: Accepted at the Workshop on the Use of Large Language Models for Cybersecurity (LLMSec), co-located with ESORICS 2026


💡 一句话要点

提出KuTIE以提升Kubernetes安全补丁生成的准确性

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: Kubernetes 安全补丁 大型语言模型 实时上下文 拓扑依赖 自动化修复 云原生

📋 核心要点

  1. 现有方法在生成Kubernetes安全补丁时未考虑实时服务调用图,导致补丁可能破坏服务依赖。
  2. 本文提出KuTIE,通过实时集群上下文来指导LLM生成补丁,确保补丁的正确性。
  3. 实验表明,拓扑上下文显著提高了补丁的准确性,从11.1%提升至78.0%,验证了方法的有效性。

📝 摘要(中文)

Kubernetes在云原生生态系统中扮演着核心角色,负责协调容器化工作负载。近期研究表明,大型语言模型(LLMs)能够自动化集群安全修复,从Kubernetes安全态势管理(KSPM)发现中生成配置补丁。然而,现有方法在处理补丁时未考虑实时服务调用图的上下文,导致补丁可能破坏运行时服务依赖。本文提出KuTIE(Kubernetes拓扑智能引擎),通过构建实时集群上下文来改善补丁生成的准确性。实验结果显示,使用拓扑上下文后,补丁的准确性从11.1%提升至78.0%。

🔬 方法详解

问题定义:本文旨在解决现有LLM生成Kubernetes安全补丁时未考虑实时服务调用图的问题。现有方法假设通用的加固知识足以处理补丁,但在实际中,这种假设往往导致补丁破坏运行时服务依赖。

核心思路:论文的核心思路是引入实时集群上下文,利用Istio调用边、Trivy KSPM发现和服务账户绑定信息来指导补丁生成。这种设计能够确保生成的补丁不会破坏集群的功能性。

技术框架:KuTIE的整体架构包括三个主要模块:实时集群上下文构建模块、补丁生成模块和补丁评估模块。首先,系统从Istio和Trivy中提取信息,构建实时上下文;然后,基于此上下文生成补丁;最后,评估生成补丁的准确性。

关键创新:最重要的技术创新在于引入了实时服务调用图作为补丁生成的上下文,这与现有方法的静态分析形成鲜明对比。通过这种方式,KuTIE能够显著提高补丁的准确性,尤其是在处理拓扑依赖时。

关键设计:在设计中,KuTIE使用了特定的参数设置来优化补丁生成过程,并采用了适应性损失函数以平衡不同类型补丁的生成效果。网络结构方面,结合了多种模型以增强生成能力。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,KuTIE在248次试验中,拓扑上下文将拓扑依赖补丁的准确性从11.1%提升至78.0%(Δ=0.669),这一提升在所有模型和六个依赖类中均得到了验证,而拓扑无关的对照组未显示出类似效果(Δ=0.0),有效隔离了结果的影响因素。

🎯 应用场景

该研究的潜在应用领域包括云计算环境中的安全自动化和容器化应用的安全管理。通过提高Kubernetes安全补丁的生成准确性,KuTIE能够帮助企业更有效地应对安全威胁,降低人为错误的风险,提升整体安全态势。未来,该方法还可扩展至其他云原生技术和平台,具有广泛的实际价值。

📄 摘要(原文)

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.