New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

improved-yarn-audit

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

improved-yarn-audit

A wrapper around yarn audit that fixes many issues

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

improved-yarn-audit

This project aims to improve upon the existing Yarn package manager audit functionality.

GitHub Repo: https://github.com/djfdyuruiry/improved-yarn-audit

NPM


Currently yarn audit has several issues making it difficult to use in a CI pipeline:

  • No way to ignore advisories
  • Unable to filter out low severity issues
  • Ongoing network issues with NPM registry cause false positives

improved-yarn-audit provides a wrapper around the yarn audit command which addresses all of the above problems.

Installing

Run:

yarn add improved-yarn-audit

Running an Audit Check

To execute an audit check, run:

yarn run improved-yarn-audit

Setting the Severity Level

You can define a minimum severity level to report, any advisories below this level are ignored.

yarn run improved-yarn-audit --min-severity moderate

Run with --help to see all levels available

Excluding Advisories

Often dev dependencies can become outdated and the package maintainer no longer provides updates. This leads to audit advisories that will never affect your production code.

To remedy this, you can pass a csv list of advisory IDs to ignore.

yarn run improved-yarn-audit --exclude 253,456,811

Ignore All Dev Advisories

If you want to ignore any advisories from dev dependencies, you can use the --ignore-dev-deps flag to do this.

yarn run improved-yarn-audit --ignore-dev-deps

Retrying Network Issues

As of May 2019 there are outstanding network issues with the NPM registry audit API, which cause frequent request failues. To work around this until a fix is implemented you can pass a flag to retry any failed requests.

yarn run improved-yarn-audit --retry-on-network-failure

NPM Users

If you are an NPM fan looking for a similar solution, checkout the better-npm-audit package.

FAQs

Package last updated on 29 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc