diff --git a/.snyk b/.snyk new file mode 100644 index 00000000..7527db21 --- /dev/null +++ b/.snyk @@ -0,0 +1,40 @@ +# 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:debug:20170905': + - hubot > express > connect > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > connect > body-parser > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > connect > compression > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > connect > connect-timeout > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > send > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > connect > express-session > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > connect > finalhandler > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > connect > morgan > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > connect > serve-index > debug: + patched: '2017-09-28T05:53:04.958Z' + - hubot > express > connect > serve-static > send > debug: + patched: '2017-09-28T05:53:04.958Z' + 'npm:hoek:20180212': + - hubot-slack > @slack/client > request > hawk > hoek: + patched: '2018-06-21T08:42:28.287Z' + - hubot-slack > @slack/client > request > hawk > boom > hoek: + patched: '2018-06-21T08:42:28.287Z' + - hubot-slack > @slack/client > request > hawk > sntp > hoek: + patched: '2018-06-21T08:42:28.287Z' + - hubot-slack > @slack/client > request > hawk > cryptiles > boom > hoek: + patched: '2018-06-21T08:42:28.287Z' + 'npm:lodash:20180130': + - hubot-slack > lodash: + patched: '2018-07-05T08:38:07.105Z' diff --git a/package.json b/package.json index cf6c1bbe..09347471 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "Justin Reese ", "description": "A slackbot for Code & Supply", "dependencies": { - "hubot": "^2.19.0", + "hubot": "^3.1.0", "hubot-diagnostics": "0.0.1", "hubot-google-images": "^0.2.6", "hubot-google-translate": "^0.2.0", @@ -19,11 +19,18 @@ "hubot-rules": "^0.1.1", "hubot-scripts": "^2.17.1", "hubot-shipit": "^0.2.0", - "hubot-slack": "^3.4.2", + "hubot-slack": "^4.0.0", "lodash": "^4.12.0", - "node-schedule": "^1.2.0" + "node-schedule": "^1.2.0", + "snyk": "^1.88.1" }, "engines": { "node": "0.10.x" - } + }, + "scripts": { + "snyk-protect": "snyk protect", + "prepublish": "npm run snyk-protect", + "prepare": "npm run snyk-protect" + }, + "snyk": true } diff --git a/scripts/riddler_when_build_night.js b/scripts/riddler_when_build_night.js index 31a3ac80..5cd55da0 100644 --- a/scripts/riddler_when_build_night.js +++ b/scripts/riddler_when_build_night.js @@ -1,5 +1,6 @@ _ = require('lodash/fp'); var eventsUrl = process.env.EVENTS_URL; +const buildNightChannels = ['chat','buildnight'] module.exports = function (robot) { var now; @@ -40,7 +41,10 @@ module.exports = function (robot) { var concatBuildNight = function (e) { return "Build Night is on " + formatDate(dateOf(e)) + ", " + locationOf(e); }; var nextBuildNight = _.flow(dateFilter, dateSorted, ensureFindBuildNight); - return robot.hear(/build night/i, function (msg) { // returns when/where of build night + return robot.hear(/(when|where)\b(.*?)\b(build night)/i, function (msg) { // returns when/where of build night + if(buildNightChannels.indexOf(msg.channel) === -1) { + return; + } if (!eventsUrl) { msg.send('Please set the EVENTS_URL environment variable.'); return;