AgentLens: Graph-guided Security Auditing for LLM-based Agents
summary
The gist
LLM-based agents are emerging as a key paradigm for automating software engineering by coupling LLM-driven decision-making with external tools, files, APIs…
In short
AGENTLENS is a framework for systematically auditing LLM-based agents to find security weaknesses before deployment. It uses an Audit Knowledge Graph to map agent components, dependencies, and weaknesses. This allows it to derive concrete audit objectives and generate test payloads that follow the agent's actual workflow, validating if identified weaknesses can become real exploits.
Key concepts
- Audit Knowledge Graph
- This is a new data structure that models an agent's entire architecture. It connects components, their dependencies (how they call each other), potential weaknesses in individual parts, and built-in safety rules (guardrails). This graph allows the system to understand how different weaknesses can chain together to cause a security issue.
- Agent Profile Graph
- This initial graph is built by analyzing the agent's code and configuration files. Its nodes represent specific parts of the agent, like functions or modules, and edges show how they interact—for example, data flow or control flow. This forms the foundation for understanding the agent's operational structure.
- Payload Generation (LLMgen)
- This stage uses an LLM guided by audit paths to create test inputs. The formula Payload = LLMgen(R, I, p) ensures the generated payload is designed to disguise its true malicious intent while still achieving the exploit goal. This helps in bypassing existing guardrails during testing.
- Scenario-based Validation
- This final stage tests generated payloads within realistic, multi-turn audit scenarios. By embedding the raw test inputs into contextualized conversations that mimic the agent's normal operation, AGENTLENS validates whether a weakness can actually propagate through the agent's workflow and cause a security violation under real constraints.
Terminology used across episodes
This episode discusses
- AgentLens: Graph-guided Security Auditing for LLM-based Agents · Paper Radio
- Open-SWE-Traces: Advancing Dual-Mode Multilingual Distillation for Software Engineering Agents
- Vulnerability Detection with Code Language Models: How Far Are We?
- TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenance
- From Prompt Injections to SQL Injection Attacks: How Protected is Your LLM-Integrated Web Application?
- Understanding and Mitigating Prompt Leaking Attacks in Real-World LLM-Based Applications
- Universal and Transferable Adversarial Attacks on Aligned Language Models
- HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal
- garak: A Framework for Security Probing Large Language Models
- Agent Audit: A Security Analysis System for LLM Agent Applications
- MemMorph: Tool Hijacking in LLM Agents via Memory Poisoning
- Les Dissonances: Cross-Tool Harvesting and Polluting in Pool-of-Tools Empowered LLM Agents
- SpecOps: A Fully Automated AI Agent Testing Framework in Real-World GUI Environments
The paper
AgentLens: Graph-guided Security Auditing for LLM-based Agents · Read on arXiv
Peizhuo Lv, Tao Chen, Mengya Shi, Ziyu Lin, Yuxuan Chen, Ruigang Liang, Tianwei Zhang, Wei Dong, XiaoFeng Wang
Nanyang Technological University, Singapore · School of Cyber Science and Technology, Shandong University, China · Institute of Information Engineering, Chinese Academy of Sciences, China
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "AgentLens: Graph-guided Security Auditing for LLM-based Agents".
Title and authors: Elias: They are using this graph to model the target agent’s key components, all its dependencies, how they execute together, any known weaknesses in those parts, and all the built-in guardrails.
Nadia: This graph allows AgentLens to derive specific audit objectives directly from the agent itself instead of relying on a predefined vulnerability class.
Priya: So if you find a weakness in one component node on the graph, how does that translate into something actionable for an auditor?
Elias: The graph structure connects weaknesses in components and their inter-component dependencies into one single auditing path.
Nadia: This means they can trace the potential attack path through the agent’s logic, showing exactly how a weakness in one part can lead to a security-violating behavior somewhere else.
Priya: That sounds much more useful than just flagging a function as potentially risky in isolation because it shows the full context of interaction.
Elias: And they build on that by analyzing the target agent’s code and configuration files to construct an Agent Profile Graph, where nodes are the components and edges show all those invocation, data flow, and control flow dependencies.
Nadia: Then they enrich this graph with potential weaknesses associated with those component nodes and use constraints to represent the guardrails.
Priya: So we’re talking about building a map of the entire agent ecosystem—the good parts and the bad parts—before anyone deploys it?
Elias: That’s essentially what they are aiming for, allowing an auditor to discover implementation-level weaknesses while validating if those weaknesses can manifest through the agent's normal workflows as security-violating behaviors.
Nadia: It moves the auditing process from a blind search to a guided, path-oriented analysis problem where you follow the connections in the graph.
Priya: So, it’s less about finding isolated errors and more about proving that a sequence of errors can cause a failure under operational conditions.
Elias: That’s right. They are trying to address that fundamental challenge where static approaches fail because they lack dynamic context awareness regarding how the LLM plans its next move.
Nadia: So, the summary is essentially proposing this knowledge graph as a way to systematically identify implementation weaknesses and validate their exploitability in real agent workflows.
Priya: It’s a structured approach to proving risk based on the agent's actual operational structure rather than just static code inspection.
The paper's summary: Nadia: The main improvement is moving away from methods like Agent Audit, which relies only on static analysis of code and artifacts to detect risky tool implementations or insecure data flows.
Elias: Their critique is that those static approaches cannot guarantee that the reported issues can actually be triggered during an agent execution because they lack dynamic context awareness.
Priya: So the improvement here is explicitly adding the dynamic context—the LLM’s planning and execution environment—into the auditing process.
Elias: Exactly. AgentLens accounts for not only the suspicious implementation weaknesses but also whether those reported issues are feasible within the agent’s executable workflow, including built-in dynamic guardrails.
Nadia: They tackle two fundamental technical challenges they identified: first, how to define the audit scope of a target agent because risks are often implicit and relational.
Priya: That relational aspect is where the graph comes in; it allows them to see how weaknesses in interac components can be chained together.
Elias: And second, they address whether those issues are feasible under dynamic guardrails, which is something static tools completely miss because they don’t simulate the actual runtime environment.
Nadia: The methodology of generating audit payloads guided by those paths using that LLMgen formula is another key improvement; it’s about creating inputs that are disguised but still effective.
Priya: That payload generation step is where you turn the theoretical graph into something you can actually test against the agent's actual runtime behavior.
Elias: And they pair that with constructing multi-turn audit scenarios guided by the audit path to ensure the generated payload actually propagates through the agent’s original workflow.
Nadia: So, instead of just finding a static warning, you are guided by a path through the graph to generate an input that tests a vulnerability in context.
Priya: It seems like they are bridging that gap between identifying potential weaknesses and proving their actual exploitability within the system's operational constraints.
Elias: That’s the essence of it; it’s about making sure we test what can actually happen, not just what *could* happen on paper.
The paper's improvements: Nadia: AgentLens constructs an Audit Knowledge Graph tailored specifically for LLM-based agent auditing by integrating agent components, workflow dependencies, weakness evidence, and guardrail constraints.
Elias: The evaluation across five widely used open-source software engineering agents showed that AgentLens identifies forty-four validated vulnerabilities across multiple categories.
Priya: And they assigned twelve CVE IDs to those findings during the testing phase.
Nadia: They took about two thousand three hundred ninety-six point four seconds on average per agent for the auditing workflow, generating an average of eight point eight validated vulnerabilities per agent.
Elias: The ratio of validated vulnerabilities to audit paths was sixty-two point eight six percent across all the tests they ran.
Priya: It’s clear that combining workflow-aware audit paths with runtime validation helps AgentLens discover and confirm vulnerabilities better than previous baselines, like Agent Audit or AgentFuzz.
Nadia: It suggests that building this kind of knowledge graph tailored to agent auditing can facilitate practical security auditing of LLM-based agents before they are actually deployed.
Elias: The full title we discussed today is AgentLens: Graph-guided Security Auditing for LLM-based Agents.
Priya: I just think it’s a really structured way to approach this messy problem, moving toward more reliable security checks in this space.
Conclusion: Nadia: So we’ve been looking at AgentLens, this framework they put out for auditing LLM agents by building this Audit Knowledge Graph to map components and dependencies.
Elias: It sounds like a structured way to move past just looking at code and start testing how weaknesses in one part of the agent can actually chain together into a security failure.
Priya: I’m interested in that idea of using the graph to derive audit objectives directly from the agent itself instead of us just guessing what kind of vulnerability we should look for.
Nadia: Exactly, it lets you see how those weaknesses connect across the entire system, not just in isolation.
Elias: And they use this graph to guide generating test payloads using an LLM guided by a formula that says the payload needs to disguise its intent while still hitting the exploit target and bypass any guardrails.
Priya: That part about disguising the intent is interesting because it suggests they’re trying to make the test realistic enough to see if it actually works in a live workflow.
Nadia: Right, they then build these multi-turn audit scenarios that use that path information to deliver the payload in a way that mimics how the agent would actually be working.
Elias: So it’s not just a static check; it’s about proving that an isolated weakness can actually propagate through the agent's original workflow under existing guardrails.
Priya: That moves us past just finding potential risks and into validating whether those risks are actually reachable in practice, which is a huge step for trust.
Nadia: So, to recap, AgentLens builds this knowledge graph to model the agent’s structure and weaknesses, then uses that to generate path-guided tests that run through the agent's workflow.
Elias: The results they got on five different open-source engineering agents showed it finding forty four validated vulnerabilities and assigning twelve CVE IDs.
Priya: That number of confirmed findings is impressive when you think about how much context you need to get those kinds of reliable results from an AI system.
Nadia: It really shows that moving toward workflow-aware auditing helps us make more concrete security checks before we let these things run in production environments.
Elias: Yeah, it’s a solid framework for making sense of these complex agent systems, and it sets a new standard for how we audit them.
Priya: It makes the work of securing agents much more systematic and less reliant on guesswork about what might go wrong.
More episodes
- The day in conversation for 2026-12-05
- Daily Summary for 2026-12-05
- 2607.15118-Automated Template-free Synthesis of Instruction-Centric Leakage Contracts for Black-Box CPUs
- 2610.37722-FVH-Bench: Evaluating Image Generator Safety Beyond Overtly Harmful Imagery
- 2512.23849-Security Without Detection: Economic Denial as a Primitive for Edge and IoT Defense
- 2605.05807-LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attribution
- 2607.02932-PromptPET: Prompt Obfuscation Against Profiling by AI Agents
- 2309.05646-A Novel Supervised Deep Learning Solution to Detect Distributed Denial of Service (DDoS) attacks on Edge Systems using Convolutional Neural Networks (CNN)
- The day in conversation for 2026-12-04
- Daily Summary for 2026-12-04