Skip to content

Commit

Permalink
feat: SRE-955 support skipping trivy db update (#13)
Browse files Browse the repository at this point in the history
Adds support for setting `TRIVY_SKIP_DB_UPDATE` by passing `update-db`
to the action.
  • Loading branch information
parkerd authored Oct 24, 2024
1 parent d39695a commit 486ae16
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ inputs:
slack-channel-id:
description: "Slack channel ID for sending notifications."
required: false
update-db:
description: "Update Trivy vulnerability database."
required: false
default: "true"

outputs:
artifact-url:
Expand All @@ -50,6 +54,8 @@ runs:
- name: Run Trivy vulnerability scanner in ${{ inputs.scan-type }} mode
id: trivy_scan
uses: aquasecurity/[email protected]
env:
TRIVY_SKIP_DB_UPDATE: ${{ inputs.update-db == "false" && "true" || "false" }}
with:
scan-type: ${{ inputs.scan-type }}
image-ref: ${{ inputs.image-ref }}
Expand Down

0 comments on commit 486ae16

Please sign in to comment.