ci: pin trivy-action to v0.36.0 to fix runtime install failure #7
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: Secret Scan | |
| # Ignore-agnostic credential scanning. gitleaks (history) plus a full working-tree | |
| # scan that also inspects .gitignore'd files, so a token in an ignored dotfile | |
| # cannot slip through the gate. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 5 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| secret-scan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| # Run the gitleaks CLI directly instead of gitleaks-action: the action | |
| # requires a paid GITLEAKS_LICENSE for org-owned repos and ships a build | |
| # pinned to the deprecated Node 20 runtime. The CLI is MIT-licensed and | |
| # scans full git history the same way. | |
| - name: gitleaks (full history) | |
| env: | |
| GITLEAKS_VERSION: 8.30.1 | |
| run: | | |
| curl -sSfL \ | |
| "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \ | |
| | tar -xz -C /tmp gitleaks | |
| /tmp/gitleaks version | |
| /tmp/gitleaks git --redact --verbose --exit-code 1 . | |
| - name: trivy secret scan (ignore-agnostic working tree) | |
| uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0 | |
| with: | |
| scan-type: fs | |
| scanners: secret | |
| skip-dirs: .git | |
| exit-code: '1' | |
| severity: LOW,MEDIUM,HIGH,CRITICAL |