piighost/openai-api-key

OpenAI secret key, the sk- prefix with the optional proj- segment, then at least twenty key characters. Anthropic keys start sk-ant- and are excluded here, otherwise every one of them is reported as an OpenAI key. Not a personal identifier but a credential, which is exactly what must not reach a third-party model when a developer pastes a config or a traceback.

Label: OPENAI_API_KEY

Pattern

(?<![A-Za-z0-9])sk-(?!ant-)(?:proj-)?[A-Za-z0-9_-]{20,}

Must be caught

Must be left alone

Tags: international, secrets, software-dev

Download the detector as TOML