fix(auto-reply): redact secrets in config show output#88496
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 31, 2026, 4:29 AM ET / 08:29 UTC. Summary PR surface: Source +23, Tests +172. Total +195 across 2 files. Reproducibility: yes. source-level reproduction is high confidence: current main reads raw 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this after current-head proof covers both Do we have a high-confidence way to reproduce the issue? Yes, source-level reproduction is high confidence: current main reads raw Is this the best way to solve the issue? Yes, the proposed direction is the narrow maintainable fix: reuse the existing schema-aware config redaction contract instead of adding a new local redactor. The remaining issue is updated current-head real behavior proof, not a different implementation path. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 15ae2deb3067. Label changesLabel justifications:
Evidence reviewedPR surface: Source +23, Tests +172. Total +195 across 2 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 |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
c055d79 to
c24dbdc
Compare
c24dbdc to
8c64bb9
Compare
|
Behavior addressed: Real environment tested: local checkout on Exact steps or command run after this patch:
Evidence after fix: focused local test passed with 1 file / 19 tests. Autoreview reported clean with no accepted/actionable findings. PR-specific CI passed: Observed result after fix: What was not tested: no external chat-channel delivery was exercised manually. The broad CI run |
Summary
/config showchat output through the shared schema-aware config redaction path./config showrendering.browser.cdpUrlURLs carrying token/apiKey query secrets.Review update
Addressed ClawSweeper feedback by replacing the local key-name-only redactor with
redactConfigSnapshot(snapshot, loadGatewayRuntimeConfigSchema().uiHints), matching the gateway config redaction contract.Behavior addressed
/config showpreviously rendered plaintext secret values from config into chat-visible command output.Before fix
A focused local regression test seeded config with fake canaries:
OPENCLAW_CONFIG_SHOW_CANARY_TOKEN_65623OPENCLAW_CONFIG_SHOW_CANARY_PASSWORD_65623OPENCLAW_CONFIG_SHOW_CANARY_API_KEY_65623OPENCLAW_CONFIG_SHOW_CANARY_CDP_TOKEN_65623OPENCLAW_CONFIG_SHOW_CANARY_CDP_API_KEY_65623The unpatched command-output path included raw canary values in rendered
/config showresponses.After fix
The command redacts the parsed config snapshot with the shared schema-aware redaction contract before rendering chat-visible text. Full
/config showand/config show <path>now both see the redacted snapshot.Real behavior proof
/config showshould not return plaintext config secrets, including sensitive URL query credentials, in chat-visible command output.b06ad3c59c1291153e49dc7b0e23667dcf7c6f15, Nodev24.15.0, temp config file supplied throughOPENCLAW_CONFIG_PATHand read by the realreadConfigFileSnapshot()path./tmp/openclaw-pr65623-live-*/openclaw.jsonwith fake canary values undergateway.auth.token,gateway.auth.password,models.providers.openai.apiKey, andbrowser.cdpUrlquery parameters, then ranOPENCLAW_CONFIG_PATH="$config" node --import tsx -to invoke the real/config showcommand handler with an owner text-command context./config showand/config show browser.cdpUrlboth returned chat-formatted config text with the seeded secret values replaced by__OPENCLAW_REDACTED__; no raw canary strings appeared.Validation
HEAD:
b06ad3c59c1291153e49dc7b0e23667dcf7c6f15pnpm test src/auto-reply/reply/commands-gating.test.tspass: 1 file, 18 testspnpm test src/auto-reply/reply/commands-parse.test.ts src/auto-reply/reply/commands-slash-parse.test.ts src/auto-reply/command-control.test.tspass: 3 files, 58 tests across 2 shardspnpm exec oxfmt --check --threads=1 src/auto-reply/reply/commands-config.ts src/auto-reply/reply/commands-gating.test.tspassgit diff --checkpassProof log:
/tmp/openclaw-pr65623-proof.logValidation log:
/tmp/openclaw-pr65623-validation.logReviewer note
This patch intentionally redacts only the user-visible
/config showcommand output. It does not alter config storage, config loading,SecretRefresolution, or internal diagnostic state.Fixes #65623