Merge pull request #962 from Molecule-AI/chore/secret-scanner-mol-pk

chore: add mol_pk_ and cfut_ to pre-commit secret scanner
This commit is contained in:
Hongming Wang 2026-04-19 00:22:44 -07:00 committed by GitHub
commit a00d0dc602
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,7 +106,7 @@ if [ -n "$ALL_STAGED" ]; then
continue
fi
DIFF=$(git diff --cached "$f" 2>/dev/null | grep '^+' | grep -v '^+++' || true)
if echo "$DIFF" | grep -qE 'sk-ant-|sk-proj-|ghp_|gho_|AKIA[A-Z0-9]' 2>/dev/null; then
if echo "$DIFF" | grep -qE 'sk-ant-|sk-proj-|ghp_|gho_|AKIA[A-Z0-9]|mol_pk_|cfut_' 2>/dev/null; then
echo "❌ POSSIBLE SECRET in $f — do not commit API keys or tokens"
ERRORS=$((ERRORS + 1))
fi