← Lab /AI/ML

Runtime topology context raises LLM patch correctness from 11.1% to 78.0%

Providing live service-call graph and service-account bindings to LLMs improves topology-dependent patch correctness from 11.1% to 78.0%

AI/ML arXiv 28 Jul 2026 Measurement Real-world evidence Threat model

Published as “Does Runtime Topology Context Improve LLM-Generated Kubernetes Security Patches?”

Why it matters

Providing runtime topology to LLMs can substantially reduce destructive, function-breaking patches, making automated Kubernetes hardening more reliable in practice.

Summary

Conditioning LLM remediation prompts with live service-call topology and service-account bindings raises topology-dependent patch correctness from 11.1% to 78.0% (∆=0.669). The improvement holds across four LLMs and six of seven misconfiguration classes, while a topology-independent control shows no effect. The paper reports a negative effect for the POLICY class and notes transcription errors limit the aware condition. No abstract was provided, so the summary is based on the introduction, evaluation, and conclusion sections.

What they found 1

  1. Topology context dramatically improves correct patch generation for topology-dependent findings.

    “Topology context raises TD patch correctness from 11.1% (11/99) under blind prompting to 78.0% (78/100) under aware prompting, a gap of ∆= 0.669.”

Caveats 5

  • POLICY 5/8 (0.62) 8/8 (1.00) -0.375
  • the common factor is transcription rather than reasoning: the binding is present, but the model narrows or paraphrases the supplied value rather than copying it exactly
  • The call graph captures service-to-service edges rather than pod-level escalation primitives, so recovered paths express lateral reachability rather than per-hop exploit mechanics.
  • Edges are aggregated over a finite scrape window, so rarely exercised paths may be absent, and a missing edge yields the destructive patch the approach exists to prevent.
  • The effect was measured on a single healthcare cluster and four models, and its magnitude depends on the 25/6 TD/TI composition chosen by construction; how often TD findings arise in production is not established here.

What’s new here 4

  • Integrates live Istio telemetry to supply runtime service-call topology to LLM prompts.
  • Introduces a functional blast-radius gate that validates patches against observed dependencies.
  • Provides the VulnCare benchmark with ground-truth topology-dependent and independent findings.
  • Isolates the effect of topology context via a factorial design separating it from generic prompt enrichment.

Threat model stated by the source

Adversaryexternal or laterally moving workload
Capabilitycannot access raw manifests or enumerate the full cluster API
Assumesobservable information limited to live network traffic and exposed service endpoints