fix(skills): route inline tool-dispatch slash commands through effective tool policy#75125
fix(skills): route inline tool-dispatch slash commands through effective tool policy#75125jony376 wants to merge 7 commits intoopenclaw:mainfrom
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. Source inspection on current main shows inline tool-dispatch skills build raw tools and only apply owner-only filtering, while the documented/shared tool builder applies the full effective policy chain. Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Land one canonical fix that routes inline skill tool dispatch through the effective tool-policy pipeline with regression coverage, changelog coverage, and redacted real behavior proof. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows inline tool-dispatch skills build raw tools and only apply owner-only filtering, while the documented/shared tool builder applies the full effective policy chain. Is this the best way to solve the issue? Yes, with process gaps. Reusing Full review comments:
Overall correctness: patch is correct Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 95a1c915312a. |
|
@clawsweeper please check this PR. I fixed conflicts. thanks |
|
Hi. @clawsweeper please check this PR if you have time. thanks |
Summary
command-dispatch: toolbuilt tools from rawcreateOpenClawTools(...)instead of the normal filtered session tool surface.createOpenClawCodingTools(...), forwarding the same session/group/sender/model context used by the shared command flow.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
command-dispatch: toolskill slash commands bypass effective tool policy #75124Root Cause (if applicable)
command-dispatch: toolinline slash-command path constructed raw OpenClaw tools directly and only applied owner-only filtering, instead of using the shared effective tool policy pipeline.Regression Test Plan (if applicable)
src/auto-reply/reply/get-reply-inline-actions.skip-when-config-empty.test.tscommand-dispatch: toolmust build tools throughcreateOpenClawCodingTools(...)using the canonical runtime policy session key plus target-session group/subagent metadata.User-visible / Behavior Changes
Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) YesYes/No) NoYes, explain risk + mitigation: the reachable inline tool-dispatch surface is narrower in restricted sessions because it now honors existing policy filters. This is a hardening change, not an expansion; mitigation is reuse of the existing sharedcreateOpenClawCodingTools(...)pipeline and added regression coverage.Repro + Verification
Environment
command-dispatch: toolskillSteps
command-dispatch: toolfor one of those restricted tools.Expected
Actual
Evidence
The slash-command tool dispatch path now respects effective tool-policy enforcement. In the restricted context, the tool is no longer exposed/invokable through the skill slash command path. In the allowed context, the same command still works normally.
Human Verification (required)
What you personally verified (not just CI), and how:
createOpenClawCodingTools(...); verified the forwarded context includes canonical runtime policy session key, target session group metadata, sender ownership, and model identifiers; added regression assertions for that path.pnpmnot on PATH, andcorepack pnpmfailed with anEPERMcreating its local cache directory).Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations