{"record":{"id":"9bab9a6aa33b574d","repo":"Tencent/WeKnora","slug":"sandbox-is-disabled","errorCode":null,"errorMessage":"sandbox is disabled","messagePattern":"sandbox is disabled","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sandbox/sandbox.go","lineNumber":100,"sourceCode":"\tDefaultCubeSandboxDomain = \"cube.app\"\n\t// DefaultCubeSandboxTTL is the Cube-side sandbox lifetime hint (in seconds)\n\t// requested at creation; the sandbox is torn down by CubeMaster if the\n\t// client goes silent for longer than this value.\n\tDefaultCubeSandboxTTL = 30 * time.Minute\n\t// DefaultCubeHTTPTimeout bounds a single HTTP call to the CubeAPI\n\t// (excluding user script execution which has its own per-call timeout).\n\tDefaultCubeHTTPTimeout = 30 * time.Second\n\n\t// DefaultE2BSandboxTTL matches the E2B SDK's built-in default so an\n\t// unset E2BSandboxTTL still yields a valid sandbox lifetime.\n\tDefaultE2BSandboxTTL = 5 * time.Minute\n\t// DefaultE2BHTTPTimeout bounds a single HTTP call to the E2B API.\n\tDefaultE2BHTTPTimeout = 30 * time.Second\n)\n\n// Common errors\nvar (\n\tErrSandboxDisabled   = errors.New(\"sandbox is disabled\")\n\tErrTimeout           = errors.New(\"execution timed out\")\n\tErrScriptNotFound    = errors.New(\"script not found\")\n\tErrInvalidScript     = errors.New(\"invalid script\")\n\tErrExecutionFailed   = errors.New(\"script execution failed\")\n\tErrSecurityViolation = errors.New(\"security validation failed\")\n\tErrDangerousCommand  = errors.New(\"script contains dangerous command\")\n\tErrArgInjection      = errors.New(\"argument injection detected\")\n\tErrStdinInjection    = errors.New(\"stdin injection detected\")\n)\n\n// Sandbox defines the interface for isolated script execution\ntype Sandbox interface {\n\t// Execute runs a script in an isolated environment\n\tExecute(ctx context.Context, config *ExecuteConfig) (*ExecuteResult, error)\n\n\t// Cleanup releases sandbox resources\n\tCleanup(ctx context.Context) error\n","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/sandbox/sandbox.go#L82-L118","documentation":"Sentinel returned by the sandbox manager when code execution is requested but sandboxes are disabled — either the sandbox handle is nil or the sandbox's Type() is SandboxTypeDisabled. It is a feature-flag-style guard meaning execution cannot and will not run in this deployment.","triggerScenarios":"Thrown at internal/sandbox/sandbox.go:100 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable sandboxing in configuration (choose a provider like E2B or Cube) and supply its credentials","Skip code-execution features gracefully when the error is returned (errors.Is check)","Communicate to users that code execution is unavailable in this deployment"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}