/security-agent-skills:hunting-code-interpreter-and-tool-sandbox-escapefrom security-agent-skills
Hunts sandbox escapes in AI code interpreters and tool runtimes: tests whether model-generated code can reach host filesystems, credentials, network, or exhaust resources. Use when auditing AI features that execute model output.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An AI application that runs model-generated code, a code interpreter, an agent tool that shells out, a notebook backend, is executing attacker-influenceable instructions, because the model's output is shaped by its input and its input can be attacker-controlled. The sandbox that runs that code is therefore a security boundary around hostile code, and it is often built as if the code were trusted. The escapes are concrete. The runtime may have network access, so generated code reaches internal services or exfiltrates. It may see a writable host filesystem or a shared mount, so code reads or writes outside the jail. It may carry credentials, an API key, a cloud role, a token, in its environment, so code steals them. The isolation may be thin, a shared kernel, a container with a host mount, a subprocess with no namespace, so a known primitive escapes it. And with no CPU, memory, time, or output bound, one run starves the host. The hunt is to run code in the sandbox and see what of the host it can touch. You hunt this by making the model emit probing code and observing what succeeds.
Test sandbox escape only on AI applications and runtimes you own or are authorized to assess, in a non-production sandbox. Running probing code exercises real execution and can reach real resources, so use an isolated test deployment and never touch data, credentials, or hosts that are not yours. If you can't name the authorization, stop.
Establish the intended sandbox boundary first. Name what the runtime is allowed to touch: no network or a narrow allowlist, an ephemeral filesystem with nothing host-shared, no ambient credentials, hard CPU/memory/ time/output limits, and isolation strong enough for hostile code. This is the false-positive killer: a runtime with no egress, no host mount, no credentials in scope, enforced resource bounds, and real isolation is behaving correctly. Name the intended boundary, then test each edge.
Test network egress from the runtime. Have the model emit code that opens a connection: to an external collector you control, to an internal address, and to a cloud metadata endpoint. Confirm egress is blocked or allowlisted. A runtime with open network access lets generated code exfiltrate and pivot inside.
Test filesystem reach. Run code that lists, reads, and writes outside the working directory: the host root, a shared mount, other users' or sessions' data, and the runtime's own configuration. Confirm the filesystem is ephemeral and unshared. A writable or shared host filesystem lets code read secrets or persist across the boundary.
Hunt for ambient credentials. Enumerate the environment, instance metadata, mounted service-account tokens, and config files reachable from the runtime. Confirm no usable credential is in scope. A cloud role, API key, or token the sandbox can read turns code execution into credential theft and lateral movement.
Test isolation strength and resource bounds. Probe the isolation: whether it is a shared kernel, a container with a dangerous mount or capability, or a bare subprocess, and whether a known escape primitive works. Separately, run code that spins CPU, allocates memory, sleeps, and emits huge output, and confirm each is bounded. Thin isolation escapes to the host; missing bounds let one run starve it.
Confirm and record. Confirm by escaping the sandbox from model-driven code: reaching the network, reading or writing the host filesystem, stealing a credential, or breaking isolation, on a non-production runtime and without touching real resources. Kill the lead if the runtime has no egress, no host-shared or writable filesystem, no ambient credentials, enforced resource bounds, and isolation that holds against a known primitive. Record the model-generated code or tool argument, the host resource it reached, and the missing isolation, credential, or resource bound.
Confirm. A code-interpreter feature runs model-generated Python in a container that has outbound network access and a mounted cloud service-account token. A prompt that steers the model into emitting code which reads the token file and posts it to an external endpoint succeeds, exfiltrating a credential that grants cloud access. Confirmed sandbox credential theft via egress and mounted token,
critical, remediation = remove ambient credentials from the runtime, block network egress by default, and mount no host secret into the code-execution sandbox.Kill. The runtime runs generated code with no network egress, an ephemeral filesystem with no host mount or shared volume, no credentials or metadata reachable in its environment, hard CPU/memory/time/output limits, and isolation that resists a known escape primitive. Probing code cannot reach the network, the host filesystem, a credential, or the host. Killed,
kill_reason= "no egress, no host-shared filesystem, no ambient credentials, enforced resource bounds, and isolation holds; model-driven code touches nothing outside the jail."
You need the runtime's network policy, its filesystem view and any host sharing, the credentials reachable from inside, the isolation mechanism, and the resource limits. Drive the model to emit code that probes each: an egress beacon, a host-path read and write, a credential enumeration, and a resource-exhaustion loop. Reading the sandbox configuration shows the intended boundary; code that reaches the network, the host, or a credential shows whether it holds.
auditing-ai-agent-permissions - the agency and approval layer above the runtime; excessive agency plus a
weak sandbox is how a tool call becomes host access.auditing-mcp-tool-integrations - tools an agent calls are the other execution surface; their arguments reach
the same shells and paths this skill jails.hunting-container-escape-surface - the container-isolation mechanics a code sandbox depends on; the escape
primitives are shared.auditing-ml-inference-endpoint-abuse - the model serving that produces the code; abusing the endpoint and
escaping the runtime are the two halves of the AI-execution surface.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skills194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive.Other plugins' skills for the same job