Skip to content

[main] [bug] Remove credential leak in database:open#132

Merged
joetannenbaum merged 5 commits intolaravel:mainfrom
JoshSalway:fix/database-open-credential-leak
Apr 10, 2026
Merged

[main] [bug] Remove credential leak in database:open#132
joetannenbaum merged 5 commits intolaravel:mainfrom
JoshSalway:fix/database-open-credential-leak

Conversation

@JoshSalway
Copy link
Copy Markdown
Contributor

@JoshSalway JoshSalway commented Apr 6, 2026

Summary

database:open prints the full connection URL (including username and password) to the terminal via info($url). This leaks credentials to terminal scrollback, screen sharing, and logs.

Replaced with a descriptive message that shows the database name, hostname, port, and cluster name - giving users the context they need to confirm they opened the correct database without exposing credentials.

Before:
postgres://user:password@hostname:5432/main?Name=my-cluster&Environment=...

After:
Opening database "main" on "hostname:5432" (cluster: my-cluster)

Closes #83

Test plan

  • ./vendor/bin/pest - 33 tests pass
  • ./vendor/bin/pint --test - no style issues
  • Tested against live Cloud database cluster

Josh Salway and others added 5 commits April 6, 2026 22:44
info($url) printed the full connection URL including username and
password to the terminal. Replaced with a neutral message.

Closes laravel#83

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@joetannenbaum joetannenbaum merged commit ab2da8e into laravel:main Apr 10, 2026
2 checks passed
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.

Bug: database:open outputs connection URL with plaintext credentials to terminal

2 participants