{"record":{"id":"c931e530552c6f7e","repo":"zeroclaw-labs/zeroclaw","slug":"screenshot-path-path-resolves-to-canoni","errorCode":null,"errorMessage":"Screenshot path '{ $path }' resolves to '{ $canonical }' which is outside the workspace","messagePattern":"Screenshot path '(.+?)' resolves to '(.+?)' which is outside the workspace","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/browser.rs","lineNumber":891,"sourceCode":"        let canonical = tokio::fs::canonicalize(parent).await.with_context(|| {\n            crate::i18n::get_required_tool_string_with_args(\n                \"tool-browser-screenshot-error-parent-not-exist\",\n                &[\n                    (\"path\", raw_path),\n                    (\"parent\", &parent.display().to_string()),\n                ],\n            )\n        })?;\n\n        if !self.security.is_resolved_path_allowed(&canonical) {\n            let msg = crate::i18n::get_required_tool_string_with_args(\n                \"tool-browser-screenshot-error-path-outside-workspace\",\n                &[\n                    (\"path\", raw_path),\n                    (\"canonical\", &canonical.display().to_string()),\n                ],\n            );\n            anyhow::bail!(\"{msg}\");\n        }\n\n        // Build the final *target* path (parent + file name) so we can apply\n        // the same target-level guards the file_write / file_edit tools use.\n        let Some(file_name) = full.file_name() else {\n            let msg = crate::i18n::get_required_tool_string_with_args(\n                \"tool-browser-screenshot-error-missing-filename\",\n                &[(\"path\", raw_path)],\n            );\n            anyhow::bail!(\"{msg}\");\n        };\n        let resolved_target = canonical.join(file_name);\n\n        if self.security.is_runtime_config_path(&resolved_target) {\n            let msg = crate::i18n::get_required_tool_string_with_args(\n                \"tool-browser-screenshot-error-runtime-config-target\",\n                &[\n                    (\"path\", raw_path),","sourceCodeStart":873,"sourceCodeEnd":909,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/browser.rs#L873-L909","documentation":"The screenshot path's parent directory was canonicalized and resolved outside the allowed workspace root (both the requested and canonical path are shown, typically via symlinks or .. components). Writing there would escape the tool's filesystem sandbox.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/browser.rs:891 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a screenshot path that resolves inside the workspace; remove symlinks/traversal pointing outside."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","contentChangedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}