snyk-remediation
v1.4.1
Published
Generates the remediation options for a vulnerability report
Downloads
3
Readme
node-remediation
Given a snyk test JSON source, create all the possible remediation paths, and optionally return the best remediation (where all vulns is fixed).
Note that this project is developed using Node @ 6
The deployed version (in npm) is compatible with [email protected] upwards.
Usage
const remediation = require('snyk-remediation');
const fixes = remediation(vulns);
// list of upgrades
console.log(fixes.upgrade);
// list of patches
console.log(fixes.patch);
// list of vulns that have no possible remediation
console.log(fixes.unresolved);
This can also be used on the command line to experiment with:
$ snyk test snyk/goof --json | node cli
{
"unresolved": [],
"upgrade": {
"[email protected]": {
"upgradeTo": "[email protected]",
"upgrades": [
"[email protected]"
],
"vulns": [
"npm:negotiator:20160616"
]
},
…
Important the default usage (both on the CLI and in the module) is to return the best remediation.
How to test
There are no external dependencies, only to install the development dependencies and run npm test
.