ck_execute_code
Run generated code in a Docker sandbox with network, filesystem, secrets, shell, and deploy denied by default. Validates source before execution and supports dry-run planning.
Instructions
Execute generated code only inside a configured non-local sandbox. Defaults to Docker, denies network/filesystem/secrets/shell/deploy, validates source first, and supports dry_run for planning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| allowed_env_vars | No | List of environment variable names to expose from the host environment into the sandbox. Explicit env vars take precedence over host env vars. If empty, no host environment variables are exposed. | |
| code | Yes | Generated source code to validate and execute in the sandbox. | |
| dry_run | No | When true, validate and plan without executing the actual operation. | |
| language | No | Runtime language. Defaults to javascript. | |
| max_output_bytes | No | Maximum size in bytes for captured output. | |
| network_allowlist | No | ||
| requested_capabilities | No | ||
| risk_tier | No | Security sensitivity of the task. Default: medium. | |
| sandbox | No | Execution sandbox. Local host execution is intentionally unsupported. | |
| session_id | No | Unique session identifier for correlating findings, proofs, budget, and audit trail. | |
| task_id | No | ||
| timeout_ms | No | Timeout in milliseconds. |