security(logging): redact payment credential fields#75230
Conversation
|
Codex review: passed for ClawSweeper automerge. What this changes: The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog. Automerge follow-up: No repair lane is needed: the PR is opted into automerge, exact-head checks are green, the branch is mergeable, and the review found no actionable correctness or security findings. Security review: Security review cleared: The diff is redaction hardening with tests/docs/changelog only and introduces no new dependencies, workflows, permissions, package resolution changes, lifecycle hooks, downloads, or code execution surfaces. Review detailsBest possible solution: Land the narrow field-name-scoped redaction hardening via the maintainer-approved automerge path, while leaving the broader raw exec stdout/stderr redaction boundary tracked in #71211. Do we have a high-confidence way to reproduce the issue? Yes. Source review on current main gives a high-confidence reproduction path: pass a structured tool result containing details.structuredContent.cardNumber or sharedPaymentToken with bare values, and the existing sanitizer redacts strings without object-key context while default patterns omit those field names. Is this the best way to solve the issue? Yes. The PR is the narrowest maintainable fix for this surface because it scopes new masking to explicit payment credential field names and structured keys rather than adding broad card-number scanning that could degrade ordinary diagnostics such as amount. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against b2aac178d6da. |
33e1c61 to
5f5f1fa
Compare
|
@clawsweeper automerge |
|
🦞🦞 Source: What merged:
Fixups included:
The automerge loop is complete. |
Summary: - The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog. ClawSweeper fixups: - No separate fixup commits were needed after automerge opt-in. Validation: - ClawSweeper review passed for head 5f5f1fa. - Required merge gates passed before the squash merge. Prepared head SHA: 5f5f1fa Review: openclaw#75230 (comment) Co-authored-by: stainlu <[email protected]>
Summary: - The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog. ClawSweeper fixups: - No separate fixup commits were needed after automerge opt-in. Validation: - ClawSweeper review passed for head 5f5f1fa. - Required merge gates passed before the squash merge. Prepared head SHA: 5f5f1fa Review: openclaw#75230 (comment) Co-authored-by: stainlu <[email protected]>
Summary: - The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog. ClawSweeper fixups: - No separate fixup commits were needed after automerge opt-in. Validation: - ClawSweeper review passed for head 5f5f1fadbbd120dfcc98885b9cfd5efa7bee4bfa. - Required merge gates passed before the squash merge. Prepared head SHA: 5f5f1fadbbd120dfcc98885b9cfd5efa7bee4bfa Review: openclaw/openclaw#75230 (comment) Co-authored-by: stainlu <[email protected]>
Summary: - The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog. ClawSweeper fixups: - No separate fixup commits were needed after automerge opt-in. Validation: - ClawSweeper review passed for head 5f5f1fadbbd120dfcc98885b9cfd5efa7bee4bfa. - Required merge gates passed before the squash merge. Prepared head SHA: 5f5f1fadbbd120dfcc98885b9cfd5efa7bee4bfa Review: openclaw/openclaw#75230 (comment) Co-authored-by: stainlu <[email protected]>
Summary: - The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog. ClawSweeper fixups: - No separate fixup commits were needed after automerge opt-in. Validation: - ClawSweeper review passed for head 5f5f1fa. - Required merge gates passed before the squash merge. Prepared head SHA: 5f5f1fa Review: openclaw#75230 (comment) Co-authored-by: stainlu <[email protected]>
Summary: - The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog. ClawSweeper fixups: - No separate fixup commits were needed after automerge opt-in. Validation: - ClawSweeper review passed for head 5f5f1fa. - Required merge gates passed before the squash merge. Prepared head SHA: 5f5f1fa Review: openclaw#75230 (comment) Co-authored-by: stainlu <[email protected]>
Summary: - The PR adds payment-credential redaction patterns and a key-aware structured field redaction helper, wires it into tool payload sanitization, and updates focused tests, logging docs, and the changelog. ClawSweeper fixups: - No separate fixup commits were needed after automerge opt-in. Validation: - ClawSweeper review passed for head 5f5f1fa. - Required merge gates passed before the squash merge. Prepared head SHA: 5f5f1fa Review: openclaw#75230 (comment) Co-authored-by: stainlu <[email protected]>
26194 drift commits, 222 flagged (security/regression keywords). Notable: XSS fix (openclaw#83104), PATH injection (openclaw#73264), npm_execpath injection (openclaw#73262), implicit tool grant fix (openclaw#75055), payment credential redaction (openclaw#75230), heartbeat regression (openclaw#88970).
Summary
details.structuredContent.sharedPaymentTokenandcardNumberare masked even when the raw value has no known token prefix.Why
Wallet-style MCP tools can return one-time payment credentials as either text or structured content. This keeps the protection generic and key-scoped, avoiding broad card-number scanning while preserving ordinary diagnostics such as
amount.Related: #71211
Tests
pnpm test src/logging/redact.test.ts src/agents/pi-embedded-subscribe.tools.test.ts -- --reporter=verbosepnpm exec oxfmt --check --threads=1 src/logging/redact.ts src/logging/redact.test.ts src/agents/pi-embedded-subscribe.tools.ts src/agents/pi-embedded-subscribe.tools.test.ts docs/logging.md docs/gateway/logging.md CHANGELOG.mdgit diff --checkDOCS_I18N_GLOSSARY_BASE=upstream/main pnpm check:docspnpm check:changed --dry-run --base upstream/main