From a55ce624559ce43c13c3945aa51f843087f37fc4 Mon Sep 17 00:00:00 2001 From: Daniel Schildt Date: Fri, 4 Aug 2017 17:00:37 +0300 Subject: [PATCH] fix: package.json & .snyk to reduce vulnerabilities (#6) The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/npm:qs:20170213 The following vulnerabilities are fixed with a Snyk patch: - https://snyk.io/vuln/npm:request:20160119 Latest report for d2s/koodiklinikka.fi-api: https://snyk.io/test/github/d2s/koodiklinikka.fi-api --- .snyk | 8 ++++++++ package.json | 12 ++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .snyk diff --git a/.snyk b/.snyk new file mode 100644 index 0000000..cd23388 --- /dev/null +++ b/.snyk @@ -0,0 +1,8 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.7.1 +ignore: {} +# patches apply the minimum changes required to fix a vulnerability +patch: + 'npm:request:20160119': + - node-twitter > request: + patched: '2017-08-04T11:59:07.441Z' diff --git a/package.json b/package.json index 48cf6cf..fc75527 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "node index.js" + "start": "node index.js", + "snyk-protect": "snyk protect", + "prepublish": "npm run snyk-protect" }, "repository": { "type": "git", @@ -32,7 +34,9 @@ "newrelic": "^1.18.0", "node-twitter": "0.5.2", "stripe": "^4.23.1", - "superagent": "^0.21.0", - "validator": "^3.27.0" - } + "superagent": "^2.0.0", + "validator": "^3.27.0", + "snyk": "^1.38.1" + }, + "snyk": true }