kingfisher/crates/kingfisher-rules/data/rules/serpapi.yml
2026-04-03 21:35:28 -07:00

42 lines
1.1 KiB
YAML

rules:
- name: SerpApi API Key
id: kingfisher.serpapi.1
pattern: |
(?xi)
\b
serp(?:api)?
(?:.|[\n\r]){0,24}?
(?:api[_\s-]*key|access[_\s-]*token|token|key)
(?:.|[\n\r]){0,16}?
(
[a-f0-9]{64}
)
\b
pattern_requirements:
min_digits: 4
min_entropy: 3.9
confidence: medium
examples:
- serpapi_api_key=8a7c2d91f4b60e3d9c1a27e6f5b8c0d372a4b1e8f906dc53ab74e19cf2056d8b
- 'SERP_TOKEN: "4e9d7a8c1f02b3d46e57a89b0c1d2e3f40a5b6c7d8e9f1023a4b5c6d7e8f9012"'
references:
- https://serpapi.com/account-api
- https://serpapi.com/search-api
validation:
type: Http
content:
request:
method: GET
url: https://serpapi.com/account.json?api_key={{ TOKEN }}
headers:
Accept: application/json
response_matcher:
- report_response: true
- type: StatusMatch
status: [200]
- type: JsonValid
- type: WordMatch
words:
- '"account_id"'
- '"api_key"'
match_all_words: true