forked from mirrors/kingfisher
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
rules:
|
|
- name: Dify API Key
|
|
id: kingfisher.dify.1
|
|
pattern: |
|
|
(?xi)
|
|
(?:
|
|
\b
|
|
(?:dify|dify[_-]?api(?:[_-]?key)?|dify[_-]?app(?:[_-]?api(?:[_-]?key)?)?)
|
|
\b
|
|
(?:.|[\n\r]){0,96}?
|
|
)
|
|
\b
|
|
(
|
|
app-[a-f0-9]{24}
|
|
)
|
|
\b
|
|
pattern_requirements:
|
|
min_digits: 4
|
|
min_entropy: 3.0
|
|
confidence: medium
|
|
examples:
|
|
- DIFY_API_KEY=app-1f2e3d4c5b6a7980c1d2e3f4
|
|
- 'dify_app_api_key: "app-a0b1c2d3e4f5678901234abc"'
|
|
references:
|
|
- https://docs.dify.ai/en/introduction
|
|
- https://docs.dify.ai/en/guides/application-publishing/developing-with-apis
|
|
validation:
|
|
type: Http
|
|
content:
|
|
request:
|
|
method: GET
|
|
url: https://api.dify.ai/v1/info
|
|
headers:
|
|
Authorization: "Bearer {{ TOKEN }}"
|
|
Accept: application/json
|
|
response_matcher:
|
|
- report_response: true
|
|
- type: StatusMatch
|
|
status: [200]
|
|
- type: WordMatch
|
|
words:
|
|
- '"name"'
|