You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: decdn config validate prints relay-URL user:pass@ credentials unredacted while redacting pkarr_url in the same summary #862
area:clidecdn binary: get, gateway, pool, publish, origin, setupkind:bugSomething does not behave as documentedkind:securitySecurity impact; report a vulnerability to [email protected], not hereprio:mediumScheduledrustDependabot: a Cargo update; use area: labels for Rust code otherwise
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.
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
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.
area:clidecdn binary: get, gateway, pool, publish, origin, setupkind:bugSomething does not behave as documentedkind:securitySecurity impact; report a vulnerability to [email protected], not hereprio:mediumScheduledrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Activity
github-actions commentedon Jun 10, 2026
🎯 Triage report
decdn config validate's success-path summary prints relay URLs verbatim — exposing any embeddeduser:pass@credentials — whilepkarr_urlin the same summary block already callsredact_userinfo. Theredact.rsinvariant ("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 atconfig.rs:89-91plus two test updates.📊 Assessment
bug,security,medium,rust,cli)redact_userinfoalready exists and is used one block below; two tests to update are identified🔗 Similar issues
config validatework that was already completed💡 Notes and suggestions
Minimal fix checklist:
crates/cli/src/commands/config.rs:89-91— in the relay loop, replace{relay}with the result ofdecdn_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)Context for the coder:
pkarr_urlis already redacted two blocks below atconfig.rs:104-109— look at that call site for the exact invocation pattern to replicatedecdn_common::redactis already in scope; no new imports needed:99-101even acknowledges the inconsistency ("relays themselves print unredacted above") — delete that comment as part of the fixcrates/node/src/runtime/mod.rs:1915and the resolver error path atconfig/mod.rs:551are correct — do not touch themSeverity note: Rated MEDIUM by the reporter (not HIGH/critical) because exploitation requires an operator to actively share
config validateoutput. Still worth fixing promptly given the explicit invariant inredact.rsand that the command is designed for copy-paste sharing.Add this agentic workflows to your repo
To install this agentic workflow, run
fix(cli): redact relay credentials in config validate summary (#862)
Merge pull request #865 from decdn/fix/quick-win-medium-batch
fix: batch of six quick-win MEDIUM bug fixes (#865)