kingfisher/data/rules/openai.yml
2025-06-24 17:17:16 -07:00

30 lines
No EOL
912 B
YAML

rules:
- name: OpenAI API Key
id: kingfisher.openai.1
pattern: |
(?x)
\b
(
sk-[a-zA-Z0-9]{48}
)
\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