{"record":{"id":"2145a444ede37354","repo":"zeroclaw-labs/zeroclaw","slug":"cli-skills-audit-failed","errorCode":"cli-skills-audit-failed","errorMessage":"Skill audit failed.","messagePattern":"Skill audit failed\\.","errorType":"console","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/skills/mod.rs","lineNumber":230,"sourceCode":"            if report.is_clean() {\n                println!(\n                    \"  {} Skill audit passed for {} ({} files scanned).\",\n                    console::style(\"✓\").green().bold(),\n                    target.display(),\n                    report.files_scanned\n                );\n                return Ok(());\n            }\n\n            println!(\n                \"  {} Skill audit failed for {}\",\n                console::style(\"✗\").red().bold(),\n                target.display()\n            );\n            for finding in report.findings {\n                println!(\"    - {finding}\");\n            }\n            anyhow::bail!(get_required_cli_string(\"cli-skills-audit-failed\"));\n        }\n        crate::SkillCommands::Install {\n            source,\n            agent,\n            bundle,\n            no_tier_banner,\n            skill,\n        } => {\n            println!(\n                \"{}\",\n                get_required_cli_string_with_args(\n                    \"cli-skills-install-start\",\n                    &[(\"source\", &source)]\n                )\n            );\n\n            let location = resolve_install_location(config, agent.as_deref(), bundle.as_deref())?;\n            let skills_path = location.dir().to_path_buf();","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/skills/mod.rs#L212-L248","documentation":"`skills audit <source>` runs audit_skill_directory_with_options over a skill directory — an explicit path, or an installed skill located by name. When the report is not clean, each finding is printed as a '- finding' line under a red '✗ Skill audit failed' header, then the command bails with the generic cli-skills-audit-failed message. The actionable detail lives in stdout above the error, not in the error itself.","triggerScenarios":"Auditing a skill whose directory ships executable scripts while skills.allow_scripts = false (scripts_blocked findings); malformed SKILL.md frontmatter or disallowed content patterns; running audit as a CI gate over third-party or cloned skills.","commonSituations":"Installing a community skill that bundles setup.sh/hooks; allow_scripts turned off after the skill was already present; auditing a cloned repo path directly instead of an installed skill.","solutions":["Read the printed findings block first — each line names the concrete problem and file","If the findings are script-related and the scripts are trusted, set skills.allow_scripts = true in the config and re-run","Otherwise remove or fix the offending files (delete setup scripts, repair frontmatter) and re-audit","For third-party skills, prefer deleting the script over enabling scripts globally"],"exampleFix":"# before (config)\n[skills]\nallow_scripts = false\n\n# after — only when the audited scripts are trusted\n[skills]\nallow_scripts = true","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"let output = std::process::Command::new(\"zeroclaw\")\n    .args([\"skills\", \"audit\", target])\n    .output()?;\nif !output.status.success() {\n    let stdout = String::from_utf8_lossy(&output.stdout);\n    let findings: Vec<&str> = stdout.lines().filter(|l| l.trim_start().starts_with(\"- \")).collect();\n    // act on `findings`; the error message itself is generic\n}","preventionTips":["Never parse the generic 'Skill audit failed.' line — collect the '- finding' lines printed above it","Run audit right after every install so findings surface before the skill is relied on","Keep skills.allow_scripts off by default and allow it per-skill only after reviewing the scripts"],"tags":["cli","skills","security","audit","scripts"],"backgroundTag":"security-scan-findings","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}