Trivy Filesystem Code Scanning #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |