Skip to content

Commit

Permalink
Merge pull request #15 from aquasecurity/sarif-support-3
Browse files Browse the repository at this point in the history
docs: Fix docs and add improved example repo
  • Loading branch information
simar7 authored Jul 30, 2020
2 parents 6d50808 + 4edb45e commit 159e7e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
go-version: 1.14
- name: Checkout code
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
- name: Build an image from Dockerfile
run: |
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
Expand All @@ -78,14 +80,16 @@ jobs:
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
format: 'template'
template: '@contrib/sarif.tpl'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to Security tab
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: 'trivy-results.sarif'
```
You can find a more in-depth example here: https://github.com/aquasecurity/trivy-sarif-demo
## Customizing
### inputs
Expand All @@ -96,7 +100,7 @@ Following inputs can be used as `step.with` keys:
|------------------|---------|------------------------------------|-----------------------------------------------|
| `image-ref` | String | | Image reference, e.g. `alpine:3.10.2` |
| `format` | String | `table` | Output format (`table`, `json`, `template`) |
| `template` | String | | Output template (`@contrib/sarif.tpl`, `@contrib/gitlab.tpl`, `@contrib/junit.tpl`)|
| `template` | String | | Output template (`@/contrib/sarif.tpl`, `@/contrib/gitlab.tpl`, `@/contrib/junit.tpl`)|
| `output` | String | | Save results to a file |
| `exit-code` | String | `0` | Exit code when vulnerabilities were found |
| `ignore-unfixed` | Boolean | false | Ignore unpatched/unfixed vulnerabilities |
Expand Down
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ inputs:
required: false
default: 'table'
template:
description: 'use an existing template for rendering output (@contrib/sarif.tpl, @contrib/gitlab.tpl, @contrib/junit.tpl'
description: 'use an existing template for rendering output (@/contrib/sarif.tpl, @/contrib/gitlab.tpl, @/contrib/junit.tpl'
required: false
default: ''
output:
Expand Down

0 comments on commit 159e7e8

Please sign in to comment.