Postgresql
Detects Postgresql patterns.
- Type
- regex
- Engine
- universal
- Confidence
- high
- Confidence justification
- High confidence: structurally constrained pattern with corroborative keyword support reduces false positive rates significantly. Added context gating and exclusion rules improve precision and reduce incidental matches.
- Detection quality
- Verified
- Jurisdictions
- global
- Regulations
- Criminal Code Act 1995 (Cth)
- Frameworks
- CIS Controls, ISO 27001, NIST CSF, PCI-DSS, SOC 2
- Data categories
- credentials, security
- Scope
- specific
- Risk rating
- 8
- Platform compatibility
- Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Compatible
Pattern
postgres(ql)?://[^:]+:[^@]+@[^/]+/\S+
Corroborative evidence keywords
api key, api_key, apikey, access key, secret key, private key, auth token, authorization, access token, bearer, conn str, connection string, connectionstring, cookie, credential, database, host, [object Object], oauth, passphrase (+33 more)
Proximity: 300 characters
Should match
postgresql://user:pass@localhost/mydb— Exact 65 probe - complete credential URI without independent config labelingPOSTGRES_URL=postgres://admin:S3cretValue@db.internal/prod— Exact 75 probe - credential URI in a PostgreSQL-specific config fieldPostgreSQL production PGURI=postgresql://app:S3cretValue@10.0.0.1/data?sslmode=require— Exact 85 probe - provider config label plus required TLS option
Should not match
postgresql://localhost/mydb— Missing credentials (no user:pass@ section)postgresql://user:pass@localhost— Missing database name after hostpsql://user:pass@localhost/mydb— Wrong scheme (psql instead of postgres/postgresql)MONGODB_URI=postgresql://user:pass@localhost/mydb— Sibling database config label does not corroborate a PostgreSQL URIpostgresql://user:@localhost/mydb— Malformed connection has an empty passwordDocumentation example: PostgreSQL PGURI=postgresql://user:changeme@db.example.com/example?sslmode=require— Documentation placeholder with TLS context is excludedtemplate example placeholder record identifier— Template/sample context should be excluded even when anchor words are present
Known false positives
- Authentication-related terminology in software documentation, security training materials, or system architecture descriptions without actual credentials. Mitigation: Require proximity to credential-specific patterns (API keys, connection strings, tokens) rather than general security terminology.
- Code snippets and configuration examples containing credential-related keywords or placeholder values in developer documentation. Mitigation: Check for common placeholder patterns (example.com, localhost, 0000) and documentation file types to reduce false positives from technical writing.