fix(policy): recognize declared tool allowlists#89596
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 16, 2026, 4:49 PM ET / 20:49 UTC. Summary PR surface: Source +292, Tests +337. Total +629 across 9 files. Reproducibility: yes. Source inspection shows current main only classifies allowlists against materialized plugin groups and core tools, while the PR adds declared context and focused tests for valid MCP namespaces, typos, disabled entries, exact denies, broad wildcard denies, and duplicate-safe prefixes. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Merge the current declared-context implementation after maintainer review, keeping it diagnostics-only with the focused regression coverage already present. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main only classifies allowlists against materialized plugin groups and core tools, while the PR adds declared context and focused tests for valid MCP namespaces, typos, disabled entries, exact denies, broad wildcard denies, and duplicate-safe prefixes. Is this the best way to solve the issue? Yes. Feeding declared plugin/MCP facts into the shared tool-policy pipeline is the best boundary because it covers agent, gateway, skill, and embedded surfaces without duplicating doctor-only suppressions or changing actual tool filtering. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2a6c0ab5bff2. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +292, Tests +337. Total +629 across 9 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review Updated #89596 for the ClawSweeper findings on declared tool allowlist availability. New signed head: What changed:
Proof and validation are in the updated PR body, including terminal proof that enabled plugin/MCP declarations no longer warn while typo, disabled MCP, and denied plugin entries still warn. No merge performed. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Updated #89596 for the denied MCP finding. New signed head: What changed:
Validation in WSL from
Note: the final signed follow-up commit used |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
bbdedad to
bbebee9
Compare
|
Refreshed on current New signed head: Validation rerun locally:
No config, CLI, plugin API, or public surface changes. |
0d13d81 to
1a08138
Compare
|
Addressed the latest ClawSweeper finding about duplicate-aware denied MCP declarations. What changed:
Validation on signed head
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
56f9fa1 to
3f8628b
Compare
|
Merged via squash.
Thanks @giodl73-repo! |
Merged via squash. Prepared head SHA: 3f8628b Co-authored-by: giodl73-repo <[email protected]> Co-authored-by: giodl73-repo <[email protected]> Reviewed-by: @giodl73-repo
Merged via squash. Prepared head SHA: 3f8628b Co-authored-by: giodl73-repo <[email protected]> Co-authored-by: giodl73-repo <[email protected]> Reviewed-by: @giodl73-repo
Summary
bundle-mcp, sanitized server prefixes such aspaperless__*, duplicate-safe suffixed prefixes such asvigil-harbor-2__*, broader wildcard denies such aspaperless*, and exact tool denies such aspaperless__delete.Validation
OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/agents/tool-policy-pipeline.test.ts src/agents/tool-policy.plugin-only-allowlist.test.ts src/plugins/tools.optional.test.ts src/agents/agent-bundle-mcp-tools.request-boundary.test.ts --reporter=dot(3 shards, 114 tests)node_modules/oxfmt/bin/oxfmt --check --threads=1 src/agents/tool-policy-declared-context.ts src/agents/tool-policy-pipeline.test.ts src/skills/runtime/tool-dispatch.ts src/agents/agent-tools.ts src/agents/embedded-agent-runner/effective-tool-policy.ts src/gateway/tool-resolution.tsnode_modules/oxlint/bin/oxlint --tsconfig config/tsconfig/oxlint.core.json src/agents/tool-policy-declared-context.ts src/agents/tool-policy-pipeline.test.tsnode_modules/oxlint/bin/oxlint --tsconfig config/tsconfig/oxlint.core.json src/skills/runtime/tool-dispatch.ts src/agents/agent-tools.ts src/agents/embedded-agent-runner/effective-tool-policy.ts src/gateway/tool-resolution.tsgit diff --checkReal Behavior Proof
Real behavior proofworkflow passed on current head55d6738b585a036b29a5e864f013f5d6e4de1d93: https://github.com/openclaw/openclaw/actions/runs/27647305107/job/8176230890655d6738b585a036b29a5e864f013f5d6e4de1d93are green; merge state isCLEAN.Current Head
main.55d6738b585a036b29a5e864f013f5d6e4de1d93.