From 4edb45e6ff5ead13438414024397f7ca6fbe8630 Mon Sep 17 00:00:00 2001 From: Simarpreet Singh Date: Thu, 30 Jul 2020 14:27:56 -0700 Subject: [PATCH] docs: Fix docs and add improved example repo Signed-off-by: Simarpreet Singh --- README.md | 8 ++++++-- action.yaml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 76da45d..cf2e3c5 100644 --- a/README.md +++ b/README.md @@ -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 }} . @@ -78,7 +80,7 @@ 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 @@ -86,6 +88,8 @@ jobs: sarif_file: 'trivy-results.sarif' ``` +You can find a more in-depth example here: https://github.com/aquasecurity/trivy-sarif-demo + ## Customizing ### inputs @@ -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 | diff --git a/action.yaml b/action.yaml index d283f19..ee921da 100644 --- a/action.yaml +++ b/action.yaml @@ -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: