File tree Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Original file line number Diff line number Diff line change 1- name : build
1+ name : Code Scanning
2+
23on :
34 push :
45 branches :
56 - main
6- pull_request :
7+
8+ permissions :
9+ actions : read
10+ security-events : write
11+
712jobs :
8- build :
9- name : Build
13+ code-scanning :
1014 runs-on : ubuntu-latest
11- permissions :
12- contents : read
13- security-events : write
1415 steps :
1516 - name : Checkout code
16- uses : actions/checkout@v4
17+ uses : actions/checkout@v3
1718
18- - name : Run Trivy vulnerability scanner in repo mode
19- uses : aquasecurity/trivy-action@0.28.0
20- with :
21- scan-type : ' fs '
22- ignore-unfixed : true
23- format : ' sarif'
24- output : ' trivy-results.sarif '
25- severity : ' CRITICAL'
19+ - name : Run Trivy
20+ env :
21+ TRIVY_IGNORE_UNFIXED : true
22+ TRIVY_SEVERITY : CRITICAL
23+ TRIVY_FORMAT : sarif
24+ TRIVY_OUTPUT : trivy-results. sarif
25+ run : |
26+ trivy fs --ignore-unfixed -- severity CRITICAL --format sarif --output trivy-results.sarif .
2627
27- - name : Upload Trivy scan results to GitHub Security tab
28+ - name : Upload SARIF
2829 uses : github/codeql-action/upload-sarif@v3
2930 with :
30- sarif_file : ' trivy-results.sarif'
31+ sarif_file : trivy-results.sarif
32+ token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments