Snyk Gradle-jdk16 Action
This page provides examples of using the Snyk GitHub Action for Gradle (jdk16). For instructions on using the action and further information, see GitHub Actions for Snyk setup and checking for vulnerabilities.
Using the Snyk Gradle (jdk16) Action to check for vulnerabilities
You can use the Snyk Gradle (jdk16) Action to check for vulnerabilities as follows:
You can use the Snyk Gradle (jdk16) Action to check for only high severity vulnerabilities as follows:
Using the Snyk Gradle (jdk16) Action to run snyk monitor
For an example of running snyk monitor
, see this Snyk monitor example.
Upload Snyk scan results to GitHub Code Scanning using the Gradle (jdk16) Action
Using --sarif-file-output
Snyk CLI option and the GitHub SARIF upload action, you can upload Snyk scan results to GitHub Code Scanning.
The Snyk Action fails when vulnerabilities are found. This would prevent the SARIF upload action from running. Thus, you must use a continue-on-error option as shown in this example:
Last updated
Was this helpful?