trufflehog
trufflehog copied to clipboard
Add OpenAI Azure Detector
Please review the Community Note before submitting
Description
The current OpenAI detector handles API keys for https://api.openai.com
, however, in my experience API keys for Microsoft Azure Endpoints have a different format.
For example:
import openai
openai.api_type = "azure"
openai.api_base = "https://example-endpoint.openai.azure.com"
openai.api_version = "2023-05-15"
openai.api_key = "[a-f0-9]{32}"
Preferred Solution
Add an additional detector for OpenAI Azure, if the key format is indeed different.
Additional Context
N/A
References
N/A