Skip to content

fix: normalize plain-string allowedRoots in mount setup#1071

Open
shawnyeager wants to merge 1 commit intoqwibitai:mainfrom
shawnyeager:fix/normalize-mount-allowlist-roots
Open

fix: normalize plain-string allowedRoots in mount setup#1071
shawnyeager wants to merge 1 commit intoqwibitai:mainfrom
shawnyeager:fix/normalize-mount-allowlist-roots

Conversation

@shawnyeager
Copy link

Summary

  • setup/mounts.ts accepts plain strings in allowedRoots (e.g. "/home/user/Work") but mount-security.ts expects objects with { path, allowReadWrite }. This mismatch causes valid mounts to be silently rejected at runtime.
  • Normalizes plain strings to { path: string, allowReadWrite: true } before writing the config file, so both formats work.

Test plan

  • Run 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 }
  • Run the same with the object format and verify it passes through unchanged
  • Verify mounts are accepted at container startup (no REJECTED warnings in logs)

🤖 Generated with Claude Code

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>
@shawnyeager shawnyeager force-pushed the fix/normalize-mount-allowlist-roots branch from 5e01205 to 30f5495 Compare March 14, 2026 14:44
@Andy-NanoClaw-AI Andy-NanoClaw-AI added Status: Needs Review Ready for maintainer review PR: Fix Bug fix labels Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Fix Bug fix Status: Needs Review Ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants