@@ -81,52 +81,10 @@ jobs:
8181 - name : Checkout
8282 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
8383 - name : Run Trivy in fs mode
84- continue-on-error : true
8584 uses : aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
8685 with :
8786 scan-type : fs
8887 scan-ref : .
8988 exit-code : 1
9089 list-all-pkgs : true
91- format : json
92- output : trivy-report.json
93- - name : Show report in human-readable format
94- uses : aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
95- with :
96- scan-type : convert
97- vuln-type : ' '
98- severity : ' '
99- image-ref : trivy-report.json
10090 format : table
101- - name : Convert report to sarif
102- if : ${{ inputs.upload-to-github-security-tab }}
103- uses : aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
104- with :
105- scan-type : convert
106- vuln-type : ' '
107- severity : ' '
108- image-ref : trivy-report.json
109- format : sarif
110- output : trivy-report.sarif
111- - name : Upload sarif report to GitHub Security tab
112- if : ${{ inputs.upload-to-github-security-tab }}
113- uses : github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3
114- with :
115- sarif_file : trivy-report.sarif
116- - name : Convert report to csv
117- if : ${{ inputs.export-csv }}
118- uses : aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
119- with :
120- scan-type : convert
121- vuln-type : ' '
122- severity : ' '
123- image-ref : trivy-report.json
124- format : template
125- template : " @.github/workflows/template/trivy-csv.tpl"
126- output : trivy-report.csv
127- - name : Upload CSV report as an artifact
128- if : ${{ inputs.export-csv }}
129- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
130- with :
131- name : trivy-report
132- path : trivy-report.csv
0 commit comments