fix(commands): reject symlink follow during skill install - #148
Draft
cursor[bot] wants to merge 2 commits into
Draft
cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
copy_skill used fs::copy and Path::is_dir, which follow symlinks. A skill containing a link to /etc/passwd or ~/.ssh was materialized into .skills/. Fail closed on copied symlinks and inspect the source before deleting dest so a rejected overwrite cannot wipe an install. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Update TASK-2026-071 status, review evidence, and board after fmt/clippy/test runs. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
9 tasks
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 add, skill update-from-source, and OpenClaw import copied skill trees withstd::fs::copy/Path::is_dir, both of which follow symlinks.passwd-link -> /etc/passwd(or a directory link to$HOME/~/.ssh) materialized host file contents into.skills/<name>/. That is an install-time arbitrary file read and can leak secrets if the installed tree is committed, shared, or executed..venv,node_modules, …) are still skipped even if those names are themselves symlinks.Task Linkage
TASK-2026-071tasks/TASK-2026-071-reject-skill-install-symlinks/Injected Specs
spec/verification-integrity.mdspec/task-artifact-language.mdspec/architecture-boundaries.md(if architecture/layering changed)spec/security-nonnegotiables.md(if sandbox/security changed)spec/rust-conventions.mdspec/testing-policy.md(required for any code change)spec/docs-sync.md(if behavior/docs/env/commands changed)Validation Evidence
python3 scripts/validate_tasks.pycargo fmt --checkcargo clippy --all-targets -- -D warningscargo test -p skilllite-commands --lib -- copy_skill(5 passed)cargo test -p skilllite --test e2e_minimal(3 passed, includinge2e_add_rejects_symlink_to_host_file)cargo test -p skilllite-commands/cargo test -p skilllite/cargo test(0 failed)ln -s /etc/passwdproduced a regular file starting withroot:x:0:0symlink is not allowedand dest is left untouchedRegression Scope
skilllite add,update_skill_from_source,import-openclaw-skillsDocs Sync (EN/ZH)
README.mddocs/zh/README.mdReview Checklist
tasks/TASK-2026-071-reject-skill-install-symlinks/TASK.mdsatisfied (or explicitly deferred)tasks/TASK-2026-071-reject-skill-install-symlinks/STATUS.mdupdated with latest progresstasks/TASK-2026-071-reject-skill-install-symlinks/REVIEW.mdincludes merge readiness decisiontasks/board.mdstatus is up to date