Skip to content

Commit c6c9bdd

Browse files
reeshika-hclaude
andcommitted
chore: add ggshield secret scan to husky pre-commit and pre-push hooks
Standard block from the Secrets Scanning (ggshield) setup, section 6.1. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 68fb48f commit c6c9bdd

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎.husky/pre-commit‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
#!/usr/bin/env sh
2+
# >>> GitGuardian secret scan (managed by Contentstack Security) >>>
3+
if [ -z "${CI:-}" ]; then
4+
if ! command -v ggshield >/dev/null 2>&1; then
5+
echo "ggshield is not installed - secret scanning is required. Setup: https://contentstack.atlassian.net/wiki/x/FIDVEwE" >&2
6+
exit 1
7+
fi
8+
ggshield secret scan pre-commit || exit 1
9+
fi
10+
# <<< GitGuardian secret scan <<<
11+
212
# Pre-commit hook to run Talisman and Snyk scans, completing both before deciding to commit
313

414
# Function to check if a command exists

‎.husky/pre-push‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
#!/usr/bin/env sh
2+
# >>> GitGuardian secret scan (managed by Contentstack Security) >>>
3+
if [ -z "${CI:-}" ]; then
4+
if ! command -v ggshield >/dev/null 2>&1; then
5+
echo "ggshield is not installed - secret scanning is required. Setup: https://contentstack.atlassian.net/wiki/x/FIDVEwE" >&2
6+
exit 1
7+
fi
8+
ggshield secret scan pre-push "$@" || exit 1
9+
fi
10+
# <<< GitGuardian secret scan <<<
11+
212

313
echo "🚀 Running pre-push checks..."
414

0 commit comments

Comments
 (0)