Snyk Test SARIF #50
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
name: Snyk Test SARIF | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- '**.gradle' | |
schedule: | |
# run once a week Mondays at 4 a.m. UTC | |
- cron: '0 4 * * 1' | |
jobs: | |
build: | |
name: Snyk test and upload SARIF | |
environment: snyk | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup Snyk | |
run: | | |
npm install snyk -g | |
snyk auth ${{ secrets.SNYK_AUTH }} | |
- name: Snyk Open Source | |
id: test | |
run: | | |
chmod +x ./resources/snyk-test-script.sh | |
./resources/snyk-test-script.sh | |
continue-on-error: true | |
- name: Upload SARIF file | |
if: steps.test.outcome == 'success' | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
# Path to SARIF file relative to the root of the repository | |
sarif_file: snyk_test_result.sarif |