PostgreSQL Credentials Assignment
ID |
postgres_assignment |
Severity |
high |
Vendor |
PostgreSQL |
Family |
Data Storage Secret |
Description
PostgresSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Security
Any hardcoded PostgresSQL Credential is a potential secret reported by this detector.
Accidentally checking-in the key to source control repositories could compromise your PostgresSQL resource.
Examples
db.url=jdbc:postgresql://google.com/postgres db.port=50003 db.user=root db.password=p@assworD
Mitigation / Fix
-
Remove the
credentials
from the source code or committed configuration file. -
Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s).
-
If under a git repository, you may remove unwanted files from the repository history using tools like
git filter-repo
orBFG Repo-Cleaner
. You may follow the procedure listed here for GitHub.
You should consider any sensitive data in commits with secrets as compromised. Remember that secrets may be removed from history in your projects, but not in other users' cloned or forked repositories. |