From d62276b66279697a915131e85251f6a4784f0e46 Mon Sep 17 00:00:00 2001 From: aliefprihantoro Date: Mon, 9 Dec 2024 22:12:39 +0700 Subject: [PATCH] ci: fix osv --- .github/workflows/osv.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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