Hmbown/CodeWhale · error · anyhow::Error
refusing to trust skill outside CodeWhale-owned roots
Error message
refusing to trust skill outside CodeWhale-owned roots
What it means
Raised in trust_skill when the audited skill's root is not a writable CodeWhale-owned root. Trusting a skill writes a digest binding into the tool's owned state, which is only meaningful and safe for packages under its own roots; external locations cannot be trusted through this path.
Source
Thrown at crates/tui/src/skills/mutation.rs:975
Ok(SkillMutationReceipt {
action: SkillActionKind::Remove,
name: skill_id.canonical_name,
scope,
safe_target_path: safe_display_path(&path, Some(ctx.workspace), ctx.home),
before_digest: before,
after_digest: None,
outcome: SkillMutationOutcome::Removed,
})
}
fn trust_skill(
skill_id: AuditedSkillId,
expected_digest: String,
ctx: &MutationContext<'_>,
) -> Result<SkillMutationReceipt> {
let (skill, path) = find_audited_skill(ctx, &skill_id)?;
if !skill.root.is_writable_owned() {
bail!("refusing to trust skill outside CodeWhale-owned roots");
}
if skill.source_kind != SkillSourceKind::CodeWhaleManaged {
bail!("only CodeWhale managed skills can be trusted");
}
validate_owned_skill_path(ctx, &skill, &path)?;
let before = verify_expected_digest(&path, Some(&expected_digest))?;
validate_owned_skill_path(ctx, &skill, &path)?;
write_trust_v2(&path, &expected_digest)?;
let scope = match skill.root.kind {
SkillRootKind::CodeWhaleProject => SkillScope::Project,
SkillRootKind::CodeWhaleGlobal => SkillScope::Global,
_ => SkillScope::Logical,
};
Ok(SkillMutationReceipt {
action: SkillActionKind::Trust,
name: skill_id.canonical_name,
scope,
safe_target_path: safe_display_path(&path, Some(ctx.workspace), ctx.home),View on GitHub (pinned to 0c42157ee5)
Solutions
- Import the skill into an owned scope and trust the imported copy
- Trust bindings are only recorded for CodeWhale-owned roots; manage trust for external skills at their source
- Check that the skill id resolves to the owned package when duplicates exist
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/skills/mutation.rs:975 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/58e1c7ae3a6e4774.
Report an issue: GitHub.