← Back to Pull requests

fix: redact credentials in ParquetWriterExec debug output #7777

Open
unknown opened this pull request with 198 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 29, 2026 02:57 UTC
Author

Which issue does this PR close?

Closes #7558.

Rationale for this change

ParquetWriterExec derived Debug, so formatting it with {:?} printed output_path and object_store_options as is. the path can carry a password, an access key id or a sas query, and the options can hold things like fs.s3a.secret.key, so any debug log, dbg! or error that formats the plan with Debug would leak them.

What changes are included in this PR?

  • swapped the derived Debug on ParquetWriterExec for a manual one that prints the same fields

  • output_path goes through the existing url_redaction::without_credentials helper, so the userinfo and query are dropped. a path that does not parse prints as <unparseable> since nothing can be stripped from it

  • object_store_options now shows its keys (sorted) with every value replaced by <redacted>, same placeholder IcebergScanExec already uses for its catalog properties
  • the small RedactedOptions wrapper mirrors the private one in iceberg_scan.rs rather than sharing it, to keep this to one file. happy to pull both into a shared helper if preferred. the DisplayAs path is left alone since #7128 covers it.

    How are these changes tested?

    added test_parquet_writer_debug_redacts_credentials, which builds the exec with s3a://AKIDEXAMPLE:s3cretpw@bucket/part-00000.parquet?sig=sastoken and fs.s3a.secret.key = supersecret, and checks the debug string has the stripped path and the option key but none of the secrets. i checked it fails without the fix. the rest of the parquet_writer tests, cargo fmt and clippy (-D warnings) pass locally.

    Diff: 198 lines (+148 / -50) across 2 files Reviewer: comphead Review duration: 2606m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.36) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 198 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.317
    Real PR Conversation Timeline
    1 comments
    "Review active on #7777"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.1% (MEDIUM) · Higher = larger blast radius
    36.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.6% · Safe to merge
    20.6%