Repository navigation
fix(publish): redact inline registry credentials - #1009
Conversation
📝 WalkthroughWalkthroughThe publish command now redacts inline registry credentials in already-published errors, npm OIDC exchange errors, and dry-run PUT output. A unit test verifies redaction of credentials in the displayed publish target. ChangesPublish URL redaction
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/aube/src/commands/publish.rs (1)
1620-1628: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winTest the actual dry-run output path.
This test duplicates the helper expression, so it still passes if Line 941 stops redacting. Exercise the CLI/output formatter directly, or extract a formatter used by both production and the assertion.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/aube/src/commands/publish.rs` around lines 1620 - 1628, Update publish_target_display_redacts_inline_registry_credentials to exercise the actual dry-run output formatting path rather than calling aube_util::url::redact_url directly. Invoke the CLI/output formatter used at the production call site around the publish target display, or extract that shared formatter and use it both in production and the test, then assert the rendered output redacts the credentials.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@crates/aube/src/commands/publish.rs`:
- Around line 1620-1628: Update
publish_target_display_redacts_inline_registry_credentials to exercise the
actual dry-run output formatting path rather than calling
aube_util::url::redact_url directly. Invoke the CLI/output formatter used at the
production call site around the publish target display, or extract that shared
formatter and use it both in production and the test, then assert the rendered
output redacts the credentials.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 9083aebb-0cc8-40a3-ba90-ced1f7e718e2
📒 Files selected for processing (1)
crates/aube/src/commands/publish.rs
Greptile SummaryThis PR hardens publish diagnostic output by routing all three user-visible registry URLs through
Confidence Score: 5/5Display-only change; no HTTP requests, auth tokens, or publish logic are touched. Safe to merge. All three changed call sites correctly wrap the URL string in redact_url before it reaches user output, without altering the actual network request or credential handling. The redact_userinfo logic handles scoped-package paths correctly (the at >= slash guard prevents the @ in @scope from being mistaken for userinfo). The new test's expected string matches the actual output of encode_package_name followed by redact_url. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "test(publish): cover redacted dry-run ou..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ee75126. Configure here.

Summary
Tests
cargo fmt --checkcargo test -p aube publishThis pull request was generated by Codex.
Note
Low Risk
Display-only change; publish and auth behavior are unchanged.
Overview
Publish user-facing output and errors no longer echo raw registry URLs when those URLs embed credentials (e.g.
user:secret@host).The already published error, OIDC token exchange failure wrapper, and
--dry-run“would PUT to …” line now pass URLs throughaube_util::url::redact_url. Dry-run text is centralized indry_run_outcome_line, with a unit test asserting scoped package targets redact inline auth while keeping the encoded path.Reviewed by Cursor Bugbot for commit d5accc1. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit