Skip to content

Trivy Filesystem Code Scanning #17

Trivy Filesystem Code Scanning

Trivy Filesystem Code Scanning #17

name: Trivy Filesystem Code Scanning
on:
schedule:
- cron: '0 6 * * 0' # Every Sunday at 6:00 AM UTC
workflow_dispatch:
permissions:
actions: read
security-events: write
jobs:
build:
if: github.event_name == 'workflow_dispatch' || ( github.event_name == 'schedule' && github.repository == 'kubeflow/dashboard' )
name: Trivy Filesystem Code Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in fs mode
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
format: 'sarif'
severity: 'CRITICAL,HIGH,MEDIUM'
ignore-unfixed: true
output: 'trivy-fs-scan-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-fs-scan-results.sarif'