fix(memory): reject path-escaping memory rel_path values - #129
Draft
cursor[bot] wants to merge 2 commits into
Draft
fix(memory): reject path-escaping memory rel_path values#129cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
Executor memory_write only blocked ".." and leading "/", so Windows drive-absolute and backslash-rooted paths could replace the memory root via Path::join. Validate nested relatives centrally and fail closed before any filesystem mutation. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Capture scope, validation evidence, and board status for the executor memory rel_path path-escape fix. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
17 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
memory_writejoined caller-controlledrel_pathunder<chat_root>/memory/after only checkingcontains("..")/starts_with('/'). On Windows, drive-absolute and backslash-rooted values (e.g.C:/Temp/pwn.md,\Windows\Temp\pwn.md) replace the memory root viaPath::joinand write outside the chat tree.validate_memory_rel_path/memory_file_under_dirinskilllite-core, wires them into executor RPC write + markdown reindex, and keeps nested/relatives likenotes/day.mdworking.Bug Impact
<chat_root>/memory/under process permissions on Windows hosts.memory_writewithrel_path: "C:/Temp/pwn.md"(or\\Windows\\Temp\\pwn.md) and any content.Task Linkage
TASK-2026-077tasks/TASK-2026-077-memory-rel-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; no user-facing path grammar docs)spec/architecture-boundaries.md(reviewed; no boundary changes)Validation Evidence
cargo fmt --all -- --check→ cleancargo test -p skilllite-core path_validation→ 3 passedcargo test -p skilllite-executor --lib→ 6 passedcargo clippy -p skilllite-core -p skilllite-executor --all-targets -- -D warnings→ cleanpython3 scripts/validate_tasks.py→ passed (71 task directories)C:/Temp/pwn.md,\Windows\Temp\pwn.md,/tmp/pwn.md,../escape.mdrejected before writenotes/day.mdstill written underchat/memory/Regression Scope
memory_writeRPC and memory markdown reindex filteringagent_idhardening (lands separately)Docs Sync (EN/ZH)
Files:
Security Review Notes
memory/even when Windows join semantics replace roots.SKILLLITE_*config semantics? No.Review Checklist
tasks/TASK-2026-077-memory-rel-path-safety/TASK.mdsatisfiedtasks/TASK-2026-077-memory-rel-path-safety/STATUS.mdupdated with latest progresstasks/TASK-2026-077-memory-rel-path-safety/REVIEW.mdincludes merge readiness decisiontasks/board.mdstatus is up to date