fix(gateway): redact credential-bearing diagnostics#82677
Merged
Conversation
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(gateway): redact credential-bearing diagnostics This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Member
Author
|
Pre-merge verification for this head:
Known scope: this lands the gateway diagnostic redaction fix. #66832 / #67041 and #79233 are adjacent linked items and need their own repaired landing path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
logging.redactSensitiveisoff.?token=... failed with 401keep thefailed with 401context.Related
logs.taillikely fails to redact several credential formats before returning log lines tooperator.readclients. #66832 (logs.tailshared redaction formats; separate surface)logs.taillikely fails to redact several credential formats before returning log lines tooperator.readclients. #66832)No closing refs: this patch is a gateway diagnostic redaction reliability pass, not the
logs.tailissue fix.Verification
node scripts/run-vitest.mjs src/gateway/client.test.ts -- --reporter=verbose -t "connect failure logs"2 passed,90 passednode scripts/run-vitest.mjs src/gateway/call.test.ts src/gateway/client.test.ts -- --reporter=dot5 passed,333 passedgit diff --checknode scripts/crabbox-wrapper.mjs run -provider blacksmith-testbox -blacksmith-org openclaw -blacksmith-workflow .github/workflows/ci-check-testbox.yml -blacksmith-job check -blacksmith-ref main -idle-timeout 90m -ttl 240m -timing-json -shell -- "CI=1 NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_TEST_PROJECTS_PARALLEL=6 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 OPENCLAW_TESTBOX=1 OPENCLAW_TESTBOX_REMOTE_RUN=1 pnpm check:changed"tbx_01krrwjvepsj3458ybk6bk1k6j, https://github.com/openclaw/openclaw/actions/runs/25968066889Real behavior proof
Behavior addressed: Gateway diagnostic strings no longer expose credential-bearing target URLs, Authorization bearer values, URL userinfo, or sensitive query params in connection/error logs, while preserving non-secret trailing diagnostic text.
Real environment tested: local Codex worktree for focused Vitest proof, plus Blacksmith Testbox for
pnpm check:changed.Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/gateway/call.test.ts src/gateway/client.test.ts -- --reporter=dot;OPENCLAW_TESTBOX=1 ... pnpm check:changedthroughnode scripts/crabbox-wrapper.mjs run -provider blacksmith-testbox ....Evidence after fix: focused tests assert raw
details.urlstill preserves connection behavior, display/error strings redactuser:passandtoken=..., connect failure logs redact bearer tokens and URL credentials even withlogging.redactSensitive: off, and the regression case preservesfailed with 401after?token=***.Observed result after fix: focused gateway tests passed and Testbox
check:changedexited 0.What was not tested: live remote gateway connection against a real credential-bearing URL; the fix is covered at the formatter/connection-details boundary with fake credentials.