fix(root_policy): block /private/etc and /var subtree (#406 P0, #407 P1)#415
Merged
fix(root_policy): block /private/etc and /var subtree (#406 P0, #407 P1)#415
Conversation
Benchmark Regression ReportThresholds: 10.00% and 50,000 ns absolute delta
|
On macOS /etc is a symlink to /private/etc; realPathFile resolves user-supplied paths to their /private/* form before isIndexableRoot runs. The system_prefixes deny list covers /etc but not /private/etc, so the canonical form bypasses the policy entirely. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…y list The system_prefixes deny list covers /var/folders and /var/tmp but not /var itself or /var/log, /var/lib, /var/db. On Linux these hold logs, mail, and package state; on macOS realPathFile turns /var into /private/var which is also unblocked. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7ac4d1b to
0647a73
Compare
Benchmark Regression ReportThresholds: 10.00% and 50,000 ns absolute delta
|
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.
Closes #406 (P0 macOS bypass), #407 (P1 /var gaps). Adds /private/etc, /var, /private/var to the deny list. Tests pass; suite green.