fix(skills): honor tool policy for inline dispatch#78525
fix(skills): honor tool policy for inline dispatch#78525eleqtrizit wants to merge 2 commits intoopenclaw:mainfrom
Conversation
|
Codex review: needs changes before merge. Summary Reproducibility: yes. By source inspection against current main, inline skill dispatch constructs raw OpenClaw tools and only applies owner-only filtering while the documented contract requires the full policy chain; the PR also has an exact-head CI reproduction for its introduced test failure. Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Land one canonical policy fix that mirrors normal tool surfaces, passes the focused auto-reply lane, and documents the user-visible hardening in CHANGELOG.md. Do we have a high-confidence way to reproduce the issue? Yes. By source inspection against current main, inline skill dispatch constructs raw OpenClaw tools and only applies owner-only filtering while the documented contract requires the full policy chain; the PR also has an exact-head CI reproduction for its introduced test failure. Is this the best way to solve the issue? No, not yet. The latest design is the right narrow path and fixes the earlier ACP-envelope security gap, but the PR must fix its failing test expectation and add the changelog entry before merge. Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 74ec956e429b. |
|
Standards pass on follow-up commit f0105aa:
Validation:
|
Summary
Changes
createOpenClawToolsdispatch surface while passing sender and session context into tool construction.tools.denyandtools.allowbehavior on inline skill tool dispatch.Validation
corepack pnpm test -- src/auto-reply/reply/get-reply-inline-actions.skip-when-config-empty.test.tscorepack pnpm formatcorepack pnpm checkcorepack pnpm buildclaude -p "/review"ran; it requested PR context instead of returning local findings.Real behavior proof
createOpenClawToolssurface.node --import tsx -e ...to callresolveSkillDispatchToolswithtools.deny: ["message"], plugins disabled, and a Telegram-like message context.{ "deniedTool": "message", "messageAvailable": false, "toolCount": 14 }messagedispatch target was absent from the resolved tool list (messageAvailable: false) while other real tools remained available.Notes
corepack pnpm teststill fails in unrelatedtest/scripts/test-planner.test.tsassertions; rerunning that file alone reproduces the same three failures.