From 196bcf8500045bc10e13975c40eeee51444d4814 Mon Sep 17 00:00:00 2001
From: Mauro Morales <contact@mauromorales.com>
Date: Tue, 2 Jul 2024 16:51:02 +0200
Subject: [PATCH] Add osv scanner on PRs

Signed-off-by: Mauro Morales <contact@mauromorales.com>
---
 .github/workflows/osv-scanner-pr.yaml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 .github/workflows/osv-scanner-pr.yaml

diff --git a/.github/workflows/osv-scanner-pr.yaml b/.github/workflows/osv-scanner-pr.yaml
new file mode 100644
index 0000000..4e98f36
--- /dev/null
+++ b/.github/workflows/osv-scanner-pr.yaml
@@ -0,0 +1,18 @@
+name: OSV-Scanner PR Scan
+
+# Change "main" to your default branch if you use a different name, i.e. "master"
+on:
+  pull_request:
+    branches: [main]
+  merge_group:
+    branches: [main]
+
+permissions:
+  # Require writing security events to upload SARIF file to security tab
+  security-events: write
+  # Only need to read contents
+  contents: read
+
+jobs:
+  scan-pr:
+    uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v1.7.1"