diff --git a/.snyk b/.snyk new file mode 100644 index 0000000000..49c19c3db6 --- /dev/null +++ b/.snyk @@ -0,0 +1,25 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +ignore: {} +# patches apply the minimum changes required to fix a vulnerability +patch: + 'npm:debug:20170905': + - socket.io-client > debug: + patched: '2022-07-21T17:27:23.711Z' + - socket.io-client > engine.io-client > debug: + patched: '2022-07-21T17:27:23.711Z' + - socket.io-client > socket.io-parser > debug: + patched: '2022-07-21T17:27:23.711Z' + 'npm:engine.io-client:20160426': + - socket.io-client > engine.io-client: + patched: '2022-07-21T17:27:23.711Z' + 'npm:ms:20170412': + - socket.io-client > debug > ms: + patched: '2022-07-21T17:27:23.711Z' + - socket.io-client > engine.io-client > debug > ms: + patched: '2022-07-21T17:27:23.711Z' + - socket.io-client > socket.io-parser > debug > ms: + patched: '2022-07-21T17:27:23.711Z' + 'npm:ws:20160920': + - socket.io-client > engine.io-client > ws: + patched: '2022-07-21T17:27:23.711Z' diff --git a/package.json b/package.json index 7c89cbb783..233fbf2ea1 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,9 @@ "url": "git://github.com/socketio/socket.io" }, "scripts": { - "test": "gulp test" + "test": "gulp test", + "prepublish": "npm run snyk-protect", + "snyk-protect": "snyk-protect" }, "dependencies": { "engine.io": "1.6.8", @@ -26,7 +28,8 @@ "socket.io-client": "git://github.com/nus-fboa2016-si/socket.io-client#e0580ef4", "socket.io-adapter": "0.4.0", "has-binary": "0.1.7", - "debug": "2.2.0" + "debug": "2.2.0", + "@snyk/protect": "latest" }, "devDependencies": { "babel-preset-es2015": "6.3.13", @@ -60,5 +63,6 @@ "name": "Einar Otto Stangvik", "email": "einaros@gmail.com" } - ] + ], + "snyk": true } diff --git a/test/socket.io.js b/test/socket.io.js index 6d1c9fec55..00354afd30 100644 --- a/test/socket.io.js +++ b/test/socket.io.js @@ -655,7 +655,7 @@ describe('socket.io', function(){ }); }); }); - + it('should not reuse same-namespace connections', function(done){ var srv = http(); var sio = io(srv); @@ -746,6 +746,7 @@ describe('socket.io', function(){ } }); + it('should find all clients across namespace rooms', function(done){ var srv = http(); var sio = io(srv); @@ -1533,7 +1534,7 @@ describe('socket.io', function(){ }); }); }); - + it('should see query parameters sent from secondary namespace connections in handshake object', function(done){ var srv = http(); var sio = io(srv);