# snyk-remediation

> Generates the remediation options for a vulnerability report

Latest version **1.4.1** (published 2017-11-17) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install snyk-remediation
pnpm add snyk-remediation
yarn add snyk-remediation
bun add snyk-remediation
```

Provides the command `snyk-remediation`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2017-11-17 |
| First published | 2016-06-01 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Remy Sharp |
| Maintainers | remy |
| Keywords | snyk |

## Links

- npm: https://www.npmjs.com/package/snyk-remediation
- Repository: https://github.com/snyk/node-remediation
- Homepage: https://github.com/snyk/node-remediation#readme
- Issues: https://github.com/snyk/node-remediation/issues
- npm.io page: https://npm.io/package/snyk-remediation

## Dependencies (7)

- [debug](https://npm.io/package/debug.md) ^2.2.0
- [semver](https://npm.io/package/semver.md) ^5.1.0
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [es6-promise](https://npm.io/package/es6-promise.md) ^3.2.1
- [snyk-module](https://npm.io/package/snyk-module.md) ^1.7.0
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.9.2
- [lodash.clonedeep](https://npm.io/package/lodash.clonedeep.md) ^4.3.2

## Recent versions

- 1.4.1 (latest) — 2017-11-17
- 1.4.0 — 2017-11-17
- 1.3.1 — 2017-07-03
- 1.3.0 — 2016-07-31
- 1.2.0 — 2016-07-27
- 1.1.1 — 2016-06-23
- 1.1.0 — 2016-06-23
- 1.0.1 — 2016-06-03
- 1.0.0 — 2016-06-01

## 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](https://npmjs.com/snyk-remediation/)) is compatible with node@0.10 upwards.

## Usage


```js
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:

```bash
$ snyk test snyk/goof --json | node cli
{
  "unresolved": [],
  "upgrade": {
    "errorhandler@1.2.0": {
      "upgradeTo": "errorhandler@1.4.3",
      "upgrades": [
        "negotiator@0.4.9"
      ],
      "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`.

## License

* [License: Apache License, Version 2.0](LICENSE)

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