From 2ec7809bcc17affdf737627dbdecc8f5bc7a30da Mon Sep 17 00:00:00 2001 From: litebito <3867999+litebito@users.noreply.github.com> Date: Sun, 26 Apr 2026 09:48:12 +0200 Subject: [PATCH] Add Trivy scan workflow for vulnerability scanning Signed-off-by: litebito <3867999+litebito@users.noreply.github.com> --- .github/workflows/trivy_scan | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/trivy_scan diff --git a/.github/workflows/trivy_scan b/.github/workflows/trivy_scan new file mode 100644 index 00000000..6c8d8c43 --- /dev/null +++ b/.github/workflows/trivy_scan @@ -0,0 +1,34 @@ +name: Trivy scan +on: + pull_request: + branches: + - main + push: + branches: + - main + schedule: + - cron: '0 0 * * *' + + +jobs: + scan: + name: scan + runs-on: [self-hosted, linux, x64, repo-airsonic-pulse] + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Run Trivy vulnerability scanner + uses: aquasecurity/trivy-action@0.33.0 + with: + scan-type: 'fs' + format: 'sarif' + ignore-unfixed: true + output: 'trivy-results.sarif' + severity: 'CRITICAL' + + - name: Upload Trivy scan results to GitHub Security tab + uses: github/codeql-action/upload-sarif@v3 + if: always() + with: + sarif_file: 'trivy-results.sarif'