Skip to content

Commit 5ca36bc

Browse files
committed
Integrate osv-scanner workflow
Signed-off-by: Steven Moy <github@stevenmoy.com>
1 parent 0562b96 commit 5ca36bc

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: OSV-Scanner
16+
17+
on:
18+
pull_request:
19+
branches: ["main"]
20+
merge_group:
21+
types: [checks_requested]
22+
schedule:
23+
- cron: "12 12 * * 1"
24+
push:
25+
branches: ["main"]
26+
27+
permissions:
28+
# Required to upload SARIF file to CodeQL. See: https://github.com/github/codeql-action/issues/2117
29+
actions: read
30+
# Require writing security events to upload SARIF file to security tab
31+
security-events: write
32+
# Read commit contents
33+
contents: read
34+
35+
jobs:
36+
scan-scheduled:
37+
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
38+
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@3adb4b14a2b0623876d18d863a498b785fb3752d" # v2.3.8
39+
with:
40+
# Example of specifying custom arguments
41+
scan-args: |-
42+
--include-git-root
43+
-r
44+
./
45+
scan-pr:
46+
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
47+
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@3adb4b14a2b0623876d18d863a498b785fb3752d" # v2.3.8
48+
with:
49+
# Example of specifying custom arguments
50+
scan-args: |-
51+
--include-git-root
52+
-r
53+
./

0 commit comments

Comments
 (0)