Skip to content

Commit 1e42eeb

Browse files
committed
Add git secrets scanning to CI
This change adds a GitHub Actions job to validate git secrets are not submitted to version control. Signed-off-by: Austin Vazquez <[email protected]>
1 parent 2a70d12 commit 1e42eeb

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.gitallowed

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Ignore items listed in .gitallowed
2+
# Workaround for https://github.com/awslabs/git-secrets/issues/198
3+
.gitallowed
4+
5+
# Ignore false positive in docs/getting-started.md
6+
docs/getting-started.md:[0-9]+:export AWS_ACCOUNT=000000000000

.github/workflows/prebuild.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ jobs:
3030
- run: ./scripts/check-ltag.sh
3131
- run: ./scripts/check-dco.sh
3232
- run: PATH=$PATH:$(pwd) ./scripts/check-flatc.sh
33+
34+
git-secrets:
35+
runs-on: ubuntu-20.04
36+
steps:
37+
- name: Pull latest awslabs/git-secrets repo
38+
uses: actions/checkout@v4
39+
with:
40+
repository: awslabs/git-secrets
41+
ref: 1.3.0
42+
fetch-tags: true
43+
path: git-secrets
44+
- name: Install git secrets from source
45+
run: sudo make install
46+
working-directory: git-secrets
47+
- uses: actions/checkout@v4
48+
- name: Scan repository for git secrets
49+
run: |
50+
git secrets --register-aws
51+
git secrets --scan-history
3352
3453
lint:
3554
strategy:

0 commit comments

Comments
 (0)