diff --git a/.snyk b/.snyk new file mode 100644 index 00000000..71bc68b5 --- /dev/null +++ b/.snyk @@ -0,0 +1,45 @@ +# 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:mime:20170907': + - hubot > express > send > mime: + patched: '2018-06-28T08:57:45.010Z' + - hubot > express > connect > serve-static > send > mime: + patched: '2018-06-28T08:57:45.010Z' + 'npm:tunnel-agent:20170305': + - hubot-slack > @slack/client > request > tunnel-agent: + patched: '2018-06-28T08:57:45.010Z' diff --git a/package.json b/package.json index cf6c1bbe..93534c8c 100644 --- a/package.json +++ b/package.json @@ -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.85.0" }, "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;