kingfisher/data/rules/postgres.yml
Mick Grove f9d75eaadd - Skip reporting MongoDB and Postgres findings when their connection strings cannot be parsed, even when validation is disabled.
- Improve MySQL detection by broadening URI coverage and adding live validation that skips clearly invalid connection strings.
2025-11-15 08:11:25 -08:00

40 lines
No EOL
1,010 B
YAML

rules:
- name: Postgres URL with hardcoded password
id: kingfisher.postgres.1
pattern: |
(?xi)
(?:
postgres
(?:ql)?
| postgis
)
:\/\/
(?:
[\w]+
)
:
(?:
[^\@]+
)
@
(?:
[^:\/]+
)
:
(?:
\d+
)
pattern_requirements:
ignore_if_contains:
- "*****"
- "xxxxx"
min_entropy: 3.3
confidence: medium
examples:
- CONNECTION_URI="postgres://postgres:s2Tf2k@rLMy@google.com:5434/elephant"
- Connection URI= postgresql://nimda:vg498hwegw1udp6s@db-postgresql-nyc1-64297-do-user-1243723-0.db.ondigitalocean.com:25060/defaultdb?sslmode=require
- CONNECTION_URI="postgres://postgres:s2Tf2k@rLMy@google.com:5434/elephant"
- CONNECTION_URI="postgis://postgres:s2Tf2k@rLMy@google.com:5434/elephant"
- CONNECTION_URI="postgis://postgres:s2Tf2k@rLMy@google.com:5434/elephant"
validation:
type: Postgres