#23758: Skills: gate deterministic dispatch with allowTools
size: M
trusted-contributor
Cluster:
Tool and Plugin Enhancements
## Summary
- add `skills.commandDispatch.allowTools` config to explicitly allow deterministic `/skill` tool dispatch
- make deterministic `command-dispatch: tool` fail closed by default (deny-all when allowlist is unset/empty)
- keep allowlist matching policy-aware so patterns/group entries can be used
## Testing
- pnpm lint
- pnpm vitest run --config vitest.unit.config.ts src/auto-reply/reply/get-reply-inline-actions.skill-dispatch-allowlist.test.ts src/auto-reply/reply/get-reply-inline-actions.skip-when-config-empty.test.ts src/config/config.skills-entries-config.test.ts
- pnpm check *(fails on pre-existing upstream TypeScript errors unrelated to this PR)*
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds explicit allowlist control for deterministic skill dispatch to tools via `skills.commandDispatch.allowTools` config. This security feature fails closed by default (deny-all when unset/empty) and leverages existing policy-aware matching to support patterns and tool groups.
- Introduced `isSkillDispatchToolAllowed` function that checks `cfg.skills.commandDispatch.allowTools` and fails closed when empty
- Added check in `handleInlineActions` before executing tool dispatch at `get-reply-inline-actions.ts:203`
- Returns user-friendly error message when tool is blocked
- Comprehensive test coverage validates deny-by-default, allowlist matching, and blocking of non-allowlisted tools
- Reuses `isToolAllowedByPolicyName` for pattern matching consistency
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The implementation follows secure-by-default principles with fail-closed behavior, comprehensive test coverage validates all critical paths, reuses battle-tested policy matching logic, and includes proper TypeScript types and Zod schema validation
- No files require special attention
<sub>Last reviewed commit: 2f9dab1</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#23383: Skills: gate command-dispatch tool targets and args
by bmendonca3 · 2026-02-22
91.9%
#23743: Auto-reply: enforce tools.allow/tools.deny on deterministic skill t...
by bmendonca3 · 2026-02-22
86.3%
#23754: Skills: enforce capability manifest requirements
by bmendonca3 · 2026-02-22
75.7%
#21839: fix(skills): allowBundled: [] now blocks all bundled skills
by hydro13 · 2026-02-20
74.8%
#22198: fix(skills): treat empty allowBundled array as block-all
by haitao-sjsu · 2026-02-20
73.4%
#10016: fix: prevent FD exhaustion from skill watcher scanning artifact trees
by oldeucryptoboi · 2026-02-06
72.9%
#21727: skills: treat allowBundled [] as denylist for bundled skills
by AIflow-Labs · 2026-02-20
72.6%
#8075: fix(skills): add --ignore-scripts to all package managers
by yubrew · 2026-02-03
72.5%
#23795: Skills: enforce managed skills.lock integrity with allowUnlocked es...
by bmendonca3 · 2026-02-22
72.4%
#8150: fix(skills): block dangerous environment variables from skill config
by yubrew · 2026-02-03
72.0%