Giter VIP home page Giter VIP logo

infra-action-snyk-job-summary-action's Introduction

snyk-job-summary-action

This Github Action gives the statistics of different kinds of vulnerabilities. Use this action to add a Job Summary in GitHub Workflows.

Usage

To use this action, you will need to have a Snyk account and an API token. If you haven't already done so, sign up for a free Snyk account, then generate an API token.

To use this action in your project, add the following to your GitHub Actions workflow:

...
- name: Run Snyk to check for vulnerabilities in dependencies
  uses: snyk/actions/gradle-jdk11@master # See https://github.com/snyk/actions for other supported build tools/languages
  continue-on-error: true
  env:
    SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
  with:
    command: test --all-projects --json-file-output=snyk_dependencies.json
          
- name: Run Snyk to check for vulnerabilities in code
  uses: snyk/actions/gradle-jdk11@master # See https://github.com/snyk/actions for other supported build tools/languages
  env:
    SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
  with:
    command: code test --all-projects --json-file-output=snyk_code.json

- name: Add Job Summary from Snyk reports
  uses: medly/snyk-job-summary-action@v1
  with:
      dependencies-report-path: snyk_dependencies.json # The file name of json file which is generated on snyk test
      code-report-path: snyk_code.json # The file name of json file which is generated on snyk code test

This action performs the following steps:

  • Runs a Snyk test to check for vulnerabilities in dependencies
  • Runs a Snyk test to check for vulnerabilities in code
  • Generates JSON files for both dependencies and code tests
  • Adds a job summary with the results of the Snyk tests

Note that this action is set to continue on error, so your workflow will not fail even if vulnerabilities are found.

Inputs

SNYK_TOKEN: Your Snyk API token. This should be stored as a GitHub secret.

Contributing

We welcome contributions to this GitHub Action! To contribute, please create a pull request with your proposed changes.

License

This GitHub Action is licensed under the MIT License.

infra-action-snyk-job-summary-action's People

Contributors

niraj8 avatar kkkirill avatar sohel-tamboli avatar preeti1397 avatar souro1212 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.