forked from mirrors/kingfisher
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
rules:
|
|
- name: Sanity API Token
|
|
id: kingfisher.sanity.1
|
|
pattern: |
|
|
(?xi)
|
|
\b
|
|
sanity
|
|
(?:.|[\n\r]){0,32}?
|
|
(?:SECRET|PRIVATE|ACCESS|KEY|TOKEN|API)
|
|
(?:.|[\n\r]){0,32}?
|
|
\b
|
|
(
|
|
(?:sk[A-Za-z0-9]{52}|sk[A-Za-z0-9]{78})
|
|
)
|
|
\b
|
|
min_entropy: 3.5
|
|
confidence: medium
|
|
pattern_requirements:
|
|
min_digits: 2
|
|
examples:
|
|
- SANITY_API_TOKEN=skE5UXUmBEy7U50jcG4In4v4xoHZTlduDxQYet8Y84tsTqAZxp2reIPJsA1JzqXJno2qcpauGwPfjHpU
|
|
- sanity_token = "sk1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdef"
|
|
references:
|
|
- https://www.sanity.io/docs/content-lake/http-auth
|
|
- https://www.sanity.io/docs/projects-api
|
|
validation:
|
|
type: Http
|
|
content:
|
|
request:
|
|
method: GET
|
|
url: https://api.sanity.io/v2021-06-07/projects
|
|
headers:
|
|
Authorization: "Bearer {{ TOKEN }}"
|
|
Accept: application/json
|
|
response_matcher:
|
|
- report_response: true
|
|
- type: StatusMatch
|
|
status: [200]
|
|
- type: JsonValid
|