{"record":{"id":"ced20d169f61d267","repo":"zeroclaw-labs/zeroclaw","slug":"open-skill-markdown-escapes-repository-root","errorCode":null,"errorMessage":"Open-skill markdown escapes repository root: {}","messagePattern":"Open-skill markdown escapes repository root: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/skills/audit.rs","lineNumber":91,"sourceCode":"\n    Ok(report)\n}\n\npub fn audit_open_skill_markdown(path: &Path, repo_root: &Path) -> Result<SkillAuditReport> {\n    if !path.exists() {\n        bail!(\n            \"Open-skill markdown not found: {}\",\n            path.display().to_string()\n        );\n    }\n    let canonical_repo = repo_root\n        .canonicalize()\n        .with_context(|| format!(\"failed to canonicalize {}\", repo_root.display().to_string()))?;\n    let canonical_path = path\n        .canonicalize()\n        .with_context(|| format!(\"failed to canonicalize {}\", path.display().to_string()))?;\n    if !canonical_path.starts_with(&canonical_repo) {\n        bail!(\n            \"Open-skill markdown escapes repository root: {}\",\n            path.display()\n        );\n    }\n\n    let mut report = SkillAuditReport {\n        files_scanned: 1,\n        findings: Vec::new(),\n        ..Default::default()\n    };\n    audit_markdown_file(&canonical_repo, &canonical_path, &mut report)?;\n    Ok(report)\n}\n\nfn collect_paths_depth_first(root: &Path) -> Result<Vec<PathBuf>> {\n    let mut stack = vec![root.to_path_buf()];\n    let mut out = Vec::new();\n","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/skills/audit.rs#L73-L109","documentation":"After canonicalizing both paths, the open-skill markdown file resolved outside the repository root it is being audited against. This guard prevents the auditor from following symlinks or crafted paths to scan files that are not part of the skill's repo.","triggerScenarios":"Thrown at crates/zeroclaw-runtime/src/skills/audit.rs:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove path traversal from the skill path so it stays inside the repository root."],"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"}