OSV-Scanner #10
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: OSV-Scanner | |
| # The push/pull_request runs were moved to `ci.yml`'s `osv` job so the | |
| # GitHub code-scanning advanced-setup configuration (which is pinned to | |
| # `ci.yml:osv`) finds them. This standalone workflow keeps the weekly | |
| # cron + manual dispatch path so OSV advisory-data updates are picked | |
| # up between PRs. | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "33 5 * * 2" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| osv: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Install osv-scanner | |
| run: | | |
| curl -sL -o /tmp/osv-scanner \ | |
| https://github.com/google/osv-scanner/releases/download/v2.3.8/osv-scanner_linux_amd64 | |
| chmod +x /tmp/osv-scanner | |
| - name: Scan pnpm-lock.yaml (SARIF output) | |
| run: | | |
| /tmp/osv-scanner scan source \ | |
| --lockfile=pnpm-lock.yaml \ | |
| --format=sarif \ | |
| --output=osv.sarif || true | |
| - uses: github/codeql-action/upload-sarif@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4 | |
| if: always() | |
| with: | |
| sarif_file: osv.sarif | |
| category: osv-scanner | |
| - name: Fail on vulnerabilities | |
| run: /tmp/osv-scanner scan source --lockfile=pnpm-lock.yaml |