7676 uses : aquasecurity/trivy-action@master
7777 with :
7878 image-ref : ' docker.io/my-organization/my-app:${{ github.sha }}'
79- format : ' template'
80- template : ' @/contrib/sarif.tpl'
79+ format : ' sarif'
8180 output : ' trivy-results.sarif'
8281
8382 - name : Upload Trivy scan results to GitHub Security tab
@@ -112,8 +111,7 @@ jobs:
112111 uses : aquasecurity/trivy-action@master
113112 with :
114113 image-ref : ' docker.io/my-organization/my-app:${{ github.sha }}'
115- format : ' template'
116- template : ' @/contrib/sarif.tpl'
114+ format : ' sarif'
117115 output : ' trivy-results.sarif'
118116
119117 - name : Upload Trivy scan results to GitHub Security tab
@@ -149,8 +147,7 @@ jobs:
149147 with :
150148 scan-type : ' fs'
151149 ignore-unfixed : true
152- format : ' template'
153- template : ' @/contrib/sarif.tpl'
150+ format : ' sarif'
154151 output : ' trivy-results.sarif'
155152 severity : ' CRITICAL'
156153
@@ -185,8 +182,7 @@ jobs:
185182 scan-type : ' rootfs'
186183 scan-ref : ' rootfs-example-binary'
187184 ignore-unfixed : true
188- format : ' template'
189- template : ' @/contrib/sarif.tpl'
185+ format : ' sarif'
190186 output : ' trivy-results.sarif'
191187 severity : ' CRITICAL'
192188
@@ -256,8 +252,7 @@ jobs:
256252 uses: aquasecurity/trivy-action@master
257253 with:
258254 image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
259- format: 'template'
260- template: '@/contrib/sarif.tpl'
255+ format: 'sarif'
261256 output: 'trivy-results.sarif'
262257 env:
263258 TRIVY_USERNAME: Username
@@ -293,8 +288,7 @@ jobs:
293288 uses: aquasecurity/trivy-action@master
294289 with:
295290 image-ref: 'aws_account_id.dkr.ecr.region.amazonaws.com/imageName:${{ github.sha }}'
296- format: 'template'
297- template: '@/contrib/sarif.tpl'
291+ format: 'sarif'
298292 output: 'trivy-results.sarif'
299293 env:
300294 AWS_ACCESS_KEY_ID: key_id
@@ -330,8 +324,7 @@ jobs:
330324 uses: aquasecurity/trivy-action@master
331325 with:
332326 image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
333- format: 'template'
334- template: '@/contrib/sarif.tpl'
327+ format: 'sarif'
335328 output: 'trivy-results.sarif'
336329 env:
337330 GOOGLE_APPLICATION_CREDENTIAL: /path/to/credential.json
@@ -364,8 +357,7 @@ jobs:
364357 uses: aquasecurity/trivy-action@master
365358 with:
366359 image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
367- format: 'template'
368- template: '@/contrib/sarif.tpl'
360+ format: 'sarif'
369361 output: 'trivy-results.sarif'
370362 env:
371363 TRIVY_USERNAME: Username
@@ -389,8 +381,8 @@ Following inputs can be used as `step.with` keys:
389381| `input` | String | | Tar reference, e.g. `alpine-latest.tar` |
390382| `image-ref` | String | | Image reference, e.g. `alpine:3.10.2` |
391383| `scan-ref` | String | `/github/workspace/` | Scan reference, e.g. `/github/workspace/` or `.`|
392- | `format` | String | `table` | Output format (`table`, `json`, `template `) |
393- | `template` | String | | Output template (`@/contrib/sarif.tpl`, `@/contrib/ gitlab.tpl`, `@/contrib/junit.tpl`)|
384+ | `format` | String | `table` | Output format (`table`, `json`, `sarif `) |
385+ | `template` | String | | Output template (`@/contrib/gitlab.tpl`, `@/contrib/junit.tpl`)|
394386| `output` | String | | Save results to a file |
395387| `exit-code` | String | `0` | Exit code when specified vulnerabilities are found |
396388| `ignore-unfixed` | Boolean | false | Ignore unpatched/unfixed vulnerabilities |
0 commit comments