Skip to content

cli: decdn config validate prints relay-URL user:pass@ credentials unredacted while redacting pkarr_url in the same summary #862

Closed

Description

@thiras

Severity: MEDIUM — from the 2026-06-10 full-repository review.

Location

  • crates/cli/src/commands/config.rs:89-91 — the relay loop prints {relay} verbatim
  • crates/cli/src/commands/config.rs:104-109 — pkarr_url, two lines later, goes through redact_userinfo; the inline comment at :99-101 even concedes "relays themselves print unredacted above"
  • crates/common/src/redact.rs:4-8 states the invariant: "relay userinfo never reaches a log or operator-facing error"
  • The node runtime (crates/node/src/runtime/mod.rs:1915) and the resolver error path (config/mod.rs:551) both redact relay entries — only the validate-summary success path leaks
  • Test crates/cli/tests/config_validate.rs:495 pins the verbatim behavior

Scenario

An operator with relay_urls = ["https://user:[email protected]:7842"] runs decdn config validate and pastes the output into a GitHub issue or support channel — the exact share-the-summary use case that's why rpc_url/otlp_endpoint are <redacted> in this same summary. Credentials ship with it.

Not a duplicate

#843 is the env var collapsing the relay list; no open issue covers validate-summary redaction.

Fix direction

Run each relay line through decdn_common::redact::redact_userinfo (the same treatment pkarr_url already gets); update the two summary tests.

Activity

  1. added
    kind:bug
    kind:security
    prio:medium
    rust
    area:cli
    on Jun 10, 2026
  2. github-actions commented on Jun 10, 2026

    @github-actions

    🎯 Triage report

    decdn config validate's success-path summary prints relay URLs verbatim — exposing any embedded user:pass@ credentials — while pkarr_url in the same summary block already calls redact_userinfo. The redact.rs invariant ("relay userinfo never reaches a log or operator-facing error") is upheld by the runtime and config-resolver error paths, but violated only here on the validate success path. The fix is a one-liner at config.rs:89-91 plus two test updates.

    📊 Assessment

    Dimension Value Reasoning
    Type Bug Credentials leak via a CLI command designed for safe sharing
    Labels unchanged (bug, security, medium, rust, cli) Already correctly applied
    Coding agent Suitable Precise location, clear fix, redact_userinfo already exists and is used one block below; two tests to update are identified

    🔗 Similar issues

    💡 Notes and suggestions

    Minimal fix checklist:

    • crates/cli/src/commands/config.rs:89-91 — in the relay loop, replace {relay} with the result of decdn_common::redact::redact_userinfo(&relay) (or equivalent string formatting through that helper)
    • crates/cli/tests/config_validate.rs:495 — update the test that currently pins verbatim relay URL output to instead assert the redacted form (e.g. user:***@relay.corp:7842)
    • If there's a second summary test that covers multiple relays, update it too

    Context for the coder:

    • pkarr_url is already redacted two blocks below at config.rs:104-109 — look at that call site for the exact invocation pattern to replicate
    • decdn_common::redact is already in scope; no new imports needed
    • The inline comment at :99-101 even acknowledges the inconsistency ("relays themselves print unredacted above") — delete that comment as part of the fix
    • The runtime relay redaction at crates/node/src/runtime/mod.rs:1915 and the resolver error path at config/mod.rs:551 are correct — do not touch them

    Severity note: Rated MEDIUM by the reporter (not HIGH/critical) because exploitation requires an operator to actively share config validate output. Still worth fixing promptly given the explicit invariant in redact.rs and that the command is designed for copy-paste sharing.

    Generated by Agentic Triage for issue #862 · sonnet46 592K · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. self-assigned this
    on Jun 10, 2026
  4. added 2 commits that reference this issue on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:bugkind:securityprio:mediumrust

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions