Repository navigation
W10 G0: lock-file link refusal, MCP argument bounds, min_lift maximum - #46
Merged
Merged
Conversation
Every string argument of every MCP tool, and each focus entry, declares maxLength and is checked by the server before any store read, counted in Unicode scalar values: against 256; file, repo, path and focus entries 4096; query, symbol, id, from, to, kind and detail 1024. A longer one is the usage failure "NAME is longer than N characters", with no echo. min_lift takes 0 to 1000 in the command line and MCP, with the shared message "min_lift must be a number from 0 to 1000", and declares maximum 1000. README names the bounds under MCP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VirtualMachinist
marked this pull request as ready for review
October 31, 2026 10:52
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.
W10 gate G0: the four security-review nits from W9. Stacked series G0 to G3; this is the bottom PR, based on
main874b3eb.Store (lock file):
open_lock_fileandopen_existingrefuse a symlink (dangling or not), a directory, a FIFO or any other non-regular file at the lock path. They check withsymlink_metadatabefore opening and match(dev, ino)after, using std only. The refusal reuses the existing unsafe data-dir error, and its message names the role, never a path.tightenruns only on a verified file,lock_statereports the same refusal, and nothing is created or chmodded through a link.MCP bounds: every string argument of every tool has
maxLength, checked in the server before any store read and counted in Unicode scalar values:against: 256;file,repo,pathand eachfocusitem: 4096;query,symbol,id,from,to,kindanddetail: 1024.Over-length input gets the usage failure
NAME is longer than N characters, with no echo.min_lift: capped at 1000 in the CLI and MCP, with the messagemin_lift must be a number from 0 to 1000.Every
874b3ebreply, error andtools/listentry stays byte-identical after removing the top-levelmeta, apart from the new bounds. No new package inCargo.lock, no new crate, nounsafe, no newlibcuse.Draft until the gate is graded, the checks are green and the security review clears the head.
🤖 Generated with Claude Code