diff --git a/.github/workflows/osv.yml b/.github/workflows/osv.yml index 5cec878..05156fe 100644 --- a/.github/workflows/osv.yml +++ b/.github/workflows/osv.yml @@ -9,9 +9,19 @@ on: permissions: # Require writing security events to upload SARIF file to security tab security-events: write - # Only need to read contents + # Read commit contents contents: read jobs: scan-scheduled: - uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v1.9.1" \ No newline at end of file + if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} + uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@1f1242919d8a60496dd1874b24b62b2370ed4c78" # v1.7.1 + with: + # Example of specifying custom arguments + 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@1f1242919d8a60496dd1874b24b62b2370ed4c78" # v1.7.1 \ No newline at end of file