mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 20:54:22 +01:00
implement new openai regex pattern (#1780)
* implement new openai regex pattern * implement key in config generation * support admin keys, support 58 char length keys * add examples to tp slice
This commit is contained in:
1 parent
9708e65c25
commit
ddcc75371f
2 files changed
+16
-3
No files matched your search
@@ -2626,7 +2626,7 @@ keywords = ["okta"]
|
||||
[[rules]]
|
||||
id = "openai-api-key"
|
||||
description = "Found an OpenAI API Key, posing a risk of unauthorized access to AI services and data manipulation."
|
||||
regex = '''\b(sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:[\x60'"\s;]|\\[nr]|$)'''
|
||||
regex = '''\b(sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})T3BlbkFJ(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})\b|sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:[\x60'"\s;]|\\[nr]|$)'''
|
||||
entropy = 3
|
||||
keywords = ["t3blbkfj"]
|
||||
|
||||
|
||||
Reference in new issue
Block a user