kingfisher/crates/kingfisher-rules/data/rules/postgres.yml
Mick Grove e518fb30f2 v1.81.0
2026-02-10 19:24:19 -08:00

44 lines
No EOL
1.1 KiB
YAML

rules:
- name: Postgres URL with hardcoded password
id: kingfisher.postgres.1
pattern: |
(?xi)
(?:
postgres
(?:ql)?
| postgis
)
:\/\/
(?:
[\w]+
)
:
(?:
[^\@]+
)
@
(?:
[^:\/]+
)
:
(?:
\d+
)
pattern_requirements:
ignore_if_contains:
- "****"
- "xxxx"
- "example"
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
tls_mode: lax
references:
- https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING