kingfisher/data/rules/openai.yml

30 lines
910 B
YAML
Raw Normal View History

2025-06-24 17:17:16 -07:00
rules:
- name: OpenAI API Key
id: kingfisher.openai.1
pattern: |
2025-06-26 11:31:41 -07:00
(?xi)
2025-06-24 17:17:16 -07:00
\b
(
2025-06-26 11:31:41 -07:00
sk-[A-Z0-9]{48}
2025-06-24 17:17:16 -07:00
)
\b
min_entropy: 3.3
confidence: medium
examples:
- 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
- curl https://api.openai.com/v1/images/generations -H 'Content-Type application/json' -H "Authorization Bearer sk-mxIt5s1tyfCJyIKHwrqOT4BlbkFJT3VVmv6VdSwB7XXIq1TO"
references:
- https://help.openai.com/en/articles/9132009-how-can-i-view-the-users-or-organizations-associated-with-an-api-key
validation:
type: Http
content:
request:
headers:
Authorization: "Bearer {{ TOKEN }}"
method: GET
response_matcher:
- report_response: true
- status:
- 200
type: StatusMatch
url: https://api.openai.com/v1/me