fix(active-memory): require admin scope for global toggles [AI]#78863
fix(active-memory): require admin scope for global toggles [AI]#78863pgondhi987 merged 4 commits intoopenclaw:mainfrom
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. by source inspection: invoke the Active Memory command handler on current main with Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the narrow handler-level authorization fix after maintainer review, redacted real behavior proof, and focused test evidence confirm write-scoped gateway clients cannot change global Active Memory while admin, status, and session paths still work. Do we have a high-confidence way to reproduce the issue? Yes by source inspection: invoke the Active Memory command handler on current main with Is this the best way to solve the issue? Yes: a handler-level check before the global mutation branches is the narrowest maintainable fix because command-level required scopes would also block read-only global status and session-level toggles. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 1831e124b221. |
|
Not applicable to this automation stage; changelog/release-note and external real behavior proof requirements are handled outside auto-pr stages. Quoted comment from @clawsweeper:
|
* fix: gate active-memory global writes by admin scope * addressing claude review * docs: add changelog entry for PR merge
…claw#78863) * fix: gate active-memory global writes by admin scope * addressing claude review * docs: add changelog entry for PR merge
…claw#78863) * fix: gate active-memory global writes by admin scope * addressing claude review * docs: add changelog entry for PR merge
Summary
/active-memory on --globaland/active-memory off --globalwrote gateway-wide config without checking gateway client admin scope.operator.admin./active-memory status --globaland session-level/active-memory on|off|statusremain available to non-admin write-scoped callers.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
operator.admin.operator.adminrequirement before callingreplaceConfigFilefor write-scoped global on/off requests.Root Cause (if applicable)
replaceConfigFile.requiredScopeswould have been too broad because it would also block status and session-level toggles.Regression Test Plan (if applicable)
extensions/active-memory/index.test.tsreplaceConfigFilecalls.User-visible / Behavior Changes
Gateway clients with
operator.writebut notoperator.adminnow receive an admin-scope requirement when using/active-memory on --globalor/active-memory off --global. Session-level toggles and global status are unchanged.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) YesYes/No) NoYes, explain risk + mitigation: global Active Memory on/off commands now requireoperator.adminfor gateway-scoped callers; read-only global status and session-level toggles remain available.Repro + Verification
Environment
Steps
gatewayClientScopes: ["operator.write"]andargs: "off --global".gatewayClientScopes: ["operator.admin"]andargs: "off --global".gatewayClientScopes: ["operator.write"].Expected
operator.adminis required and do not callreplaceConfigFile.Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
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