trufflehog icon indicating copy to clipboard operation
trufflehog copied to clipboard

Add OpenAI Azure Detector

Open rgmz opened this issue 8 months ago • 0 comments

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

rgmz avatar Oct 21 '23 19:10 rgmz