# yarn-audit-html

> Generate a HTML report for Yarn Audit

Latest version **7.3.2** (published 2023-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install yarn-audit-html
pnpm add yarn-audit-html
yarn add yarn-audit-html
bun add yarn-audit-html
```

Provides the command `yarn-audit-html`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.3.2 |
| Published | 2023-10-23 |
| First published | 2018-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=16 |
| Dependencies | 3 |
| Unpacked size | 7.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Maintainers | davit.yavryan |
| Keywords | yarn, audit, report |

## Links

- npm: https://www.npmjs.com/package/yarn-audit-html
- Repository: https://github.com/davityavryan/yarn-audit-html
- Issues: https://github.com/davityavryan/yarn-audit-html/issues
- Funding: https://paypal.me/davityavryan?country.x=DE&locale.x=en_US
- npm.io page: https://npm.io/package/yarn-audit-html

## Dependencies (3)

- [ejs](https://npm.io/package/ejs.md) ^3.1.9
- [marked](https://npm.io/package/marked.md) ^5.1.2
- [commander](https://npm.io/package/commander.md) ^11.0.0

## Recent versions

- 7.3.2 (latest) — 2023-10-23
- 7.2.1-rc.0 (next) — 2023-05-20
- 7.3.1 — 2023-07-30
- 7.3.0 — 2023-07-30
- 7.2.0 — 2023-05-17
- 7.1.1 — 2023-05-03
- 7.1.0 — 2023-05-03
- 7.0.2 — 2023-05-02
- 7.0.1 — 2023-05-02
- 7.0.0 — 2023-05-01
- 6.2.0 — 2023-04-26
- 6.1.0 — 2023-04-26
- 6.0.0 — 2023-04-26
- 5.0.0 — 2023-04-26
- 4.0.1 — 2023-04-22
- … 32 more at https://npm.io/package/yarn-audit-html/versions

## README

# yarn-audit-html

[![](https://img.shields.io/npm/v/yarn-audit-html?logo=npm)](https://www.npmjs.com/package/yarn-audit-html)
[![](https://img.shields.io/npm/dw/yarn-audit-html?logo=npm)](https://www.npmjs.com/package/yarn-audit-html)
[![](https://snyk.io/test/github/davityavryan/yarn-audit-html/badge.svg)](https://snyk.io/test/github/davityavryan/yarn-audit-html)
![](https://img.shields.io/github/last-commit/davityavryan/yarn-audit-html.svg?style=flat-square&logo=github)
[![](https://img.shields.io/node/v/yarn-audit-html?logo=node.js)](https://github.com/nodejs/release#release-schedule)
[![](https://flat.badgen.net/packagephobia/install/yarn-audit-html?logo=packagephobia)](https://packagephobia.now.sh/result?p=yarn-audit-html)
[![](https://codecov.io/gh/davityavryan/yarn-audit-html/branch/master/graph/badge.svg?token=8HXXAIN7OY)](https://codecov.io/gh/davityavryan/yarn-audit-html)

[![PayPal.me](https://img.shields.io/badge/PayPal-donate-blue?style=for-the-badge&logo=paypal)](https://www.buymeacoffee.com/davityavryan)
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-donate-yellow?style=for-the-badge&logo=buymeacoffee)](https://www.buymeacoffee.com/davityavryan)

## Generate a HTML report for Yarn Audit

## Install

```bash
yarn add -D yarn-audit-html
# or globally
yarn global add yarn-audit-html
```

## Usage

To generate a report, run the following:

### Yarn V1

```bash
yarn audit --json | yarn yarn-audit-html
```

### Yarn V2+

```bash
yarn npm audit --json | yarn yarn-audit-html
```

By default, unique vulnerability list will be generated (Grouped by `MODULE_NAME`, `VERSION`, `VULNERABLE_VERSIONS`,
`ADVISORY_CREATED_DATE` and `CWE`) to `yarn-audit.html`. This way, even if same version of package has multiple
vulnerabilities, they will be counted.

If you want to specify the output file, add the `--output` option:

```bash
yarn audit --json | yarn yarn-audit-html --output report.html
```

You can also fully customize the generated report by providing `--template` option followed by your own EJS template:

```bash
yarn audit --json | yarn yarn-audit-html --template ./my-awesome-template.ejs
```

There is also a possibility to change default theme(materia) to any of available in
[Bootswatch](https://bootswatch.com/#:~:text=Cerulean) with `--theme` option followed by theme name: p.s. In future
major release default template will change to dark theme.

```bash
yarn audit --json | yarn yarn-audit-html --theme darkly
```

If you'd like the generator to exit with non-zero exit code when vulnerabilities are found, you can add the
`--fatal-exit-code` option:

```bash
yarn audit --json | yarn yarn-audit-html --fatal-exit-code
```

Inspired by [npm-audit-html](https://github.com/Filiosoft/npm-audit-html) package.

See changelog [here](https://github.com/davityavryan/yarn-audit-html/releases).

---
_Source: https://npm.io/package/yarn-audit-html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
