fix(security): reject path-escaping skill directory names - #125
Draft
cursor[bot] wants to merge 3 commits into
Draft
fix(security): reject path-escaping skill directory names#125cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
Validate skill names as a single path segment before joining under skills roots so malicious SKILL.md frontmatter and MCP/CLI skill_name values cannot write, read, or delete outside the skills directory. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Apply rustfmt to the new add regression test and mark TASK-2026-073 validation complete on the task board. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Co-authored-by: EXboy <EXboys@users.noreply.github.com>
This was referenced Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
skilllite addtrusted SKILL.md frontmatternamefor install destinations (skills_path.join(name)), allowing writes outside the skills root (e.g.name: ../keep-me).get_skill_info/run_skilland CLIfind_skill/removeby validating skill names as a single safe path segment before join.validate_skill_dir_name/skill_dir_under_rootinskilllite-coreplus regression tests for add/MCP/show escape attempts.Task Linkage
TASK-2026-073tasks/TASK-2026-073-skill-name-path-safety/Injected Specs
spec/verification-integrity.mdspec/task-artifact-language.mdspec/security-nonnegotiables.mdspec/architecture-boundaries.md(reviewed; no boundary changes)spec/rust-conventions.mdspec/testing-policy.mdspec/docs-sync.md(reviewed; no docs needed — no user-facing command/env/policy wording change)Validation Evidence
cargo test -p skilllite-core path_validationcargo test -p skilllite-commands path_traversalcargo test -p skilllite --test cli_mcp --test cli_skill_managementcargo fmt --checkcargo clippy -p skilllite-core -p skilllite-commands -p skilllite --all-targets -- -D warnings -A clippy::question_mark -A clippy::useless_borrows_in_formattingpython3 scripts/validate_tasks.py3 passed3 passed(includes add frontmatter escape rejection)14 + 21 passedTask validation passed (71 task directories checked)Regression Scope
skilllite addinstall destination selectionget_skill_info/run_skillDocs Sync (EN/ZH)
Review Checklist
tasks/TASK-2026-073-skill-name-path-safety/TASK.mdsatisfiedtasks/TASK-2026-073-skill-name-path-safety/STATUS.mdupdated with latest progresstasks/TASK-2026-073-skill-name-path-safety/REVIEW.mdincludes merge readiness decisiontasks/board.mdstatus is up to dateSecurity review notes
SKILLLITE_*config semantics or backward compatibility? No env/config change; only rejects previously unsafe multi-segment/absolute names.