Terminal Guardrail Sandbox
AI Safety Lab • OWASP LLM Top 10 • MCP & Prompt Injection Defense

AI Security, Red Teaming & Sandboxing

Test Plan vs Act shell guardrails, inspect indirect prompt injection and MCP tool poisoning attacks, audit OWASP LLM Top 10 & RAG RBAC controls, and export hardened repo policies.

Safety Lesson

Terminal Guardrail Sandbox

Compare read-only Plan Mode against guarded Act Mode command validation.

Test Payloads (Click to Run)
Sandbox initialized. Current agent execution policy: PLAN MODE (Read-Only).

6 High-Risk Agent Shell Patterns to Block

0/6 Audited
Recursive Root Deletion (rm -rf)CRITICAL

Attempts to destroy filesystem root, home directories, or workspace contents.

Fix: Require sandbox path allowlisting and block destructive flags in shell hooks.

Global Permission Escalation (chmod 777)HIGH

Grants universal read/write/execute privileges, exposing configs and credentials.

Fix: Enforce least-privilege POSIX permissions (600 for keys, 644 for source).

Secret Credential Exfiltration (.env / SSH)CRITICAL

Reads plaintext secrets into agent context where indirect injection can exfiltrate them.

Fix: Add .env* and key patterns to .aiignore and inject secrets outside agent-readable files.

Arbitrary Remote Script Execution (curl pipe)CRITICAL

Downloads unverified remote payloads and pipes directly into shell execution.

Fix: Disable outbound network in agent sandbox and enforce checksum verification.

Destructive Git Force PushHIGH

Overwrites shared production Git commit history without human review.

Fix: Protect main/prod branches on remote and forbid force-push flags in agent rules.

Unrestricted SQL WipeCRITICAL

Wipes production database tables or schema via raw unparameterized query.

Fix: Bind MCP database tools to read-only roles with row limits and query timeouts.