Skip to content

Commit 40be265

Browse files
committed
Add(secret-scan): Github workflow
1 parent febee3c commit 40be265

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/secret-scan.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Secret Scan
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
gitleaks:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Install Gitleaks
20+
run: |
21+
curl -sSfL https://github.com/zricethezav/gitleaks/releases/download/v8.2.0/gitleaks_8.2.0_linux_x64.tar.gz | tar -xz -C /usr/local/bin gitleaks
22+
23+
- name: Run Gitleaks
24+
run: gitleaks detect --source . --report-path gitleaks-report.json
25+
26+
trufflehog:
27+
if: github.event_name == 'workflow_dispatch'
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v3
32+
33+
- name: Install TruffleHog
34+
run: |
35+
pip install truffleHog
36+
37+
- name: Run TruffleHog
38+
run: trufflehog git --repo-path . --json > trufflehog-report.json

0 commit comments

Comments
 (0)