UNPKG

2.26 kBMarkdownView Raw
1# yarn-audit-html
2
3![](https://img.shields.io/david/davityavryan/yarn-audit-html.svg?style=flat-square)
4![](https://img.shields.io/david/dev/davityavryan/yarn-audit-html.svg?style=flat-square)
5![](https://img.shields.io/david/peer/davityavryan/yarn-audit-html.svg?style=flat-square)
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)
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
12[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/davityavryan)
13
14## Generate a HTML report for Yarn Audit
15
16## Install
17
18```bash
19yarn global add yarn-audit-html
20```
21
22## Usage
23
24To generate a report, run the following:
25
26```bash
27yarn audit --json | yarn-audit-html
28```
29
30By default the report will be saved to `yarn-audit.html`
31
32If you want to specify the output file, add the `--output` option:
33
34```bash
35yarn audit --json | yarn-audit-html --output report.html
36```
37
38Unique 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:
39
40```bash
41yarn audit --json | yarn-audit-html --no-unique
42```
43
44You can also fully customize the generated report by providing `--template` option followed by your own EJS template:
45
46```bash
47yarn audit --json | yarn-audit-html --template ./my-awesome-template.ejs
48```
49
50If you'd like the generator to exit with non-zero exit code when vulnerabilities are found, you can add the `--fatal-exit-code` option:
51```bash
52yarn audit --json | yarn-audit-html --fatal-exit-code
53```
54
55Inspired by [npm-audit-html](https://github.com/Filiosoft/npm-audit-html) package.
56
57## License
58
59[MIT](LICENSE.md)