AAK-COMPOSE-001: Untrusted input reaches network egress through a 2- or 3-component chain that no single component would trip
- Severity
- HIGH
- Category
- Composition (
composition) - Scanner
agent_audit_kit/scanners/composition.py- Auto-fixable
- No.
- SARIF name
CompositionChainToEgress
What it detects
An ordered path of two or three components carries untrusted input to network egress, passing through one that reads secrets or local state, while no single component on the path holds all three roles. Each component therefore passes every rule that inspects it alone, and the exposure exists only because they were composed. This is the CompoSkill result (arXiv:2608.16246): a risk chain assembled from parts that each clear an individual scanner. Paths are capped at three components, which is where that paper's own attack-success numbers concentrate before longer chains degrade them, and beyond which the search cost grows as the node count to the power of the depth. Components are skills (SKILL.md) and MCP servers, and an edge exists where one component's declared output is another's declared input, or where both are registered together and the second accepts free-form text. Distinct from AAK-AGENT-COMPOSE-001, which asks whether an unordered set of skills spans a boundary: this asks whether a directed path carries data across one.
How to fix
Break one link rather than hardening every component. In order of effectiveness: stop the first component's untrusted output from reaching the next automatically (require a human step, or a schema that cannot carry instructions); drop the egress component's reach to an allow-list of destinations; or split the chain across contexts so the components are never loaded together. Hardening the middle component alone does not help, because the chain re-forms around any replacement with the same capability.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-COMPOSE-001
Limitations
This is a static pass over declared configuration. It cannot resolve tool registration that happens at runtime, so a component added from a registry fetched at start-up is invisible to it, and a chain assembled at runtime from such components will not appear here. Capability comes from what a component declares, so an under-declared component makes its chains look narrower than they are - that gap is what AAK-COMPOSE-003 reports. Where components declare no explicit input/output wiring, edges come from co-registration, which over-approximates who can hand data to whom. It reasons about capability reachability, not proof of a data flow: it does not execute anything or evaluate a condition, so a reported chain is a path that exists, not one that is guaranteed to be taken. It stands down entirely when any component on the path is already reported at or above its own severity, so a genuine chain can be hidden by an unrelated finding of equal weight on one of its components. Above 200 components in a scanned project the graph is not built at all and this rule reports nothing, which is silence rather than a clean result. An MCP server whose name holds a double quote, which a JSON key can only write escaped, is given no line, so a chain through it names no line for that server, and a finding inside that server's block may not stand the chain down.
References
- OWASP Agentic Top 10: ASI02 (Tool Misuse and Exploitation)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-INJECT-01 (Shell Injection via MCP)
- Incidents and advisories: ARXIV-2608.16246, ARXIV-2608.09732
Deep dive
This rule is written up in Skill scanning: per-artifact pre-screen and the composition check.
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-COMPOSE-001.md: the page then shows that text, with the registry reference appended under it.