Tool Registry Filter removes denied tools before Claude sees them. Per-call check validates args + working directory. If no rule matches, user prompted. Bash AST analysis detects rm -rf, fork bombs, curl|bash, sudo escalation.
filterToolsByDenyRules() removes denied tools before Claude sees them. Claude cannot call what it cannot see.canUseTool() validates tool name, arguments, working directory against allow/deny/ask rules.| Mode | Behavior |
|---|---|
| default | Prompt for risky tools only |
| acceptEdits | Auto-allow file edits; prompt for shell |
| plan | Read-only — requires approval before execution |
| auto | ML classifier decides ANT internal-only |
| bypassPermissions | Skip all checks (dangerous — killswitch available) |
| dontAsk | Never prompt, auto-deny unsafe operations |
| bubble | Fork subagent — prompts surface to parent UI |
rm -rf /, fork bombs, curl | bash, sudo escalation, TTY injection, history manipulation — all rejected before canUseTool() via tree-sitter AST parsing with regex fallback. Max 50 subcommands per compound command (prevents CPU exhaustion).See slide 10 — Security for the full 24+ validator breakdown.