forked from mirrors/kingfisher
Merge pull request #180 from AkshayJainG/add-short-openai-key-detection
Add detection for short sk-None- prefixed OpenAI API keys
This commit is contained in:
commit
c77c95be3f
1 changed files with 29 additions and 0 deletions
|
|
@ -60,3 +60,32 @@ rules:
|
|||
- 200
|
||||
type: StatusMatch
|
||||
url: https://api.openai.com/v1/models
|
||||
|
||||
- name: OpenAI API Key (Short Prefixed)
|
||||
id: kingfisher.openai.3
|
||||
pattern: |
|
||||
(?xi)
|
||||
(
|
||||
sk-None-[A-Z0-9]{48}
|
||||
)
|
||||
pattern_requirements:
|
||||
min_digits: 2
|
||||
min_entropy: 3.3
|
||||
confidence: medium
|
||||
examples:
|
||||
- sk-None-abcdefghij1234567890ABCDEFGHIJ1234567890abcdefgh
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue