File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : OSV-Scanner (PR Check)
2+
3+ on :
4+ pull_request :
5+ branches : [ "main" ]
6+
7+ jobs :
8+ osv-scan :
9+ name : Scan for New Vulnerabilities
10+ runs-on : ubuntu-latest
11+
12+ permissions :
13+ contents : read
14+ security-events : write # Required to upload results to GitHub Security tab
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0 # Important: Fetch full history for diff comparison
21+
22+ - name : Run OSV-Scanner
23+ uses : google/osv-scanner-action@v1
24+ with :
25+ # This specific config enables the "Diff" logic from your diagram
26+ scan-args : |-
27+ --recursive
28+ --format=sarif
29+ --output=results.sarif
30+
31+ # Optional: If you want to block the PR on new findings
32+ fail-on-vuln : true
33+
34+ - name : Upload SARIF results
35+ uses : github/codeql-action/upload-sarif@v3
36+ if : always() # Upload results even if the scan fails
37+ with :
38+ sarif_file : results.sarif
You can’t perform that action at this time.
0 commit comments