logo

Database

Postgresql Connection String

Description

The source code repository contains sensitive information: PostgreSQL Connection String

Weakness:

009 - Sensitive information in source code

Category: Information Collection

Detection Strategy

    • Matches PostgreSQL Connection String patterns in source code and configuration files

Vulnerable code example

postgresql://admin:s3cr3tpassword@db.example.com:5432/mydb
DATABASE_URL=postgres://user:P%40ssw0rd@localhost/app
postgres://dbuser:hunter2@10.0.0.1:5432/prod?sslmode=require
postgresql+psycopg2://admin:s3cr3tpassword@db.example.com:5432/mydb