mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-05 10:50:18 +00:00
Merge pull request #11580 from kata-containers/osv-scanner-action
workflow: Add osv-scanner action
This commit is contained in:
40
.github/workflows/osv-scanner.yaml
vendored
Normal file
40
.github/workflows/osv-scanner.yaml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# A sample workflow which sets up periodic OSV-Scanner scanning for vulnerabilities,
|
||||||
|
# in addition to a PR check which fails if new vulnerabilities are introduced.
|
||||||
|
#
|
||||||
|
# For more examples and options, including how to ignore specific vulnerabilities,
|
||||||
|
# see https://google.github.io/osv-scanner/github-action/
|
||||||
|
|
||||||
|
name: OSV-Scanner
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
schedule:
|
||||||
|
- cron: '0 1 * * 0'
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
scan-scheduled:
|
||||||
|
permissions:
|
||||||
|
security-events: write # Require writing security events to upload SARIF file to security tab
|
||||||
|
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
|
||||||
|
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:
|
||||||
|
permissions:
|
||||||
|
security-events: write # Require writing security events to upload SARIF file to security tab
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@1f1242919d8a60496dd1874b24b62b2370ed4c78" # v1.7.1
|
||||||
|
with:
|
||||||
|
# Example of specifying custom arguments
|
||||||
|
scan-args: |-
|
||||||
|
-r
|
||||||
|
--skip-git
|
||||||
|
./
|
Reference in New Issue
Block a user