setup: derive target platform constants and kubescape asset name #27
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 | |
| on: | |
| push: | |
| branches: ["main", "develop", "master"] | |
| pull_request: | |
| branches: ["main"] | |
| schedule: | |
| - cron: '32 7 * * 1' | |
| permissions: | |
| contents: read | |
| jobs: | |
| analyze: | |
| name: Analyze | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write # Required to upload results to the Security tab | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run Trivy vulnerability scanner (Repo mode) | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| scan-type: 'fs' # 'fs' stands for filesystem (scans your code directly) | |
| ignore-unfixed: true # Only show vulnerabilities that actually have a fix | |
| format: 'sarif' | |
| output: 'trivy-results.sarif' | |
| severity: 'CRITICAL,HIGH' | |
| - name: Upload Trivy scan results to GitHub Security tab | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: 'trivy-results.sarif' |