Snyk Scan Code #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# SPDX-License-Identifier: BSD-3-Clause | |
# Copyright (c) Contributors to the OpenEXR Project. | |
name: Snyk Scan Code | |
on: | |
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | |
schedule: | |
- cron: "0 4 * * 0" | |
permissions: | |
contents: read | |
jobs: | |
snyk-scan-pr: | |
runs-on: ubuntu-latest | |
if: github.repository == 'AcademySoftwareFoundation/openexr' | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: snyk/actions/setup@6312a53377a551c0258438bf25fb8f378afbc977 # master | |
id: snyk | |
- name: Snyk version | |
run: echo "${{ steps.snyk.outputs.version }}" | |
- name: Snyk Auth | |
run: snyk auth ${{ secrets.SNYK_TOKEN }} | |
- name: Snyk Scan Code | |
# Scan the C/C++ code for vulnerabilities using the Snyk CLI with the unmanaged flag | |
# https://docs.snyk.io/scan-using-snyk/supported-languages-and-frameworks/c-c++ for options | |
run: snyk test --unmanaged --print-dep-paths --org=${{ secrets.SNYK_ORG }} | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
continue-on-error: true # optional | |
- name: Monitor for Vulnerabilities | |
# To import the test results (issues and dependencies) in the Snyk CLI, run the snyk monitor --unmanaged command: | |
run: snyk monitor --unmanaged --org=${{ secrets.SNYK_ORG }} | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
continue-on-error: true # optional |