Detection reference · Credentials and secrets · Updated 2026-11-03
OpenAI API keys (sk-proj- and sk-)
OpenAI project keys start with sk-proj-. Older and other providers' keys also start with sk-, so Redaxa only names OpenAI when the prefix or the surrounding assignment supports it, and says how sure it is.
At a glance
| Reported as | API key or token |
|---|---|
| Category | Credentials and secrets |
| Severity | critical: direct account or system compromise, as with keys, passwords and tokens |
| Replaced with | [SECRET] |
| Where it runs | The same engine runs in the Chrome extension (free checks, on your device), in the web check and the Windows app (on Redaxa's server; the text is not stored) and in public repository checks. |
| Engine rule | scanner.ts, line 205 |
What it looks like
sk- followed by at least 16 letters, digits, hyphens or underscores. sk-proj- is attributed to OpenAI as probable; a plain sk- key is attributed only when it is assigned to OPENAI_API_KEY.
Example 1
You paste
client = OpenAI(api_key="sk-proj-RedaxaDocsSampleNotRealRedaxaDocsSampleN")
Redaxa returns
client = OpenAI(api_key="[SECRET]")
| Reported as | API key or token |
|---|---|
| Severity | critical: direct account or system compromise, as with keys, passwords and tokens |
| Replaced with | [SECRET] |
| Probable service | OpenAI (probable) |
| Credential type | Project API key |
| Evidence | Project-key prefix suggests OpenAI; this is not a live provider check. |
| Recommended action | Revoke or rotate if genuine |
Example 2
You paste
OPENAI_API_KEY=sk-RedaxaDocsSampleNotRealRedaxaDocsSampleN
Redaxa returns
OPENAI_API_KEY=[SECRET]
| Reported as | API key or token |
|---|---|
| Severity | critical: direct account or system compromise, as with keys, passwords and tokens |
| Replaced with | [SECRET] |
| Probable service | OpenAI (probable from context) |
| Credential type | API key candidate |
| Evidence | The adjacent OPENAI_API_KEY assignment suggests OpenAI; a generic sk- prefix alone cannot identify the provider. Ownership and validity are unverified. |
| Recommended action | Revoke or rotate if genuine |
Example 3
You paste
use sk-RedaxaDocsSampleNotRealRedaxaDocsSampleN for the call
Redaxa returns
use [SECRET] for the call
| Reported as | API key or token |
|---|---|
| Severity | critical: direct account or system compromise, as with keys, passwords and tokens |
| Replaced with | [SECRET] |
| Probable service | Unknown service |
| Credential type | Access token / secret |
| Evidence | The value alone does not identify its owner or issuing service. |
| Recommended action | Identify owner, then rotate if genuine |
All values on this page are synthetic or published specimens; none is a working credential or a real person's data.
In a repository check
The same example, committed to a public repository and run through the free repository check:
app/settings.py: API key or token, listed for review (severity critical). Credential pattern matched. Validity is not tested; review and rotate if genuine.- Same value in
tests/fixtures/settings.py: Test or example value, counted but not listed. Real-looking keys in test files are still reported.
Values are always shown masked in repository reports. No key is ever tested against its provider.
What it does not flag
OPENAI_API_KEY=sk-your-api-key-here: not flagged. An explicit instruction placeholder is recognised and skipped.OPENAI_API_KEY=sk-proj-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: not flagged. A body of x after the prefix is a placeholder.
If it already leaked
Delete the key in the OpenAI dashboard (API keys page of the project), create a new one, update the application, and check the project's usage for calls you did not make.
What Redaxa adds to every finding of this kind: If genuine, revoke or rotate it at the issuing service, update the application, then remove the exposed value from code and review Git history. Deleting it from Git does not revoke access.
Official guidance: help.openai.com.
Step by step: pasted a key into ChatGPT, or committed one to GitHub.
Check before you paste
The free Chrome extension runs this check inside ChatGPT, Claude, Gemini and Perplexity before a message is sent, on your device and with no daily limit. On the web you get 5 free prompt checks a day with no account.
Add the Chrome extensionTry a free web checkWorried it is already in your code? Check a public GitHub repository free (3 checks a day).
Related
- GitHub tokens
- GitLab personal access tokens
- Anthropic API keys
- Stripe keys and webhook secrets
- Supabase keys
- Slack tokens and webhook URLs
- Google API keys
- AWS access keys
- npm access tokens
- PyPI API tokens
- Hugging Face access tokens
- SendGrid API keys
- JSON Web Tokens (JWT)
- Bearer tokens
- Passwords in URLs
- Secrets in configuration values
- Passwords written in text
- Private keys (PEM)
- I pasted an API key into ChatGPT: what to do
- Stop API keys leaking into AI prompts
- Check a public GitHub repository for leaked API keys
- Free GitHub secret scanner
- Everything Redaxa detects
Sources
- Redaxa engine: scanner.ts line 205, credential-context.ts line 32 (OpenAI (probable)), credential-context.ts line 51 (OpenAI (probable from context)), credential-context.ts line 28 (Unknown service). Every output on this page was produced by that code when the page was built.
- OpenAI Help: Best practices for API key safety