Repository navigation
Enforce path-qualified secret denies for Claude ACP native tool requests (VERIA-25) - #179
Draft
veria-ai[bot] wants to merge 4 commits into
Draft
veria-ai[bot] wants to merge 4 commits into
veria-ai[bot] wants to merge 4 commits into
Conversation
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
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.
Security fix: Claude ACP Native Tool Requests Bypass Path-Qualified Secret Denies
What was wrong
The Claude ACP permission handler in
packages/core/src/brain-acp.tspassed only the native request name to policy evaluation, ignoringrawInput. As a result, a broadReadallow bypassed path-qualified denies inpackages/core/src/tool-policy.ts, permitting reads of denied credential files.What changed
packages/core/src/brain-acp.tsreplaced name-only authorization withallowsNativeRequest, passing the explicit name,rawInput, and session working directory without falling back to the display title.packages/core/src/tool-policy.tsadded argument validation and path matching that evaluates denies before allows against both normalized paths and resolved filesystem targets, including symlinks and existing parents of new files.packages/core/test/brain-acp.test.tsandpackages/core/test/tool-policy.test.tsadded regression coverage for secret paths, traversal, symlinks, malformed arguments, working-directory semantics, and command constraints.Why this is safe
Qualified path denies now inspect the actual requested path, so broad grants cannot bypass them through traversal or symlink aliases; scoped path grants must cover both the requested path and its resolved target. Valid, non-denied requests remain allowed, and MCP and Codex authorization remain unchanged. Missing or malformed native arguments and unsupported matching deny constraints now fail closed, while prefix or wildcard Bash grants no longer authorize commands.
Fixes VERIA-25
This PR was generated by Veria AI.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.