Skip to content

Commit

Permalink
Merge pull request #6 from kartverket/add-category
Browse files Browse the repository at this point in the history
Add category to trivy sarif upload
  • Loading branch information
anderssonw authored Jun 20, 2023
2 parents 324c1b5 + 0bd4c8b commit 5ccb185
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ As of v0.1.0 only GitHub registries are tested and supported.
| trivy | | An optional boolean that determines whether trivy-scan will be run. Defaults to 'true'. |
| tfsec | | An optional boolean that determines whether tfsec-scan will be run. Defaults to 'true'. |
| allow_severity_level | | A string which determines the highest level of severity the security scans can find while still succeeding workflows. Only `medium`, `high` and `critical` are allowed as input strings. Note that these values are case sensitive. |
| trivy_category | | A category for describing the Trivy action. Useful for differentiating between different runs of different images. |

### Example usage

Expand Down
5 changes: 5 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
description: "A string which determines the highest level of severity the security scans can find while still succeeding workflows. Only `medium`, `high` and `critical` are allowed as input strings. Note that these values are case sensitive."
required: false
default: medium
trivy_category:
description: "A category for describing the Trivy action. Useful for differentiating between different runs of different images."
required: false
default: "Trivy"

runs:
using: "composite"
Expand Down Expand Up @@ -92,6 +96,7 @@ runs:
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: trivy-results.sarif
category: ${{ inputs.trivy_category }}

#
# Check results
Expand Down

0 comments on commit 5ccb185

Please sign in to comment.