arXiv:2607.25995cs.CRcs.AI2026-07中稿 · the Workshop on th…

给大模型加实时依赖图,修复K8s安全漏洞时更准不炸程序。

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

论文配图:Does Runtime Topology Context Improve LLM-Generated Kubernetes Security Patches?
图 1 · 摘自论文原文
  • 用服务调用图和权限绑定构建集群实时上下文,指导大模型生成补丁。
  • 在31个漏洞上,依赖感知补丁正确率从11.1%提升至78.0%。
  • 适合做K8s安全自动化修复的开发者和运维工程师参考。

Kubernetes 是云原生生态的核心,负责编排容器化工作负载。近期研究发现,大语言模型(LLMs)可自动修复集群安全问题,仅凭KSPM检测结果生成配置补丁,无需人工干预。然而,现有方法将每个问题孤立处理,仅依赖通用加固知识,忽略了运行时服务依赖关系。若补丁未考虑这些依赖,看似合规的修复可能引发下游崩溃或调用链中断。当前尚无在可控条件下对多种依赖类型验证实时上下文的有效性。本文提出 KuTIE(Kubernetes Topology Intelligence Engine),基于 Istio 调用边、Trivy KSPM 检测结果和服务账户绑定,构建实时集群上下文,并以此约束 LLM 生成补丁。在自建的 36 个部署、4 个命名空间的医疗健康集群 VulnCare 上评估,包含 31 个可注入漏洞,覆盖七类依赖关系,每类均以集群真实情况标注拓扑依赖。248 次实验表明,引入拓扑上下文后,拓扑依赖型补丁正确率从 11.1% 提升至 78.0%(Δ=0.669),所有模型与六类依赖中均显著提升,如凭证与网络策略(Δ=0.95)、基于角色的访问控制(Δ=0.31);而拓扑无关对照组无变化(Δ=0.0),排除了提示词泛化干扰。因此,提供实时服务调用图及暴露的服务账户绑定,能显著提升拓扑依赖型漏洞修复准确性。

原文摘要 · Abstract (English)

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.

K8s安全LLM应用依赖分析自动化修复

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。