Closed Chandra158 closed 2 months ago
Feature: New plugin to detect OpenAI api keys
sk-[20_alpha_numberic] T3BlbkFJ [20_alpha_numberic]
T3BlbkFJ
sk-<project_name>-[20_alpha_numberic] T3BlbkFJ [20_alpha_numberic]
Checking whether token is active might not be possible; so haven't implemented verify() method for the plugin:
verify()
v1/models
{ "type": "OpenAI Token", "filename": "test_data/files/file_with_secrets.py", "hashed_secret": "007111295d396c8234d268fa24014ef5235136b0", "is_verified": false, "line_number": 5 }
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Feature: New plugin to detect OpenAI api keys
Token Format
sk-[20_alpha_numberic] T3BlbkFJ [20_alpha_numberic]
(T3BlbkFJ
= base64 for "OpenAI")sk-<project_name>-[20_alpha_numberic] T3BlbkFJ [20_alpha_numberic]
Token verification
Checking whether token is active might not be possible; so haven't implemented
verify()
method for the plugin:v1/models
) may or may not work because of the restrictions placed on tokens during creationTests