Skip to content

Commit 7d50118

Browse files
committed
review comments
1 parent 065e399 commit 7d50118

File tree

1 file changed

+12
-31
lines changed

1 file changed

+12
-31
lines changed

.github/workflows/osv-scanner.yml

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
6-
# A sample workflow which sets up periodic OSV-Scanner scanning for vulnerabilities,
7-
# in addition to a PR check which fails if new vulnerabilities are introduced.
8-
#
9-
# For more examples and options, including how to ignore specific vulnerabilities,
10-
# see https://google.github.io/osv-scanner/github-action/
11-
121
name: OSV-Scanner
132

143
on:
@@ -21,28 +10,20 @@ on:
2110
push:
2211
branches: [ "main" ]
2312

24-
permissions:
25-
# Require writing security events to upload SARIF file to security tab
26-
security-events: write
27-
# Read commit contents
28-
contents: read
29-
3013
jobs:
14+
3115
scan-scheduled:
3216
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
33-
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@1f1242919d8a60496dd1874b24b62b2370ed4c78" # v1.7.1
34-
with:
35-
# Example of specifying custom arguments
36-
scan-args: |-
37-
-r
38-
--skip-git
39-
./
17+
permissions:
18+
security-events: write
19+
contents: read
20+
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@1f1242919d8a60496dd1874b24b62b2370ed4c78 # v1.7.1
21+
22+
4023
scan-pr:
4124
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
42-
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@1f1242919d8a60496dd1874b24b62b2370ed4c78" # v1.7.1
43-
with:
44-
# Example of specifying custom arguments
45-
scan-args: |-
46-
-r
47-
--skip-git
48-
./
25+
permissions:
26+
security-events: write
27+
contents: read
28+
actions: write
29+
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@1f1242919d8a60496dd1874b24b62b2370ed4c78 # v1.7.1

0 commit comments

Comments
 (0)