fix: added path validation for skill names

This commit is contained in:
2026-06-03 14:59:57 -06:00
parent 7ec81ae607
commit 9879980304
3 changed files with 57 additions and 0 deletions
+1
View File
@@ -116,6 +116,7 @@ impl Skill {
}
pub fn load(name: &str) -> Result<Self> {
paths::validate_skill_name(name)?;
let path = paths::skill_file(name);
let content = read_to_string(&path)
.with_context(|| format!("Failed to read skill '{name}' at {}", path.display()))?;