From 92f64498e6e32958a84e1a3c07a844508729172a Mon Sep 17 00:00:00 2001
From: snyk-bot <snyk-bot@snyk.io>
Date: Fri, 22 Jun 2018 02:27:14 +0000
Subject: [PATCH] fix: .snyk & package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/npm:hoek:20180212


The following vulnerabilities are fixed with a Snyk patch:
- https://snyk.io/vuln/npm:hoek:20180212
---
 .snyk        | 10 ++++++++++
 package.json | 12 ++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)
 create mode 100644 .snyk

diff --git a/.snyk b/.snyk
new file mode 100644
index 0000000..4e8bf18
--- /dev/null
+++ b/.snyk
@@ -0,0 +1,10 @@
+# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
+version: v1.12.0
+ignore: {}
+# patches apply the minimum changes required to fix a vulnerability
+patch:
+  'npm:hoek:20180212':
+    - passport-jwt > jsonwebtoken > joi > hoek:
+        patched: '2018-06-22T02:27:10.365Z'
+    - passport-jwt > jsonwebtoken > joi > topo > hoek:
+        patched: '2018-06-22T02:27:10.365Z'
diff --git a/package.json b/package.json
index c3bdc5a..b98ac00 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,9 @@
     "start": "./node_modules/.bin/ts-node ./server/server.ts",
     "watch": "NODE_ENV=development ./node_modules/.bin/nodemon -w . --ext .ts --exec npm run start",
     "test:coverage": "nyc npm run test",
-    "run-builded": "NODE_ENV=development nodemon ./build/server.js"
+    "run-builded": "NODE_ENV=development nodemon ./build/server.js",
+    "snyk-protect": "snyk protect",
+    "prepare": "npm run snyk-protect"
   },
   "repository": {
     "type": "git",
@@ -82,7 +84,7 @@
     "http": "0.0.0",
     "http-status": "^1.0.1",
     "human-readable-ids": "^1.0.1",
-    "jsonwebtoken": "^7.2.1",
+    "jsonwebtoken": "^8.0.0",
     "jwt-simple": "^0.5.1",
     "lodash": "^4.17.2",
     "morgan": "^1.7.0",
@@ -90,6 +92,8 @@
     "passport-jwt": "^2.2.1",
     "pg": "^6.1.2",
     "sequelize": "^3.27.0",
-    "ts-node": "^1.7.3"
-  }
+    "ts-node": "^1.7.3",
+    "snyk": "^1.83.0"
+  },
+  "snyk": true
 }