SSH command blocklist
The blocklist preventsssh_exec from running commands that match any entry in the list. Matching happens before the SSH connection is made — a blocked command never leaves the server.
How it works
Matching is substring-based and case-insensitive. Ifrm -rf is in the blocklist, all of the following are blocked:
success: false and blocked: true:
Configuration
Directory allowlist
The directory allowlist restrictsssh_exec to paths under specific prefixes. When the list is non-empty, ssh_exec parses path tokens from the command and rejects any that fall outside the allowed set.
How it works
Matching is prefix-based. The tool extracts tokens from the command that start with/, ~, or ./, then checks each one:
allowed_dirs list (the default) applies no restriction — all paths are permitted.
Configuration
Domain whitelisting for fetch_external
fetch_external and github_search only proxy requests to domains listed in PROXY_ALLOWED_DOMAINS. Requests to any other hostname are rejected before any network call is made.
.env
Principle of least exposure
Different tools receive different subsets of the environment to minimize what each one can access:| Tool | What it receives |
|---|---|
ssh_exec | No env — operates on config only |
tailscale_status | Tailscale API key only |
fetch_external, github_search | allowedDomains + full env (for token injection) |
gist_kb, browser | Full env object |
GITHUB_TOKEN in its arguments cannot use it, regardless of what’s in the process environment.
Audit logging
Every tool call is logged to a file with timestamp, tool name, sanitized arguments, and result. Sensitive keys (token, password, secret, key) are stripped automatically before writing.
See Audit log for the full reference.
Dry-run mode
WhenDRY_RUN=true, ssh_exec evaluates safety rules and returns a would_execute response without making any SSH connection. Useful for validating your setup or testing a new blocklist configuration.
See Dry-run mode for details.