Skip to content

Commit d6deb4c

Browse files
committed
CI - Add Snyk Scanning
This PR introduces a CI job to periodically scan the OpenVDB repository for security vulernatiblities. This CI job requires coordination with John Mertic (jmertic) and/or the OpenVDB maintainers to add both the `SNYK_ORG` and `SNYK_TOKEN` GitHub secrets to the GitHub configuration. Once these serets are added, then this PR can be merged with the appropriate review/approvals. The Snyk tool can be run on the command line at any time using: ```bash snyk auth ${SNYK_TOKEN} Your account has been authenticated. Snyk is now ready to be used. snyk test --unmanaged --org=${SNYK_ORG} Testing /Users/ddeal/projects/go/src/github.com/dealako/openvdb... Tested 1 dependency for known issues, found 0 issues. snyk monitor --unmanaged --org=${SNYK_ORG} Monitoring /Users/ddeal/projects/go/src/github.com/dealako/openvdb (openvdb)... Explore this snapshot at https://app.snyk.io/org/openvdb/project/a1915379-5638-4049-9345-0a7783bd6a53/history/4c82fd74-757b-40f3-8522-803ae4f84e0f Notifications about newly disclosed issues related to these dependencies will be emailed to you. ``` Contact John Mertic (jmertic) to access the above secrets or to gain access to the Snyk console. Signed-off-by: David Deal <ddeal@linuxfoundation.org>
1 parent 08409f0 commit d6deb4c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
# Copyright (c) Contributors to the OpenVDB Project.
4+
5+
name: Snyk Scan Code
6+
7+
on:
8+
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
9+
schedule:
10+
- cron: "0 4 * * 0"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
snyk-scan-pr:
17+
runs-on: ubuntu-latest
18+
if: github.repository == 'AcademySoftwareFoundation/openvdb'
19+
steps:
20+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
21+
22+
- uses: snyk/actions/setup@8349f9043a8b7f0f3ee8885bf28f0b388d2446e8 # master
23+
id: snyk
24+
25+
- name: Snyk version
26+
run: echo "${{ steps.snyk.outputs.version }}"
27+
28+
- name: Snyk Auth
29+
run: snyk auth ${{ secrets.SNYK_TOKEN }}
30+
31+
- name: Snyk Scan Code
32+
# Scan the C/C++ code for vulnerabilities using the Snyk CLI with the unmanaged flag
33+
# https://docs.snyk.io/scan-using-snyk/supported-languages-and-frameworks/c-c++ for options
34+
run: snyk test --unmanaged --print-dep-paths --org=${{ secrets.SNYK_ORG }}
35+
env:
36+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
37+
continue-on-error: true # optional
38+
39+
- name: Monitor for Vulnerabilities
40+
# To import the test results (issues and dependencies) in the Snyk CLI, run the snyk monitor --unmanaged command:
41+
run: snyk monitor --unmanaged --org=${{ secrets.SNYK_ORG }}
42+
env:
43+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
44+
continue-on-error: true # optional

0 commit comments

Comments
 (0)