agent-safety-and-sandboxing

Classifies agent tool calls into effect tiers and audits sandbox configurations for exfiltration risk.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/dperussina/function2agent --skill agent-safety-and-sandboxing-dperussina
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-safety-and-sandboxing
Source: https://github.com/dperussina/function2agent/tree/main/.cursor/skills/agent-safety-and-sandboxing
Command: npx skills add https://github.com/dperussina/function2agent --skill agent-safety-and-sandboxing-dperussina

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents execute model-generated code and tool calls against real systems, and a single prompt injection can turn private data access plus network egress into data exfiltration. This Skill provides the decision procedures to sandbox agents correctly, classify every tool call as read-only, reversible-write, or irreversible-destructive, and enforce those tiers at a blocking interception point. ## Core Features & Use Cases - Lethal trifecta audit: Checks every agent configuration for the simultaneous presence of private data, untrusted content, and an egress path, and refuses assembly or cuts a leg when all three coincide. - Sandbox tier selection: Compares hardened containers, gVisor, Firecracker/Kata microVMs, and WebAssembly, and specifies network egress controls in five terms (host and port, pinned addresses, DNS denial, loopback/RFC 1918 denial, mandatory egress proxy). - Effect-tier classification and interception: Resolves HTTP verbs, SQL verbs, and shell commands into read-only, reversible-write, or destructive tiers on the fully-substituted call, binds each tier to an allow/deny disposition, and orders guard hooks, deny rules, allow rules, classifiers, and human gates. - Use Case: When wiring a PreToolUse hook for an agent that has a shell and a general HTTP client, use this Skill to classify each call, default-deny unresolved operations, and place the egress allowlist at a mandatory proxy the agent cannot bypass. ## Quick Start Audit my agent configuration for exfiltration risk and tell me which sandbox tier and egress controls to apply before shipping it.

Frequently Asked Questions about agent-safety-and-sandboxing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sandbox an AI agent that runs model-generated code?▼

Use a Firecracker or Kata microVM as the default tier, since a standard Docker container is not a security boundary for model-generated code. Mount only the workspace read-only where possible, and enforce default-deny network egress with a destination allowlist.

How do I classify agent tool calls as read-only or destructive?▼

Classify the call, not the tool, when the tool is general like a shell or HTTP client. Resolve the tier from the fully-substituted action: GET/HEAD/OPTIONS are read-only, POST/PUT/PATCH are reversible writes, DELETE and unparseable commands are denied by default.

What is the lethal trifecta in agent security?▼

An agent is exfiltration-capable when it simultaneously has private data access, untrusted content in context, and an egress path. Cutting any one leg is a complete mitigation, so audit every configuration for all three before shipping.

Does a read-only agent prevent data exfiltration?▼

No. Read-only restricts writes to the target but does not cut egress; an agent with a shell and network access can still curl an attacker URL with stolen data. Egress must be enforced separately at a mandatory proxy with a destination allowlist.

Can prompt injection be fully prevented with classifiers or system prompts?▼

No. In-band defenses plateau near 95% detection, which leaves a repeatable exploit, and any prompt-instruction defense is overridable by injection. Designs must instead cut a trifecta leg and state the blast radius when injection succeeds.

Why is an interception point not enough to control network egress?▼

An interception point sees only the call it is handed, so any allowed shell command can open a socket the gate never sees. Egress is a network-layer property and must be enforced below the process at a mandatory proxy the agent cannot modify or bypass.