Skip to content

Commit 716e03f

Browse files
authored
chore: add ggshield to CI and pre-commit (#73)
Co-authored-by: Séverine Bonnechère <[email protected]>
1 parent 3e24e5c commit 716e03f

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,19 @@ jobs:
4646
else
4747
bash -c "yarn test"
4848
fi
49+
50+
scanning:
51+
name: GitGuardian scan
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
with:
57+
fetch-depth: 0 # fetch all history so multiple commits can be scanned
58+
- name: GitGuardian scan
59+
uses: GitGuardian/ggshield-action@v1
60+
env:
61+
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
62+
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
63+
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
64+
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@ repos:
2828
hooks:
2929
- id: codespell
3030
exclude: ^(ggshield-internal)
31+
32+
- repo: https://github.com/gitguardian/ggshield
33+
rev: v1.36.0
34+
hooks:
35+
- id: ggshield
36+
language_version: python3
37+
stages: [pre-commit]

0 commit comments

Comments
 (0)