Skip to content

Commit 94d809e

Browse files
author
loki-bedlam
committed
ci: add git-secrets GitHub Actions workflow
Scans full commit history on every push and PR. Local hooks are not committed - this enforces scanning in CI.
1 parent f3f2595 commit 94d809e

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/secret-scan.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Secret Scan
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
jobs:
10+
git-secrets:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Install git-secrets
18+
run: |
19+
git clone https://github.com/awslabs/git-secrets.git /tmp/git-secrets
20+
cd /tmp/git-secrets && sudo make install
21+
22+
- name: Register AWS patterns
23+
run: git secrets --register-aws --global
24+
25+
- name: Scan for secrets
26+
run: git secrets --scan-history

0 commit comments

Comments
 (0)