fix(cli): harden skill name handling during install (#2597)
* fix(cli): validate skill names to prevent path traversal on install Adds boundary validation and containment checks so a remote SKILL.md with a malicious name field (e.g. `name: ..`) cannot escape the skills root during `ctx7 skills install`. Previously, the value flowed from parseSkillFrontmatter to installSkillFiles unchecked, and the existing traversal guard only verified files stayed inside the attacker-chosen directory rather than the real skills root, enabling arbitrary file writes outside `.claude/skills` (e.g. `.claude/settings.json` for hook-driven RCE). symlinkSkill had the same trust issue and could `rm(recursive: true)` arbitrary directories. * chore: add changeset for skill name validation * chore: soften changeset wording
F
Fahreddin Özcan committed
61de754d48e57d5c22dadd4540a74203fd55ecf1
Parent: c918e80
Committed by GitHub <noreply@github.com>
on 5/12/2026, 12:13:36 PM