File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : msdo-gitleaks-reusable
2+
3+ on :
4+ workflow_dispatch :
5+ workflow_call :
6+ inputs :
7+ branch :
8+ required : false
9+ type : string
10+ default : ' main'
11+ secrets :
12+ GH_TOKEN :
13+ required : false
14+
15+ jobs :
16+ gitleaks-scan :
17+ name : Gitleaks Secret Scan
18+ runs-on : ubuntu-latest
19+
20+ permissions :
21+ contents : read
22+ security-events : write
23+
24+ steps :
25+ - name : Checkout repository
26+ uses : actions/checkout@v4
27+ with :
28+ fetch-depth : 0
29+ ref : ${{ inputs.branch }}
30+
31+ - name : Run Gitleaks
32+ id : gitleaks
33+ uses : gitleaks/gitleaks-action@v2
34+ with :
35+ args : detect --source=. --report-format sarif --report-path=gitleaks.sarif
36+
37+ - name : Upload SARIF to GitHub Code Scanning
38+ if : github.repository_visibility == 'public'
39+ uses : github/codeql-action/upload-sarif@v3
40+ with :
41+ sarif_file : gitleaks.sarif
You can’t perform that action at this time.
0 commit comments