We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cce396c commit 63c7c6dCopy full SHA for 63c7c6d
1 file changed
scripts/pre-commit
@@ -88,6 +88,16 @@ check_pattern '(mongodb|postgres|mysql|redis)://[^:]+:[^@]+@' "Database Connecti
88
# JWT tokens
89
check_pattern 'eyJ[a-zA-Z0-9_-]*\.eyJ[a-zA-Z0-9_-]*\.[a-zA-Z0-9_-]*' "JWT Token"
90
91
+# OpenAI API keys (sk-proj-... or sk-...)
92
+check_pattern 'sk-proj-[a-zA-Z0-9_-]{40,}' "OpenAI Project API Key"
93
+check_pattern 'sk-[a-zA-Z0-9]{48,}' "OpenAI API Key"
94
+
95
+# Anthropic API keys (sk-ant-...)
96
+check_pattern 'sk-ant-[a-zA-Z0-9_-]{40,}' "Anthropic API Key"
97
98
+# OpenRouter API keys (sk-or-...)
99
+check_pattern 'sk-or-[a-zA-Z0-9_-]{40,}' "OpenRouter API Key"
100
101
# Check result
102
if [ "$SECRETS_FOUND" -eq 1 ]; then
103
echo ""
0 commit comments