laravel-security-agent 1.3.1 → 1.3.2
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 +1 -1
- package/templates/pre-commit +1 -1
package/package.json
CHANGED
package/templates/pre-commit
CHANGED
|
@@ -17,7 +17,7 @@ if git diff --cached --name-only | grep -qE "$BLOCKED_PATTERNS"; then
|
|
|
17
17
|
exit 1
|
|
18
18
|
fi
|
|
19
19
|
|
|
20
|
-
if git diff --cached | grep -iE "(DB_PASSWORD
|
|
20
|
+
if git diff --cached | grep -iE "(DB_PASSWORD\s*=\s*\S+|APP_KEY\s*=\s*base64:[A-Za-z0-9+\/=]{40,}|password\s*=\s*['\"][^'\"]{4,}|secret\s*=\s*['\"][^'\"]{4,})"; then
|
|
21
21
|
echo "❌ BLOCKED: possible hardcoded credential detected in diff"
|
|
22
22
|
echo " Use environment variables (.env) instead of inline values"
|
|
23
23
|
exit 1
|