Skip to content

Tool Policy

Client-side enforcement in Carina (and compatible agents) before a tool executes.

Rules

MechanismEnv varBehaviour
BlocklistSCOUT_BLOCKLISTComma-separated tool names denied outright
Rate limit (minute)SCOUT_RATE_LIMIT_MINUTEDefault 15 calls per session per minute
Rate limit (hour)SCOUT_RATE_LIMIT_HOURDefault 200 calls per session per hour
Dangerous commandsbuilt-inBlocks rm -rf /, fork bombs, dd, curl-to-shell patterns on shell-exec
Confirmationper toolshell-exec always; file-write on existing files; code-exec when imports detected

Errors thrown

ErrorMeaning
ToolBlockedErrorTool on blocklist
RateLimitErrorMinute or hour cap exceeded
DangerousCommandErrorShell pattern blocked
ConfirmationRequiredErrorUser has not approved yet

Scout reporting

Violations can be reported as events with event_type: tool_policy_violation so the dashboard shows policy blocks alongside injections.

Example blocklist

bash
SCOUT_BLOCKLIST=shell-exec,code-exec
SCOUT_RATE_LIMIT_MINUTE=10
SCOUT_RATE_LIMIT_HOUR=100

Restart the agent after changes.

Server-side policy API

GET /api/policy returns the active policy document for an instance (used by admin tools). Enforcement still happens on the agent for lowest latency.

MIT Licensed. Built by VERLOX Ltd.