Skip to content

Enforce path-qualified secret denies for Claude ACP native tool requests (VERIA-25) - #179

Draft
veria-ai[bot] wants to merge 4 commits into
mainfrom
veria/25-claude-acp-native-tool-requests-bypass-p
Draft

veria-ai[bot] wants to merge 4 commits into
mainfrom
veria/25-claude-acp-native-tool-requests-bypass-p

Conversation

@veria-ai

@veria-ai veria-ai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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.ts passed only the native request name to policy evaluation, ignoring rawInput. As a result, a broad Read allow bypassed path-qualified denies in packages/core/src/tool-policy.ts, permitting reads of denied credential files.

What changed

  • packages/core/src/brain-acp.ts replaced name-only authorization with allowsNativeRequest, passing the explicit name, rawInput, and session working directory without falling back to the display title.
  • packages/core/src/tool-policy.ts added 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.
  • Scoped Bash grants now require exact command matches; unsupported qualified denies refuse matching requests rather than falling back to broad allows.
  • packages/core/test/brain-acp.test.ts and packages/core/test/tool-policy.test.ts added 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.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot 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.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant