Repository navigation
refactor(cli): share mount flag parsing with profile overrides - #219
Merged
Merged
Conversation
vincentkoc
marked this pull request as ready for review
November 24, 2026 10:01
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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
Maintainers changing
--sandbox-mounthad to keep two copies of the same suffix and error handling in sync. Direct scans and profile overrides now use the runner's existing parser.Scope
CLI flag parsing only. Profiles still own YAML decoding and path validation. The code that starts Docker and constructs the mount arguments is unchanged.
Security / Trust Impact
Read-only defaults, writable suffixes, repeated-path precedence and path validation retain their existing behavior.
Verification
Compared the baseline and candidate CLI binaries with fixture-backed scanner evidence. All 16 comparisons matched, covering direct and explicit-profile invocations, plain paths, both writable suffixes, literal colons, repeated paths, missing paths, relative paths and missing writable path prefixes. Successful scans reported the expected sandbox mounts. Rejected inputs returned matching exit codes and error text.
go test -count=1 -p=1 ./internal/runner ./internal/profiles -run 'SandboxMount|SandboxOverrides'go test -count=1 -p=1 ./...go vet ./...go run ./cmd/clawscan --helpThe P0–P3 autoreview reported no actionable findings. The CLI comparison used recorded scanner output and did not need a Docker daemon.