PostgreSQL Password File Entry

Detects PostgreSQL .pgpass file entries containing hostname, port, database, username, and password in colon-separated format. Mirrors Snaffler rule KeepDbMgtConfigByName.

Type
regex
Engine
boost_regex
Confidence
medium
Confidence justification
Medium confidence: the five-field colon-separated structure is specific but the character classes are broad enough to match non-credential data. Evidence keyword gating at 75/85 tiers substantially reduces false positive risk by requiring pgpass-contextual terms.
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth)
Frameworks
CIS Controls, ISO 27001, NIST CSF
Data categories
credentials
Scope
specific
Platform compatibility
Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Unsupported

Pattern

[^\s:]{1,64}:(?:\d{1,5}|\*):[^\s:]{1,64}:[^\s:]{1,64}:[^\s:]{1,128}

Corroborative evidence keywords

pgpass, 5432, localhost, postgres

Proximity: 300 characters

Should match

Should not match

Known false positives

Collections