Add OSV Scanner for PRs and merges into main (#2221)

This commit is contained in:
Mohammed Nafees
2025-08-28 21:26:47 +02:00
committed by GitHub
parent e2e00245ba
commit 4e44f05c16

30
.github/workflows/osv-scanner.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: OSV-Scanner
on:
pull_request:
branches: [ "main" ]
push:
branches: [ "main" ]
permissions:
actions: read
security-events: write
contents: read
jobs:
scan-scheduled:
if: ${{ github.event_name == 'push' }}
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v2.2.2"
with:
scan-args: |-
-r
--skip-git
./
scan-pr:
if: ${{ github.event_name == 'pull_request' }}
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@v2.2.2"
with:
scan-args: |-
-r
--skip-git
./