fix(security): reject symlink and path-containment escapes - #132
Draft
cursor[bot] wants to merge 4 commits into
Draft
fix(security): reject symlink and path-containment escapes#132cursor[bot] wants to merge 4 commits into
cursor[bot] wants to merge 4 commits into
Conversation
Harden agent/desktop workspace resolution against in-tree symlink follow-outs, constrain bash --cwd to allowed roots, stop rewrite_output_paths from injecting traversal/drive targets, and validate Tauri pending skill names. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Co-authored-by: EXboy <EXboys@users.noreply.github.com>
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
read_file/write_file(and desktop workspace editor) used lexicalnormalize_pathonly, so an in-workspace symlink to an outside target could be read/written.read_evolution_pending_skill_mdnow requires a single-segment pending skill name before joining under_pending.--cwdto skill dir / workspace / output dir / process cwd / skills root, and stopsrewrite_output_pathsfrom injecting../or Windows drive-absolute tokens.Bug Impact
SKILL.mdread outside_pendingvia Tauri pending preview (skill_name=/tmp/...).--cwd.Task Linkage
TASK-2026-080tasks/TASK-2026-080-workspace-symlink-path-safety/Injected Specs
spec/verification-integrity.mdspec/task-artifact-language.mdspec/security-nonnegotiables.mdspec/rust-conventions.mdspec/testing-policy.mdspec/docs-sync.md(N/A: fail-closed validation only)Validation Evidence
cargo test -p skilllite-agent path_containment→ 4 passedcargo test -p skilllite-agent rewrite_output_paths→ 3 passedcargo test -p skilllite-commands bash_cwd→ 2 passedcargo test -p skilllite-assistant pending_name --manifest-path crates/skilllite-assistant/src-tauri/Cargo.toml→ 2 passedcargo clippy -p skilllite-agent -p skilllite-commands --all-targets -- -D warnings -A dead_code -A clippy::question_mark -A clippy::useless_borrows_in_formatting→ cleancargo fmt -p skilllite-agent -p skilllite-commands -- --check→ cleanpython3 scripts/validate_tasks.py→ passed (71 task folders)workspace/leak.txt -> /tmp/secretpassed lexical check and opened outside content; Tauri-stylePath::joinwithskill_name=/tmp/outside_pendingread/tmp/outside_pending/SKILL.md.Regression Scope
--cwd/ stdio bashO_NOFOLLOWredesignDocs Sync (EN/ZH)
Files:
Security Review Notes
SKILLLITE_*config semantics? No.Review Checklist
tasks/TASK-2026-080-workspace-symlink-path-safety/TASK.mdsatisfiedtasks/TASK-2026-080-workspace-symlink-path-safety/STATUS.mdupdated with latest progresstasks/TASK-2026-080-workspace-symlink-path-safety/REVIEW.mdincludes merge readiness decisiontasks/board.mdstatus is up to date