sandbox-hardening
Skill39 starsChanged 8 months agoMITView on GitHub
Sandbox Hardening isolates agent execution environments using container sandboxing, permission boundaries, resource limits, and network segmentation.
- Pipes a download into a shell
- Deletes or force-pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- itallstartedwithaidea/claude-googleadsagentword for word, first seen May 21, 2026
Other versions1 project uses a version of this.
Word for word · 1
- itallstartedwithaidea/claude-googleadsagent★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository74 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- continuous-learningSkill
- entity-memory-managementSkill
- knowledge-base-injectionSkill
- long-horizon-workflowsSkill
- mcp-server-creationSkill
- memory-persistenceSkill
- multi-model-routingSkill
- parallel-agent-orchestrationSkill
- proactive-intelligenceSkill
- token-optimizationSkill
- adversarial-resilienceSkill
- agent-instinct-systemSkill
- anthropic-tool-masterySkill
- cognitive-scaffoldingSkill
- context-engineeringSkill
- multi-harness-portabilitySkill
- prompt-architectureSkill
- self-healing-agentsSkill
- session-archaeologySkill
- verification-loopsSkill
- ad-copy-generationSkill
- audience-targetingSkill
- budget-optimizationSkill
- competitor-analysisSkill
- conversion-trackingSkill
- google-ads-auditSkill
- keyword-researchSkill
- landing-page-auditSkill
- pmax-optimizationSkill
- quality-score-optimizationSkill
- remarketing-strategySkill
- shopping-adsSkill
- ci-cd-pipelinesSkill
- cloudflare-workersSkill
- configuration-managementSkill
- edge-renderingSkill
- observabilitySkill
- service-discoverySkill
- ml-model-integrationSkill
- programmatic-videoSkill
- web-asset-generationSkill
- ai-chat-studioSkill
- assistant-presetsSkill
- batch-processingSkill
- knowledge-base-ragSkill
- low-code-generationSkill
- workflow-orchestrationSkill
- bioinformaticsSkill
- cheminformaticsSkill
- data-analysisSkill
- database-lookupSkill
- geospatial-analysisSkill
- machine-learningSkill
- research-methodologySkill
- scientific-writingSkill
- agent-security-scanningSkill
- codeql-semgrepSkill
- secret-protectionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 140
Run containers as non-root with no-new-privileges security option
- Distinctive: line 142
Use read-only root filesystems with writable tmpfs for scratch space only
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sandbox Hardening
Part of Agent Skills™ by googleadsagent.ai™
Description
Sandbox Hardening isolates agent execution environments using container sandboxing, permission boundaries, resource limits, and network segmentation. The agent configures and validates sandboxes that prevent AI-generated code from accessing unauthorized resources, consuming unbounded compute, or affecting the host system.
An AI agent with unrestricted shell access is a security liability. Without sandboxing, a prompt injection or hallucinated command could delete files, exfiltrate data, install malware, or consume unbounded resources. Sandbox Hardening applies the principle of least privilege: the agent receives only the permissions it needs, in an isolated environment with strict resource limits and monitored network access.
This skill covers three isolation levels: process-level sandboxing (seccomp, AppArmor), container-level isolation (Docker with restricted capabilities), and VM-level isolation (microVMs like Firecracker). The appropriate level depends on the trust boundary: internal development tools use process-level, multi-tenant platforms use container-level, and untrusted code execution requires VM-level isolation.
Use When
- Running AI-generated code in production or shared environments
- Configuring agent execution environments with least-privilege access
- Deploying multi-tenant AI platforms where users share infrastructure
- Executing untrusted code from user inputs or AI outputs
- Implementing compliance requirements for isolated execution
- Building sandboxed development environments for agents
How It Works
graph TD
A[Agent Task] --> B{Trust Level Assessment}
B -->|Internal Dev| C[Process Sandbox]
B -->|Multi-Tenant| D[Container Sandbox]
B -->|Untrusted Code| E[VM Sandbox]
C --> F[seccomp + AppArmor Profile]
D --> G[Docker: No Root + Read-Only FS]
E --> H[Firecracker microVM]
F --> I[Resource Limits: CPU, Memory, Disk]
G --> I
H --> I
I --> J[Network Policy: Allowlist Only]
J --> K[Filesystem: Scoped Mount]
K --> L[Monitoring: Syscall Audit]
L --> M[Execution within Sandbox]The sandbox is configured before the agent executes any code. Trust level determines the isolation technology, and all levels apply resource limits, network restrictions, and filesystem scoping.
Implementation
# Container sandbox: minimal, non-root, read-only
FROM node:20-slim AS sandbox
RUN groupadd -r agent && useradd -r -g agent -d /workspace agent
WORKDIR /workspace
COPY --chown=agent:agent . .
USER agent# docker-compose sandbox configuration
services:
agent-sandbox:
build: .
read_only: true
tmpfs:
- /tmp:size=100M,noexec
security_opt:
- no-new-privileges:true
- seccomp:seccomp-profile.json
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
deploy:
resources:
limits:
cpus: "2.0"
memory: 512M
pids: 100
reservations:
cpus: "0.5"
memory: 128M
networks:
- sandbox-net
dns:
- 1.1.1.1
networks:
sandbox-net:
driver: bridge
internal: falseimport resource
import os
class ProcessSandbox:
"""Process-level sandboxing for single-tenant development."""
@staticmethod
def apply_limits(
max_memory_mb: int = 256,
max_cpu_seconds: int = 30,
max_file_size_mb: int = 10,
max_open_files: int = 64,
max_processes: int = 10,
):
mb = 1024 * 1024
resource.setrlimit(resource.RLIMIT_AS, (max_memory_mb * mb, max_memory_mb * mb))
resource.setrlimit(resource.RLIMIT_CPU, (max_cpu_seconds, max_cpu_seconds))
resource.setrlimit(resource.RLIMIT_FSIZE, (max_file_size_mb * mb, max_file_size_mb * mb))
resource.setrlimit(resource.RLIMIT_NOFILE, (max_open_files, max_open_files))
resource.setrlimit(resource.RLIMIT_NPROC, (max_processes, max_processes))
@staticmethod
def restrict_filesystem(allowed_dirs: list[str]):
"""Use chroot or bind mounts to restrict filesystem access."""
for d in allowed_dirs:
assert os.path.isabs(d), f"Allowed dirs must be absolute: {d}"
assert os.path.exists(d), f"Allowed dir does not exist: {d}"
@staticmethod
def validate_command(command: str, blocklist: list[str]) -> bool:
"""Check command against blocklist before execution."""
return not any(blocked in command for blocked in blocklist)
COMMAND_BLOCKLIST = [
"rm -rf /", "mkfs", "dd if=", "> /dev/sd",
"curl | sh", "wget | bash", "chmod 777",
"iptables", "mount", "umount",
]Best Practices
- Drop all Linux capabilities and add back only what is strictly required
- Run containers as non-root with
no-new-privilegessecurity option - Set memory, CPU, PID, and file descriptor limits to prevent resource exhaustion
- Use read-only root filesystems with writable tmpfs for scratch space only
- Restrict network access to an explicit allowlist of required endpoints
- Monitor and log all syscalls in the sandbox for post-incident forensic analysis
Platform Compatibility
| Platform | Support | Notes |
| Cursor | Full | Docker + process sandboxing |
| VS Code | Full | Dev container support |
| Windsurf | Full | Sandbox configuration |
| Claude Code | Full | Container-based isolation |
| Cline | Full | Security boundary config |
| aider | Partial | Process-level only |
Related Skills
- Agent Security Scanning - Vulnerability detection that identifies threats the sandbox must contain
- Secret Protection - Credential isolation that prevents sandboxed agents from accessing secrets outside their scope
- Configuration Management - Infrastructure-as-code patterns for declaratively managing sandbox configurations across environments
Keywords
sandbox container-security isolation least-privilege resource-limits seccomp docker-hardening agent-isolation
© 2026 googleadsagent.ai™ | Agent Skills™ | MIT License
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

