UNPKG

2.67 kBMarkdownView Raw
1# yarn-audit-html
2
3[![](https://img.shields.io/david/davityavryan/yarn-audit-html.svg?style=flat-square)](https://david-dm.org/davityavryan/yarn-audit-html/master)
4[![](https://img.shields.io/david/dev/davityavryan/yarn-audit-html.svg?style=flat-square)](https://david-dm.org/davityavryan/yarn-audit-html/master?type=dev)
5[![](https://img.shields.io/david/peer/davityavryan/yarn-audit-html.svg?style=flat-square)](https://david-dm.org/davityavryan/yarn-audit-html/master?type=peer)
6![](https://img.shields.io/github/last-commit/davityavryan/yarn-audit-html.svg?style=flat-square)
7[![](https://img.shields.io/snyk/vulnerabilities/npm/yarn-audit-html.svg?style=flat-square)](https://snyk.io/test/npm/yarn-audit-html)
8[![](https://img.shields.io/lgtm/alerts/g/davityavryan/yarn-audit-html.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/davityavryan/yarn-audit-html/alerts/)
9[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/davityavryan/yarn-audit-html.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/davityavryan/yarn-audit-html/context:javascript)
10[![](https://flat.badgen.net/packagephobia/install/yarn-audit-html)](https://packagephobia.now.sh/result?p=yarn-audit-html)
11[![Gitter](https://badges.gitter.im/yarn-audit-html/community.svg)](https://gitter.im/yarn-audit-html/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
12
13[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/davityavryan)
14
15## Generate a HTML report for Yarn Audit
16
17## Install
18
19```bash
20yarn global add yarn-audit-html
21```
22
23## Usage
24
25To generate a report, run the following:
26
27```bash
28yarn audit --json | yarn-audit-html
29```
30
31By default the report will be saved to `yarn-audit.html`
32
33If you want to specify the output file, add the `--output` option:
34
35```bash
36yarn audit --json | yarn-audit-html --output report.html
37```
38
39Unique vulnerability list will be generated by default (Grouped by `MODULE_NAME`, `VERSION` and `CWE`). If you want to show all, one-by-one, add the `--no-unique` option:
40
41```bash
42yarn audit --json | yarn-audit-html --no-unique
43```
44
45You can also fully customize the generated report by providing `--template` option followed by your own EJS template:
46
47```bash
48yarn audit --json | yarn-audit-html --template ./my-awesome-template.ejs
49```
50
51If you'd like the generator to exit with non-zero exit code when vulnerabilities are found, you can add the `--fatal-exit-code` option:
52```bash
53yarn audit --json | yarn-audit-html --fatal-exit-code
54```
55
56Inspired by [npm-audit-html](https://github.com/Filiosoft/npm-audit-html) package.
57
58## License
59
60[MIT](LICENSE.md)