mirror of
https://github.com/Airsonic-Pulse/airsonic-pulse.git
synced 2026-07-09 21:18:27 +00:00
Add Trivy scan workflow for vulnerability scanning
Signed-off-by: litebito <3867999+litebito@users.noreply.github.com>
This commit is contained in:
parent
8147012829
commit
2ec7809bcc
1 changed files with 34 additions and 0 deletions
34
.github/workflows/trivy_scan
vendored
Normal file
34
.github/workflows/trivy_scan
vendored
Normal file
|
|
@ -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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue