Repository navigation
fix(qqbot): limit channel API targets to configured groups [AI] - #101765
Conversation
|
外部 feat PR,根据项目贡献策略不接受 |
|
Codex review: needs maintainer review before merge. Reviewed July 9, 2026, 11:53 AM ET / 15:53 UTC. Summary PR surface: Source +77, Tests +110. Total +187 across 3 files. Reproducibility: yes. Current main passes only Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Merge only after a QQBot owner confirms that narrowed group configs should disable raw guild/channel API paths rather than requiring a separate guild/channel target allowlist. Do we have a high-confidence way to reproduce the issue? Yes. Current main passes only Is this the best way to solve the issue? Yes conditionally. The latest fail-closed scoped behavior is a narrow mitigation that avoids treating QQ group OpenIDs as guild/channel IDs, but it is the best fix only if maintainers approve that compatibility and security boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ef53c20497e1. Label changesLabel justifications:
Evidence reviewedPR surface: Source +77, Tests +110. Total +187 across 3 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
Review history (6 earlier review cycles)
|
|
Verification before merge: Behavior addressed: QQBot raw channel API calls now apply the configured QQBot group scope before any guild/channel API request is built or sent.
Regression Risk: Best fix verdict: User behavior change: |
…claw#101765) * fix(qqbot): scope channel API targets to configured groups * fix(qqbot): fail closed scoped channel API resources --------- Co-authored-by: Pavan Kumar Gondhi <[email protected]>
What Problem This Solves
Fixes an issue where QQBot channel API tool calls could request QQ guild or channel resources without applying the operator-configured QQBot group scope.
Why This Change Was Made
The QQBot channel API executor now receives the active OpenClaw config and account id from tool registration, classifies guild/channel targets from the requested API path, and checks those targets with the existing QQBot group policy resolver before making the outbound QQ API request. Scoped configurations deny broad guild listing and out-of-scope guild/channel paths before fetch; wildcard group scope and unscoped configurations keep the existing behavior.
AI-assisted: yes.
User Impact
Operators who configure QQBot group scope get the same target boundary on the raw QQ channel API tool. Existing unscoped or wildcard-scoped setups continue to use the channel API proxy normally.
Evidence
git diff --check./node_modules/.bin/oxfmt --write --threads=1 extensions/qqbot/src/engine/tools/channel-api.ts extensions/qqbot/src/engine/tools/channel-api.test.ts extensions/qqbot/src/bridge/tools/channel.tsnode scripts/run-vitest.mjs extensions/qqbot/src/engine/tools/channel-api.test.ts(14 tests passed)Proof gap: remote Testbox/Crabbox validation was not available in this workspace because the Crabbox and Blacksmith CLIs were not installed; the focused local fallback above passed.
groups: { G1: {} }on/users/@me/guilds; wildcard and unscoped probes reached the QQ endpoint and returned upstreamtoken not exist or expirewith status 500.