kingfisher/crates/kingfisher-rules/data/rules/deepl.yml
2026-04-14 12:52:27 -07:00

66 lines
1.8 KiB
YAML

rules:
- name: DeepL API Key (Free)
id: kingfisher.deepl.1
pattern: |
(?x)
\b
(
[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}:fx
)
\b
confidence: medium
examples:
- 'DEEPL_API_KEY=279a2e9d-83b3-c416-7e2d-f721593e42a0:fx'
- 'DeepL-Auth-Key 5ef4a0d1-7e1f-47b2-ac0a-1282002aa2a1:fx'
references:
- https://developers.deepl.com/docs/getting-started/auth
validation:
type: Http
content:
request:
method: GET
url: https://api-free.deepl.com/v2/usage
headers:
Authorization: "DeepL-Auth-Key {{ TOKEN }}"
Accept: application/json
response_matcher:
- report_response: true
- type: StatusMatch
status: [200]
- type: JsonValid
- name: DeepL API Key (Pro)
id: kingfisher.deepl.2
pattern: |
(?xi)
deepl
(?:.|[\n\r]){0,32}?
(?:SECRET|AUTH|KEY|TOKEN|API)
(?:.|[\n\r]){0,16}?
\b
(
[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}
)
\b
confidence: medium
examples:
- 'DEEPL_AUTH_KEY=279a2e9d-83b3-c416-7e2d-f721593e42a0'
- 'deepl_api_key: "5ef4a0d1-7e1f-47b2-ac0a-1282002aa2a1"'
negative_examples:
- 'SOME_UUID=279a2e9d-83b3-c416-7e2d-f721593e42a0'
references:
- https://developers.deepl.com/docs/getting-started/auth
validation:
type: Http
content:
request:
method: GET
url: https://api.deepl.com/v2/usage
headers:
Authorization: "DeepL-Auth-Key {{ TOKEN }}"
Accept: application/json
response_matcher:
- report_response: true
- type: StatusMatch
status: [200]
- type: JsonValid