no-yolo-commits 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "no-yolo-commits",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "AI pre-commit review (via the claude CLI) + a guard that auto-branches you off main/master instead of letting a direct commit land there.",
5
5
  "keywords": [
6
6
  "husky",
@@ -11,10 +11,10 @@ if ! git diff --cached --quiet 2>/dev/null; then
11
11
  -e '-----BEGIN (RSA |EC |OPENSSH |DSA |PGP )?PRIVATE KEY-----' \
12
12
  -e 'AKIA[0-9A-Z]{16}' \
13
13
  -e 'xox[baprs]-[0-9A-Za-z-]{10,}' \
14
- -e '(api[_-]?key|secret|access[_-]?token|password|passwd)["'"'"']?[[:space:]]*[:=][[:space:]]*["'"'"'][A-Za-z0-9_/+=-]{16,}["'"'"']' \
14
+ -e '(api[_-]?key|secret|token|password|passwd)["'"'"']?[[:space:]]*[:=][[:space:]]*["'"'"'][A-Za-z0-9_/+=:-]{16,}["'"'"']' \
15
15
  2>/dev/null || true)"
16
16
 
17
- env_files="$(git diff --cached --name-only -- . 2>/dev/null | grep -E '(^|/)\.env(\.[^.]+)?$' | grep -v -E '\.(example|sample|template|dist)$' || true)"
17
+ env_files="$(git diff --cached --name-only -- . 2>/dev/null | grep -E '(^|/)\.env(\.[^.]+)?$|(^|/)[A-Za-z0-9_-]+\.env(\.[^.]+)?$' | grep -v -E '\.(example|sample|template|dist)$' || true)"
18
18
 
19
19
  if [ -n "$secret_hits" ] || [ -n "$env_files" ]; then
20
20
  echo ""