Skip to content

Stop echoing credential-bearing database URLs - #628

Closed
logbie wants to merge 2 commits into
mainfrom
agent/redact-unsupported-database-url
Closed

logbie wants to merge 2 commits into
mainfrom
agent/redact-unsupported-database-url

Conversation

@logbie

@logbie logbie commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • stop interpolating an unsupported database connection URL into the runtime error
  • retain generic supported-scheme guidance without copying user info, host, path, or query data
  • add a unique-secret regression and an Unreleased security changelog note

Security impact

An unsupported URL such as oracle://user:password@host/db was copied verbatim into catchable runtime errors, console diagnostics, and default debug reports. Those diagnostics no longer disclose the supplied URL or embedded credentials.

Validation

  • git diff --check passed
  • changed Rust code passed tree-sitter syntax parsing and the available formatter check
  • native Cargo was unavailable locally; repository CI is the source-of-truth validation and passed on the final head
  • all GitHub CI, config lint, and review checks passed on the final head

Part of the Rust-source production-readiness work tracked in #610.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@logbie, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 92ee8c28-410b-43fb-88f7-4690261517d4

📥 Commits

Reviewing files that changed from the base of the PR and between 017e698 and e495d3e.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • src/interpreter/database.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/redact-unsupported-database-url

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@logbie
logbie marked this pull request as ready for review July 16, 2026 18:13
Copilot AI review requested due to automatic review settings July 16, 2026 18:13

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes credential-bearing database URLs from the unsupported-scheme error path in the interpreter’s database connection helper, adds a regression test to prevent reintroducing the leak, and documents the security change in the Unreleased changelog.

Changes:

  • Stop interpolating the full (potentially credential-bearing) database URL into the “unsupported scheme” runtime error.
  • Add an async regression test asserting the unsupported-scheme error does not echo embedded secrets or the full URL.
  • Add an Unreleased Security changelog entry describing the diagnostic redaction.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/interpreter/database.rs Replaces unsupported-URL error formatting to avoid echoing the full URL; adds a regression test for secret/URL non-echoing.
CHANGELOG.md Adds an Unreleased Security note documenting the diagnostic change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +126 to +129
Err(
"Unsupported database URL scheme. Supported schemes: sqlite://, postgres://, postgresql://, mysql://, mariadb://"
.to_string(),
)
Copilot AI review requested due to automatic review settings July 16, 2026 18:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

logbie commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #632, which preserves this security fix in the consolidated Rust-source hardening PR. The combined head is mergeable and all required CI checks are green.

@logbie logbie closed this Jul 17, 2026
@logbie
logbie deleted the agent/redact-unsupported-database-url branch August 14, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants