forked from mirrors/kingfisher
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
rules:
|
|
- name: Infura API Key
|
|
id: kingfisher.infura.1
|
|
pattern: |
|
|
(?xi)
|
|
\b
|
|
infura
|
|
(?:.|[\n\r]){0,32}?
|
|
\b
|
|
(
|
|
[0-9a-z]{32}
|
|
)
|
|
pattern_requirements:
|
|
min_digits: 2
|
|
min_entropy: 3.5
|
|
confidence: medium
|
|
examples:
|
|
- https://mainnet.infura.io/v3/7238211010344719ad14a89db874158c
|
|
- infuraKEYwithspecial-abcdef1234567890abcdef1234567890
|
|
references:
|
|
- https://docs.infura.io/
|
|
- https://docs.metamask.io/services/reference/ethereum/json-rpc-methods/
|
|
validation:
|
|
type: Http
|
|
content:
|
|
request:
|
|
method: POST
|
|
url: "https://mainnet.infura.io/v3/{{ TOKEN }}"
|
|
headers:
|
|
Content-Type: application/json
|
|
Accept: application/json
|
|
body: |
|
|
{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}
|
|
response_matcher:
|
|
- report_response: true
|
|
- type: StatusMatch
|
|
status: [200]
|
|
- type: JsonValid
|
|
- type: WordMatch
|
|
words: ['"result"']
|
|
- type: WordMatch
|
|
negative: true
|
|
words: ["invalid project id", "project id required in the URL", "invalid project id or project secret"]
|