https://github.com/snyk-labs/snyk-issues-to-html
  
  
    Export Snyk report issues to HTML 
    https://github.com/snyk-labs/snyk-issues-to-html
  
        Last synced: 6 months ago 
        JSON representation
    
Export Snyk report issues to HTML
- Host: GitHub
- URL: https://github.com/snyk-labs/snyk-issues-to-html
- Owner: snyk-labs
- Created: 2019-09-02T09:18:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-05T19:23:58.000Z (over 3 years ago)
- Last Synced: 2024-04-16T11:07:52.024Z (over 1 year ago)
- Language: HTML
- Size: 39.1 KB
- Stars: 3
- Watchers: 5
- Forks: 4
- Open Issues: 8
- 
            Metadata Files:
            - Readme: README.md
- Codeowners: .github/CODEOWNERS
 
Awesome Lists containing this project
README
          [](https://snyk.io)
---
# 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
```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](LICENSE)