You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Confine output paths: honor MCP roots (or SCREENCAST_ALLOWED_DIRS) and resolve relative paths under SCREENCAST_HOME #221
This is hardening for a tool that writes files based on arguments chosen by the agent. Relative paths currently resolve against the server's cwd, which for desktop clients is unpredictable (often the client's install dir or System32). Absolute output paths are accepted anywhere the user can write. MCP clients already pass roots to say where a server should operate.
Evidence
resolveOutput in src/utils/paths.tsresolve()s relative paths against process.cwd() and accepts any absolute path (overwriting needs overwrite: true). Nothing reads client roots.
Suggested approach
Resolve relative outputs under SCREENCAST_HOME/edits (or the first client root).
Read client roots when available, and optionally SCREENCAST_ALLOWED_DIRS.
Reject outputs outside the allowed set, with a clear error.
Apply the same allowlist to inputs where practical.
Document the behavior.
Done when
Relative outputs land in a predictable dir.
Outputs outside the allowed roots are rejected when roots are known (tests).
Activity