GithubHelp home page GithubHelp logo

00mjk / snyk-issues-to-html Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snyk-labs/snyk-issues-to-html

0.0 0.0 0.0 40 KB

Export Snyk report issues to HTML

JavaScript 34.20% HTML 65.80%

snyk-issues-to-html's Introduction

Snyk logo


Snyk Reported Issues to HTML export

This command line utility uses the Snyk API to export the list of all reported issues for an organization to a static HTML page.

How do I use it?

Install or clone

First, Install the Snyk JSON to HTML Mapper using npm:

npm install snyk-issues-to-html -g

Alternatively, you can skip this step, clone this repository and run the script locally (using node ./bin/cli.js)

Generate the HTML report

Get an API Token

You will need the following information to access the API:

  1. A Snyk account with an API access enabled
  2. The Snyk API token

Make the token available via the SNYK_TOKEN environment variable, or pass it as an option to the CLI via the --token "12345" command option.

Export a report

The following will export a default filtering of reported issues for the organization associated with this API token:

snyk-issues-to-html --token "1234"

Customizing the issues filter

Create a JSON configuration file in the following format with your own customization for the filters:

filename: snyk-issues-filters.json

{
  "filters": {
    "date": {
      "from": "2019-01-01",
      "to": "2019-10-01"
    },
    "orgs": ["a-b-c-d-e"],
    "severity": ["high", "medium", "low"],
    "types": ["vuln", "license"],
    "languages": [
      "node",
      "ruby",
      "java",
      "scala",
      "python",
      "golang",
      "php",
      "dotnet"
    ],
    "ignored": false,
    "patched": false,
    "fixable": false,
    "isFixed": false,
    "isUpgradable": false,
    "isPatchable": false
  }
}

and export it:

snyk-issues-to-html --token "1234" --config snyk-issues-filters.json

View the HTML report

Simply open your new file (snyk-reported-issues.html above) in a browser, and rejoice.

License

License: Apache License, Version 2.0

snyk-issues-to-html's People

Contributors

dependabot[bot] avatar lirantal 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.