Merge pull request #2 from specklesystems/iain/add-ggshield-not-ci-pre-commit-hook

Adds a pre-commit hook for ggshield not in a CI environment
This commit is contained in:
Iain Sproat
2022-08-25 12:12:05 +01:00
committed by GitHub
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
- id: ggshield-not-ci
name: GitGuardian Shield (pre-commit)
description: Runs ggshield in non-CI environments to detect hardcoded secrets, security vulnerabilities and policy breaks.
stages: [commit]
entry: hooks/ggshield-not-ci.sh
language: script
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail
if [[ ! -z "${CI}"} ]]; then
ggshield secret scan pre-commit
fi