fix: normalize plain-string allowedRoots in mount setup#1071
Open
shawnyeager wants to merge 1 commit intoqwibitai:mainfrom
Open
fix: normalize plain-string allowedRoots in mount setup#1071shawnyeager wants to merge 1 commit intoqwibitai:mainfrom
shawnyeager wants to merge 1 commit intoqwibitai:mainfrom
Conversation
The mount allowlist expects allowedRoots entries as objects with
{ path, allowReadWrite }, but the setup step accepted and wrote
plain strings without converting them. This caused mount-security.ts
to silently reject valid mounts at runtime.
Now normalizes plain strings to { path: string, allowReadWrite: true }
before writing the config file.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5e01205 to
30f5495
Compare
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
setup/mounts.tsaccepts plain strings inallowedRoots(e.g."/home/user/Work") butmount-security.tsexpects objects with{ path, allowReadWrite }. This mismatch causes valid mounts to be silently rejected at runtime.{ path: string, allowReadWrite: true }before writing the config file, so both formats work.Test plan
npx tsx setup/index.ts --step mounts -- --json '{"allowedRoots":["/home/user/Work"],"blockedPatterns":[],"nonMainReadOnly":true}'and verify the written file contains{ "path": "/home/user/Work", "allowReadWrite": true }🤖 Generated with Claude Code