The npm audit assistant - the "rgh" is for dramatic effect, capturing that all-too-familiar reaction to running npm audit: "aargh!" 😩
The npmaargh CLI is intended to help you resolve npm audit reports by
showing you where in the dependency hierarchy upgrades are blocked. This is
especially helpful when npm audit fix doesn't just solve the problem for you.
The report can be used to report blockers upstream or write more targeted override rules.
You can either install and run:
npm install --global npmaargh
npmaargh [flags...] [target]Or use npx:
npx npmaargh [flags...] [target]For example:
$ npx npmaargh --compact my-project
=== npm audit assistant ===
I'm here to help audit 'project'.
=== setup ===
Initialized.
Obtained audit report.
Analyzed audit report.
=== https://github.com/advisories/GHSA-abcd-1234-e5f6 ===
<project>@0.4.2 # Blocker [foo@1.2.3->1.2.4]
foo@1.2.3 # Need 1.2.4 (for bar@3.1.4)
bar@3.0.0 # Need 3.1.4
world@1.0.0 # Upgradable (need 1.1.1)
hello@3.2.1 # Blocker [world@0.1.0->1.1.1 (https://github.com/he/llo/issues)]
world@0.1.0 # Need 1.1.1
Let's unpack that report:
<project>@0.4.2is the project we're analyzing.# Blocker [foo@1.2.3->1.2.4]indicates a change is required, namely that the packagefoomust be upgraded from1.2.3to1.2.4.foo@1.2.3is a direct dependency of the project that we're using at v1.2.3.# Need 1.2.4 (for bar@3.1.4)indicates we needfoo@1.2.4so that we can pull inbar@3.1.4transitively.bar@3.0.0is a transitive dependency of the project that is currently at v3.0.0.# Need 3.1.4indicates we need to bump it, because of a known vulnerability.world@1.0.0is another transitive dependency offoo@1.2.3.# Upgradable (need 1.1.1)indicatesworldcan be upgraded to v1.1.1 now. It might currently not be installed because of a lockfile or deduplication.hello@3.2.1is another direct dependency of the project.# Blocker [world@0.1.0->1.1.1 (...)]indicates a change is required inhelloto upgradeworldto a non-vulnerable version. A link for the bug tracker ofhellois included to make it easy to report the blocker.world@0.1.0is a transitive dependency ofhello@3.2.1.# Need 1.1.1indicates we need to bump it, because of a known vulnerability.
This software is available under the AGPL-3.0-or-later license, see LICENSE
for the full license text.