Gathering detailed insights and metrics for npm-audit-resolver
Gathering detailed insights and metrics for npm-audit-resolver
Gathering detailed insights and metrics for npm-audit-resolver
Gathering detailed insights and metrics for npm-audit-resolver
npm install npm-audit-resolver
90.4
Supply Chain
97.3
Quality
74.7
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
121 Stars
175 Commits
28 Forks
6 Watching
10 Branches
8 Contributors
Updated on 07 Oct 2024
JavaScript (92.15%)
Shell (7.85%)
Cumulative downloads
Total Downloads
Last day
-1.9%
7,802
Compared to previous day
Last week
0.6%
44,695
Compared to previous week
Last month
6.7%
188,727
Compared to previous month
Last year
26.9%
2,050,248
Compared to previous year
10
1
A tool for building a responsible but practical supply chain security practice.
npm audit
is great. npm audit fix
is also there if you didn't know. But not everything can be fixed right away and you need to manage your security and make decisions about the dependencies you use.
I built audit-resolver after a few weeks of trying to run audit as a step in CI and failing each time there's a vulnerability. There were just too many irrelevant or unfixed ones and my team needed a way to manage the situation.
Audit resolver creates a audit-resolve.json
file in your app and interactively helps you manage security of your dependencies.
You can decide what to ignore and for how long, or track what's been fixed before.
The audit-resolve.json
file sits in the repository and you can see who decided to ignore what and when.
I'm participating in Package Vulnerability Management & Reporting Collaboration Space where I intend to donate parts of the audit-resolver's core.
Due to changes introduced by npm7+ the option to fix an individual package is no longer available from npm and wasn't always working correctly anyway. By virtue of "doing one thing and one thing well" this package will no longer provide that option.
You can run npm audit fix
before resolving unfixable issues. resolve-audit
will offer you that option first before asking any questions about specific issues.
Requires npm v7.24.2+ or yarn installed alongside
Works with node 14+ (could run on 12 and npm6 but no guarantees going forward)
You can use audit resolver v2.x with npm6.
Yarn support was not heavily tested across versions, but works well with current yarn 1 and 3 at the time of writing
npm install -g npm-audit-resolver
Go into the project folder and run
resolve-audit
It goes through the results of npm audit
and lets you decide what to do with the issues.
The decisions you make are stored in audit-resolve.json
to keep track of it in version control and have a log of who decided to do what and when.
--yarn switches to yarn instead of npm.
--yarn-berry switches to yarn2 or yarn3 instead of npm.
--migrate forces migration to the new audit-resolve.json file and format even if no modifications are made to decisions
--mock used in tests
All other arguments are passed down to the npm/yarn audit call
One of the problems npm-audit-resolver solves is running audit as part of your build pipeline. You don't want to break your CI for a few days waiting to get a fix on a dependency, but at the same time ignoring the whole class of issues or the audit result entirely means you'll rarely notice it at all.
Run
check-audit
This command will only exit with an error if a human needs to make new decisions about vulnerabilities and commit the audit-resolve.json
file. If all issues are addressed, your build can pass.
For JSON output (similar to npm audit --json
), run
check-audit --json
All other arguments are passed down to the npm/yarn audit call
If npm audit fix
can help, you'll be prompted to run it first.
For all vulnerabilities found, you get to choose between the following options:
audit-resolve.json is formatted, so git history has a trace of who addressed which vulnerability, when and how.
Because otherwise running npm audit
as part of your CI is not practical.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 2/5 approved changesets -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More