PTENES
MODULE 3.4

🏰 IronClaw β€” Zero-Trust Architecture

WASM Sandbox vs. Docker vs. VM, 3 levels of approval gates, the complete IronClaw stack, monitoring, red teaming, and security playbook.

6
Topics
75
Minutes
Advanced
Level
Architecture
Type
1

πŸ“¦ WASM Sandbox vs Docker vs VM

Execution isolation is the most important defense when AI runs real code. Three levels of isolation, each with different trade-offs in security, complexity, and performance.

πŸ“Œ Isolation Comparison

Choose based on your use case:

  • β€’WASM: maximum isolation, no access to FS/network, minimal overhead β€” for code evaluation
  • β€’Docker: good isolation, controlled access via volumes, low overhead β€” general use
  • β€’VM: complete isolation with a hypervisor, high overhead β€” for compliance and critical data
  • β€’None: blocklist + audit onlyβ€”for strictly personal use on a dedicated machine

πŸ’‘ Practical Tip

For a personal assistant in development, Docker with read-only volumes is the perfect balance: reasonable security with maximum convenience.

2

🚦 Approval Gates β€” 3 Levels

Approval gates are the human-in-the-loop of IronClaw. They define when Jarvis acts on its own and when it needs your explicit confirmation.

πŸ“Œ The 3 Levels of Autonomy

Each level defines which actions require approval:

  • β€’Level 1 - Read-only: only reads data, never writes. No confirmation. For public use.
  • β€’Level 2 - Supervised: any write or execution requires confirmation via Telegram. Default for personal use.
  • β€’Level 3 - Autonomous: pre-approved actions run without confirmation, but with a full audit trail. For well-defined routine tasks.

πŸ’‘ Practical Tip

Use Level 2 as the default. For specific, well-defined tasks (e.g., daily backup), create an allowlist of actions that operate at Level 3.

3

πŸ—Ί The Complete IronClaw Stack

IronClaw it's not a feature β€” it's an architecture. Five independent layers that work together to create real, auditable protection.

πŸ“Œ The 5 Layers in Detail

Each layer has a single responsibility:

  • β€’L1 Blocklist: immediately rejects prohibited commands β€” O(1) cost
  • β€’L2 Injection Detection: analyzes manipulation patterns β€” O(n) cost for the text
  • β€’L3 Approval Gate: asks a human before high-impact actions β€” ~5s latency cost
  • β€’L4 Sandbox: runs in an isolated environment β€” 50-200ms overhead
  • β€’L5 Audit: records everything immutably β€” O(1) append cost

πŸ’‘ Practical Tip

IronClaw adds ~200-300ms of total latency with all layers active. Imperceptible in conversations. For fast automation loops, consider disabling L3 with a granular allowlist.

4

πŸ“Š Monitoring and Alerts

Security without monitoring is blind defense. The audit_analyzer.py processes the log periodically and sends alerts when it detects suspicious patterns.

πŸ“Œ Monitored Patterns

Anomalies that trigger alerts:

  • β€’5+ injection attempts in 1 hour β€” possible active attack
  • β€’Access to a path outside the sandbox β€” bypass attempt
  • β€’More than 100 tool executions in 10 minutes β€” possible malicious loop
  • β€’API cost above the threshold β€” possible billing DoS
  • β€’Any repeated action='deny' β€” persistent bypass attempt

πŸ’‘ Practical Tip

Set up Telegram alerts so Jarvis can notify you of anomalies. It’s recursive, but it works β€” use a separate channel for security alerts.

5

πŸ§ͺ Testing Your Defenses

Untested defenses aren't defensesβ€”they're wishful thinking. Red team Jarvis itself verifies that each layer works as expected against real attacks.

πŸ“Œ Security Test Suite

Required tests after each change:

  • β€’test_blocklist.py: tests 50+ variations of dangerous commands
  • β€’test_injection.py: 20 known injection patterns
  • β€’test_path_traversal.py: simple traversal, double encoding, symlinks
  • β€’test_approval_gate.py: verifies that high-risk actions require confirmation
  • β€’test_audit.py: verifies that the log captures all actions

πŸ’‘ Practical Tip

Run the security suite as CI/CD. Any code change that breaks a security test should be blocked automatically.

6

πŸ“ Security Playbook

Incidents happen. A documented playbook before the incident is the difference between a controlled response and panic.

πŸ“Œ The 6 Playbook Steps

Incident response in order:

  • β€’1. KILL SWITCH: python -m intelecto stop β€” disables immediately
  • β€’2. PRESERVE: cp ~/.intelecto/audit.log /secure/backup/incident-$(date).log
  • β€’3. ANALYZE: python audit_analyzer.py --mode forensic --output report.txt
  • β€’4. REVOKE: revoke all potentially compromised API keys
  • β€’5. RESTORE: python setup.py --restore /secure/clean-backup
  • β€’6. POST-MORTEM: document what happened, how it was detected, and what changed

πŸ’‘ Practical Tip

Practice the playbook in a test environment before you need to use it in production. You don't want to learn the commands during a real incident.

βœ… Module 3.4 Summary

βœ“
WASM Sandbox vs. Docker vs. VM β€” WASM > Docker > VM for security; the reverse for practicality β€” choose based on your use case
βœ“
Approval Gates β€” 3 Levels β€” 3 levels: read-only, supervised, and autonomousβ€”scaled according to the risk of the action
βœ“
The Complete IronClaw Stack β€” 5 sequential layers, ~200ms total latency, real and auditable protection
βœ“
Monitoring and Alerts β€” 5 anomaly categories monitored with automatic alerts via Telegram
βœ“
Testing Your Defenses β€” 5 test suites covering every layer β€” run as CI/CD for continuous assurance
βœ“
Security Playbook β€” 6 steps: kill β†’ preserve β†’ analyze β†’ revoke β†’ restore β†’ post-mortem

Next:

Track 4: Integrations