Repository navigation
Description
What happened
The MDBList client places apikey in the request query string and wraps the raw error returned by http.Client.Do.
Go transport errors include the request URL. The current MDBList discovery and connection-check handlers interpolate those errors into API responses, so a DNS, TLS, timeout, or connection failure can return the configured MDBList API key to the caller. The same error is unsafe to record under a generic log attribute because Silo's redactor is key-based and does not inspect arbitrary error text.
Relevant paths:
internal/mdblist/discovery.gointernal/api/handlers/user_collection_imports.gointernal/api/handlers/admin_settings_checks.gointernal/logredact/redact.go
Expected behavior
No MDBList credential or credential-bearing URL may appear in an error value, API response, application log, operational log, or telemetry export.
Acceptance criteria
- MDBList transport errors are converted to credential-free errors before leaving the client package.
- Search, Top, Check, and future title-rating methods use the same safe error path.
- User collection discovery and the admin connection check return useful but generic failure messages.
- Tests inject a transport error using a sentinel API key and prove that the key is absent from:
- the returned client error;
- serialized HTTP responses;
- any log record produced by the affected path.
- HTTP status and retry classification remain useful without exposing the URL.
- Tests cover DNS/connection-style errors and context timeout/cancellation.
Scope
This issue covers credential-safe MDBList error handling only. It does not add title-rating lookup, Rotten Tomatoes backfill, or Jellyfin mapping.
Discovery context
Found while reviewing Silo Server PR #266 at exact head 83623def9f8eebfd9f8a7dd3b9defd5ba9b1c1a1. The unsafe discovery-client behavior also exists on current main; it is not limited to that PR.
AI Disclosure
- Tool: Codex in T3 Code
- Model: gpt-5.6-sol
- Involvement: AI-assisted investigation and issue drafting, published with maintainer approval
- Adversarial review: Traced the credential from URL construction through Go's transport error to both HTTP response sinks and Silo's key-based log-redaction boundary.
Activity
fix(watchsync): keep the MDBList API key out of error text (#1351)
fix(watchsync): page every Trakt list read (#1352)
fix(watchsync): match Trakt not_found echoes by any shared id (#1353)
feat(watchsync): sync Simkl movie and show ratings (#1355)
feat(watchsync): sync MDBList movie and show ratings (#1356)
feat(watchsync): sync ratings with watch-sync plugins (#1357)
feat(watchsync): sync movie and series ratings with watch providers (#…
fix(mdblist): prevent API key leakage in transport errors (fixes #692) (