Snyk Gradle-jdk14 Action

This page provides examples of using the Snyk GitHub Action for Gradle (jdk14). For instructions on using the action and further information see GitHub Actions integration.

Using the Snyk Gradle (jdk14) Action to check for vulnerabilities

You can use the Action as follows:

name: Example workflow for Gradle (jdk14) using Snyk
on: push
jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Run Snyk to check for vulnerabilities
        uses: snyk/actions/gradle-jdk14@master
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

You can use the Snyk Gradle (jdk11) Action to check for only high severity vulnerabilities as follows:

name: Example workflow for Gradle (jdk14) using Snyk
on: push
jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Run Snyk to check for vulnerabilities
        uses: snyk/actions/gradle-jdk14@master
        env:
          SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
        with:
          args: --severity-threshold=high