Skip to content

chore(deps): update github actions #159

chore(deps): update github actions

chore(deps): update github actions #159

Workflow file for this run

name: Trivy
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
scan:
name: Vulnerability Scan
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write # Required to upload SARIF to the GitHub Security tab
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
# On pull requests, fail the job when HIGH/CRITICAL issues are found so
# they surface directly in the PR checks.
- name: Run Trivy (pull request)
if: github.event_name == 'pull_request'
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
scan-type: fs
scan-ref: .
format: table
severity: HIGH,CRITICAL
ignore-unfixed: true
exit-code: 1
# On release, generate a SARIF report and upload it to the GitHub
# Security tab instead of failing the release.
- name: Run Trivy (release)
if: github.event_name == 'push'
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
scan-type: fs
scan-ref: .
format: sarif
output: trivy-results.sarif
ignore-unfixed: true
- name: Upload Trivy results to GitHub Security tab
if: github.event_name == 'push'
uses: github/codeql-action/upload-sarif@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
with:
sarif_file: trivy-results.sarif