Skip to content

Commit e668f99

Browse files
Create secret-scanning.yml
Create secret-scanning workflow
1 parent f3733e1 commit e668f99

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: MSDO Secret Scan
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch: # Allow manual runs
7+
workflow_call: # Allow other workflows to call this one
8+
9+
jobs:
10+
secret-scan:
11+
name: Run MSDO Secret Scan
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v3
17+
18+
- name: Setup .NET for MSDO
19+
uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: '7.0.x' # Make sure this matches your environment
22+
23+
- name: Install MSDO CLI
24+
run: dotnet tool install --global Microsoft.Security.DevOps.Cli
25+
26+
- name: Run Secret Scan with MSDO
27+
run: |
28+
msdo scan --src . --output results.sarif --policy minimal
29+
30+
- name: Upload SARIF results
31+
uses: github/codeql-action/upload-sarif@v2
32+
with:
33+
sarif_file: results.sarif

0 commit comments

Comments
 (0)