kingfisher/data/rules/planetscale.yml
Luke Young 55e331f6a4
fix(planetscale): improve kingfisher.planetscale.1 regex
Signed-off-by: Luke Young <bored-engineer@users.noreply.github.com>
2026-01-30 18:17:09 -08:00

55 lines
1.3 KiB
YAML

rules:
- name: PlanetScale API Token
id: kingfisher.planetscale.1
pattern: |
(?xi)
\b
(
pscale_tkn_[a-z0-9-_]{32,64}
)
\b
pattern_requirements:
min_digits: 2
min_entropy: 4
examples:
- pscale_tkn_abcdefghijklmnopqrstuvwxyZ1234567890_ABCDEF
validation:
type: Http
content:
request:
headers:
Accept: application/json
Authorization: '{{ USERNAME | append: ":" | append: TOKEN }}'
method: GET
response_matcher:
- report_response: true
- status:
- 200
type: StatusMatch
- type: WordMatch
words:
- '"id":'
- '"username":'
url: https://api.planetscale.com/v1/user
depends_on_rule:
- rule_id: kingfisher.planetscale.2
variable: USERNAME
- name: PlanetScale Username
id: kingfisher.planetscale.2
pattern: |
(?xi)
(?:pscale|planetscale)
(?:.|[\n\r]){0,16}?
(?:USER|ID|NAME)
(?:.|[\n\r]){0,16}?
(
[a-z0-9]{12}
)
pattern_requirements:
min_digits: 2
min_entropy: 3.5
visible: false
examples:
- pscale_user = abcdefghijkl
- 'planetscale_id: hgtmrnzlv1t7'