update go deps #21
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 | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - main | |
| - master | |
| paths: | |
| - go.mod | |
| - go.sum | |
| - .github/workflows/osv-scanner.yml | |
| jobs: | |
| osv-scan: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| statuses: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - run: go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest | |
| - run: mkdir -p security_issues | |
| - run: osv-scanner scan source --recursive --format json --no-call-analysis=go --experimental-exclude=debug --experimental-exclude=scripts --experimental-exclude=tests --experimental-exclude=.livereview_pgdata --experimental-exclude=.lrdata --experimental-exclude=livereview_pgdata --experimental-exclude=lrdata . > security_issues/osv-scanner-ci.json | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: osv-scanner-ci-report | |
| path: security_issues/osv-scanner-ci.json | |
| - name: Report status to commit SHA | |
| if: always() && github.event_name == 'workflow_dispatch' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| STATE: ${{ job.status == 'success' && 'success' || 'failure' }} | |
| run: | | |
| gh api \ | |
| --method POST \ | |
| repos/${{ github.repository }}/statuses/${{ github.sha }} \ | |
| -f state="$STATE" \ | |
| -f context="osv-scan" \ | |
| -f description="OSV Scanner completed with status: $STATE" \ | |
| -f target_url="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" |