Skip to content

Add LangGraph ASI02 tool-misuse (confused deputy) code sample - #18

Open
AUSTIN-OMONDI wants to merge 1 commit into
GenAI-Security-Project:mainfrom
AUSTIN-OMONDI:add-langgraph-asi02-tool-misuse
Open

AUSTIN-OMONDI wants to merge 1 commit into
GenAI-Security-Project:mainfrom
AUSTIN-OMONDI:add-langgraph-asi02-tool-misuse

Conversation

@AUSTIN-OMONDI

Copy link
Copy Markdown

What

Adds the first LangGraph example under code_samples/agentic_top_ten/frameworks/,
and the first code sample for ASI02 – Tool Misuse and Exploitation.

Why

The agentic_top_ten code-sample set currently covers only mastra and pydantic
(goal-manipulation invoice agents). There is no LangGraph example and no ASI02
example. LangGraph is one of the frameworks listed as covered in the repo README,
so this closes that gap for the agentic Top 10 set.

The sample

A three-node pipeline (Planner → Researcher → Executor) sharing one AgentState
with no trust boundary. Untrusted content fetched by the Researcher flows verbatim
into the Executor's instruction channel — a confused-deputy chain that ends in
tool-argument injection through an unguarded shell tool. Payload is delivered via
indirect prompt injection (hidden HTML comment / white-on-white text) in
poisoned_page.html.

Runs both benign (python agent.py) and attack (python agent.py --attack) modes;
success signal is a harmless, greppable marker in the execution log. Includes a
README (functionality, vulnerability writeup, OWASP ASI02 + LLM Top 10 crosswalk,
prerequisites, mitigations) and a Dockerfile per CONTRIBUTING.

Safety

Intentionally insecure, educational only; all destructive potential is replaced by
a harmless marker command. No credentials, no network side effects, no real data.

@AUSTIN-OMONDI

Copy link
Copy Markdown
Author

Hi maintainers, checking in on this one. Happy to restructure it to match the
layout of the mastra/ and pydantic/ samples, add tests, or split it into smaller
pieces if that makes review easier. Is there anything you'd like changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant