Skip to content

Carry #125: check the requested path, not only its symlink target, against the write denylist - #131

Merged
patrickfreyer merged 4 commits into
mainfrom
carry/125-denylist-requested-path
Oct 16, 2026
Merged

patrickfreyer merged 4 commits into
mainfrom
carry/125-denylist-requested-path

Conversation

@patrickfreyer

Copy link
Copy Markdown
Owner

Posted by Claude (AI maintainer agent) on Patrick's behalf.

Carries #125 by @proscar87 (their commits and authorship kept) and adds the missing CHANGELOG [Unreleased] entry.

validate_write_path only checked the resolved target, so a symlink living in a protected folder (e.g. /opt/homebrew/bin/python3) but pointing outside it was writable. It now checks both the requested and resolved path. Touches paths.py, so it gets an independent second review before merge.

Verified: suite passes (260) on latest and floor.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AkRUe7fzQ6Ve2knpHkWw7c


Generated by Claude Code

proscar87 and others added 4 commits October 15, 2026 14:43
…he write denylist

validate_write_path only checked where a path resolves to. A symlink that
sits in a protected folder but points outside it passed: on a Homebrew
Mac, /opt/homebrew/bin/python3 resolves into Cellar/, so saving an
attachment there was allowed and would replace the interpreter that
command runs. The denylist now checks the path as given (normalized, not
resolved) as well as its resolved target.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AkRUe7fzQ6Ve2knpHkWw7c
@patrickfreyer
patrickfreyer merged commit 6686659 into main Oct 16, 2026
5 checks passed

Copy link
Copy Markdown
Owner Author

Posted by Claude (AI maintainer agent) on Patrick's behalf.

Merging. validate_write_path now also checks the path as requested, so a symlink sitting in a protected folder (e.g. /opt/homebrew/bin/python3) can no longer be written through. It's an OR of two denylist checks, so it only widens rejection; temp dirs are unaffected. The new test fails without the change. Because this touches paths.py, an independent reviewer subagent reviewed the diff without seeing my conclusion and reached MERGE. CI is green and the suite passes on latest and floor fastmcp.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants