Skip to content

refactor(config): hold provider and header secrets in a type that never prints #386

Closed

Description

@tobocop2

Provider API keys, bypass secrets and sensitive header values are held in plain strings, so any Debug output or error that includes the containing struct prints them. This umbrella covers that class: #89, #118, #141, #152, #175.

Where

The provider, bypass and header configuration types, and every Debug derive or error that includes them.

Fix

Hold these values in a secret wrapper type whose Debug and Display never print the value, and use it at the configuration boundary. Add a test that the Debug output of each configuration type never contains a planted secret.

Activity

  1. self-assigned this
    on Sep 27, 2026
  2. added
    enhancementNew feature or request
    hardeningDefence in depth: credential handling, SSRF policy and input validation
    P1Operator-facing: wrong output on a common path, or a secret reaching logs or errors
    on Sep 27, 2026
  3. added theissue type on Sep 27, 2026
  4. tobocop2 commented on Sep 27, 2026

    @tobocop2
    MemberAuthor

    Also covers #402: the Elixir and Ruby bindings print sensitive header values from DownloadedDocument, which the secret type fixes at the same boundary.

  5. added
    P3Performance, refactor, docs or tests
    and removed
    P1Operator-facing: wrong output on a common path, or a secret reaching logs or errors
    on Sep 27, 2026
  6. Goldziher commented on Oct 4, 2026

    @Goldziher
    Member

    Patch hardening landed on main in 10119b7: every rejected browser.chrome_args branch now reports only the entry index, so malformed, uppercase, and duplicate caller input cannot leak credentials through CrawlError Display/Debug. The umbrella issue remains open: converting the public Rust String/map fields to a non-printing wrapper is source-breaking, and Alef-generated Python/Ruby/Elixir representations still need sensitive-field metadata/custom repr support for a complete cross-language fix.

  7. Goldziher commented on Oct 5, 2026

    @Goldziher
    Member

    Patch-level mitigation is on main: Rust/Python diagnostics and Rust-side Ruby/Elixir binding diagnostics redact the classified sensitive values while serialization remains lossless. The complete request remains open because replacing public raw-string/map fields with secret-wrapper types, plus equivalent host-language representations, is source-breaking and belongs in the next major release.

  8. Goldziher commented on Oct 6, 2026

    @Goldziher
    Member

    Closing per maintainer decision. The patch-level mitigation is on main: diagnostics redact the classified sensitive values across Rust, Python, Ruby and Elixir. Replacing the public raw-string/map fields with a non-printing wrapper is source-breaking and is deferred to the next major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3Performance, refactor, docs or testsenhancementNew feature or requesthardeningDefence in depth: credential handling, SSRF policy and input validation

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions