forked from mirrors/kingfisher
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
rules:
|
|
- name: Data.gov API Key
|
|
id: kingfisher.datagov.1
|
|
pattern: |
|
|
(?xi)
|
|
\b
|
|
data\.gov
|
|
(?:.|[\n\r]){0,32}?
|
|
(?:SECRET|PRIVATE|ACCESS|KEY|TOKEN)
|
|
(?:.|[\n\r]){0,32}?
|
|
\b
|
|
(
|
|
[a-zA-Z0-9]{40}
|
|
)
|
|
\b
|
|
pattern_requirements:
|
|
min_digits: 2
|
|
min_entropy: 3.5
|
|
confidence: medium
|
|
examples:
|
|
- data.gov_api_key=pBZm2kXbuPdRfzYyarRT0bvcWAisnJg98YJzBJyJ
|
|
- data.gov_token=plZJDnKs4OrPeV8wgBr2fYO6VnXb1YPEcVaZbnYI
|
|
references:
|
|
- https://api.data.gov/docs/developer-manual/
|
|
- https://developer.nrel.gov/docs/api-key/
|
|
- https://developer.nrel.gov/docs/errors/
|
|
validation:
|
|
type: Http
|
|
content:
|
|
request:
|
|
method: GET
|
|
# NREL (developer.nrel.gov) uses api.data.gov-managed keys and accepts api_key as a query param.
|
|
url: "https://developer.nrel.gov/api/alt-fuel-stations/v1.json?limit=1&api_key={{ TOKEN }}"
|
|
headers:
|
|
Accept: application/json
|
|
response_matcher:
|
|
- report_response: true
|
|
- type: StatusMatch
|
|
status: [200]
|
|
|