Prevent capa install from escaping shadow workspaces via symlinks - #175
Prevent capa install from escaping shadow workspaces via symlinks#175Minitour wants to merge 3 commits into
Conversation
Refuse install writes through symlink-collapsed provider paths, validate and repair wrap shadow layouts on each session, and improve the agent rule for seamless shadow workspace use. Co-authored-by: Cursor <cursoragent@cursor.com>
Use title/task fields expected by runTasks so tsc --noEmit passes in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
PR Summary by QodoGuard shadow workspace installs against symlink escapes
AI Description
Diagram
High-Level Assessment
Files changed (15)
|
Code Review by Qodo
1.
|
Validate leaf subagent paths before write/delete, reject Windows cross-drive and absolute relative paths, and add regression tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
capa installwrites when provider paths collapse through symlinks (e.g..cursor/skills→skills/), with upfront validation and per-write guards across skills, rules, agents, and plugins.capa wrap, validate and repair the shadow workspace: remove provider dirs that link into the real project, fix nested install-path symlinks, and sync missing top-level project entries.Test plan
bun test src/shared/__tests__/install-path-guard.test.tsbun test src/cli/utils/wrap/__tests__/validate-shadow-workspace.test.tsbun test src/cli/utils/wrap/__tests__/workspace.test.tsbun test(1518 pass)Made with Cursor