Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/osv-scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# A workflow which sets up OSV-Scanner scanning for vulnerabilities on PRs and pushes.
# Designed to work alongside Dependabot for existing dependency management.

name: OSV-Scanner

on:
pull_request:
branches: [ "main" ]
merge_group:
branches: [ "main" ]
push:
branches: [ "main" ]

permissions:
# Require writing security events to upload SARIF file to security tab
security-events: write
# Read commit contents
contents: read
# Required by OSV-Scanner v2 to read workflow runs
actions: read

jobs:
scan-push:
if: ${{ github.event_name == 'push' }}
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v2.3.3"
with:
scan-args: |-
-r
--skip-git
./
scan-pr:
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@v2.3.3"
with:
scan-args: |-
-r
--skip-git
./
Loading