A user, login or role is created or changed with a password written in the script
What it finds
CREATE USER app IDENTIFIED BY 'secret', CREATE LOGIN x WITH PASSWORD = '...', ALTER ROLE r PASSWORD '...': a password written into a script ends up in version control and in every copy of it. A variable of the deployment tool, or a secret store, keeps it out.
Hashed passwords (IDENTIFIED BY VALUES, PASSWORD = 0x... HASHED) and variables are left alone.
From the rule's source, hardcoded_password.rs.
Turn it on, off or suppress it
The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/sql:hardcoded-password" = "error"To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.
tx0 explain tx0/sql:hardcoded-password shows the same in the terminal. Found a false positive? Report it.