Skip to content

LS-DB-004: MySQL Connection String

Severity CRITICAL
Blast radius Full database compromise
Rotate at https://dev.mysql.com/doc/refman/8.0/en/set-password.html

If this leaks

Contains a username and password for a MySQL/MariaDB database, granting full read/write access to every database that user can reach.

What to do

  1. Rotate or revoke the credential at https://dev.mysql.com/doc/refman/8.0/en/set-password.html.
  2. Check the provider's audit logs for use you don't recognise.
  3. Remove it from git history (leakscan purge --help) and load it from an environment variable or secret manager instead.

Pattern

mysql://[^\s'\"]+:[^\s'\"@]+@[^\s'\"]+

Suppress

On one line: # leakscan:ignore LS-DB-004. For the whole project:

disable_rules: [LS-DB-004]