#23743: Auto-reply: enforce tools.allow/tools.deny on deterministic skill tool dispatch
size: M
trusted-contributor
Cluster:
Tool and Plugin Enhancements
## Summary
- route deterministic skill `command-dispatch: tool` through the same tool-policy pipeline used by normal tool exposure paths
- enforce profile/global/agent/group/subagent tool policy layers before selecting a deterministic dispatch target
- keep owner-only enforcement in place and fail closed with the existing "Tool not available" reply when policy blocks a tool
- add focused unit coverage for both deny and allow paths on deterministic dispatch
## Testing
- pnpm check
- pnpm vitest run --config vitest.unit.config.ts src/auto-reply/reply/get-reply-inline-actions.skill-dispatch-tool-policy.test.ts
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR routes deterministic skill tool dispatch through the same comprehensive tool policy pipeline used by normal agent tool exposure, closing a security gap where `tools.allow`/`tools.deny` configurations were previously bypassed.
- Applies the full policy pipeline (profile, global, agent, group, and subagent policies) before selecting a deterministic dispatch target
- Maintains owner-only enforcement and fails closed with "Tool not available" when policy blocks access
- Adds focused unit tests covering both deny and allow policy enforcement paths
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The implementation correctly mirrors the established pattern in `pi-tools.ts:474-495`, applying owner-only filtering followed by the full tool policy pipeline. The changes close a security gap by enforcing tool policies on deterministic skill dispatch paths, and the comprehensive unit tests verify both blocking and allowing scenarios.
- No files require special attention
<sub>Last reviewed commit: 9bcbfcb</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#23758: Skills: gate deterministic dispatch with allowTools
by bmendonca3 · 2026-02-22
86.3%
#23383: Skills: gate command-dispatch tool targets and args
by bmendonca3 · 2026-02-22
83.0%
#16064: feat: add contact-based tool permissions with verification
by jamiequint · 2026-02-14
76.5%
#22873: fix(tools): enforce global inline-secret blocking for tool inputs
by Kansodata · 2026-02-21
76.4%
#23582: fix(tool-policy): add group:fs and group:runtime to group:openclaw
by arosstale · 2026-02-22
74.1%
#23783: Tools: add strict allowlist mode and fail closed on unknown entries
by bmendonca3 · 2026-02-22
74.1%
#22087: Preserve assistant reply when exec fails under suppressToolErrors
by graysurf · 2026-02-20
74.1%
#19707: fix(agents): apply per-agent skills filter to all run paths
by mcaxtr · 2026-02-18
73.8%
#23754: Skills: enforce capability manifest requirements
by bmendonca3 · 2026-02-22
73.4%
#9171: Fix: Route tool result deliveries through BlockReplyPipeline for pr...
by vishaltandale00 · 2026-02-04
73.1%