I ran an automated attack-pattern miner on two agent frameworks: three lessons on tool permissions and sandboxing
Summary
A static-analysis pipeline built a code graph, proposed 700+ candidate attack paths, and only 3 survived model filtering and dynamic confirmation. Pointed at two unnamed agent harnesses, it found general patterns: model output is untrusted input, fetch tools reach internal networks, and permissions should be narrow and per-app.
What the comments say
Check the resolved IP after DNS lookup and again on every redirect, not just the URL string; a public hostname that 302s to the metadata address or resolves to a private IP slips past a hostname check. This is ordinary SSRF, which agents make far easier to trigger.
In one production app, agents and their browser cannot reach loopback, private ranges or the cloud metadata address unless the owner allowlists that exact address; a bare host opens every port, host:port only that one, and an "always allow" approval does not override the list. Each agent only sees the folders it was granted.
A wrong no is invisible: a real attack path the filter discarded leaves no trace, while a wrong yes gets caught in dynamic confirmation. Rejections need the same record of why they were dropped, re-checkable by someone outside the pipeline.
The model sometimes writes a descriptive judgment that a path is vulnerable but stamps the JSON status "Not vulnerable"; if anything downstream trusts the structured field, the model's own judgment is silently dropped. The structured output is a second opinion, not a verdict, and needs a check that compares both fields on every record.
Most discards happen in the harness while querying the code context graph, before any model is involved, so the graph queries do the real filtering; the blind spot lives in the compiler's model of the code, where never-proposed paths hide.
DNS rebinding is another bypass when there is a gap between the resolution check and the actual fetch.
Join the discussion
Was this useful to you?
Related
Seven security practices for Claude Code, from version checks to sandbox and MCP permissions
X · kimuai08
Researchers left an AI alone for 30 hours. I rebuilt it at home
X · RGorczynskiOPS
Anthropic Just Released the New Rules of Claude Code
X · nateherk
From doing the work to delegating it: field notes on putting AI agents in my job
blog.hoegun.xyz
How do you orchestrate multiple agents?
r/AI_Agents · kwerkee