Skip to content

fix(indexer): redact provider endpoint URLs in transport-error logs#178

Merged
tayy-i merged 1 commit into
mainfrom
fix/176-redact-provider-urls
Jul 21, 2026
Merged

fix(indexer): redact provider endpoint URLs in transport-error logs#178
tayy-i merged 1 commit into
mainfrom
fix/176-redact-provider-urls

Conversation

@tayy-i

@tayy-i tayy-i commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes #176. Provider endpoint URLs carry API keys in the path; transport-error logging rendered them unredacted at multiple WARN sinks (one added by #175, the retry WARNs pre-existing) — plus, found during the verify-loop, a terminal retry-exhaustion Debug sink leaking the propagated error's URL.

A shared redaction helper (apps/indexer/src/provider/error.rs) renders reqwest/anyhow transport errors with the URL reduced to scheme+host; all provider WARN sites (retry, pool-rebuild, block-transaction, receipt-fallback) go through it, and propagated errors are sanitized without changing their type or retry classification (regression test proves a redacted timeout still classifies retryable; a failing test reproduced the Debug-sink leak before the fix).

Authored by codex (packet + $verify-loop: first reviewer found the Debug-sink leak, second reviewer clean). Gates: fmt/clippy clean, size ratchet OK, indexer suite 477 passed.

Operational note (issue #176): the key already appears in weeks of host-local logs; rotation is recommended independent of this fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01C9RTnbCyhqEUSPc7xCK76p

Render reqwest URLs as scheme and host at every provider warning sink, and sanitize owned transport errors before they reach higher-level loggers. Preserve reqwest error types and retry classification, with timeout regressions covering retry warnings and exhaustion.

Fixes #176.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C9RTnbCyhqEUSPc7xCK76p
@tayy-i

tayy-i commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 8be203ef9b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@tayy-i
tayy-i merged commit 844b91c into main Jul 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

provider transport-error logs include the full endpoint URL (API key in path) at three WARN sinks

2 participants