fix all vulnerabilities in the production code (#817)

Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
Denis Barbaron
2024-11-29 11:02:11 +01:00
committed by GitHub
parent 2f54e40206
commit 872b0bcbd8
26 changed files with 160 additions and 13627 deletions

View File

@@ -1,6 +1,10 @@
/**
* Copyright © 2024 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
**/
var util = require('util')
var WebClient = require('@slack/client').WebClient
var WebClient = require('@slack/web-api')
var Promise = require('bluebird')
var logger = require('../../util/logger')
@@ -41,7 +45,9 @@ module.exports = function(options) {
var format = entry.message.indexOf('\n') === -1 ? '`%s`' : '```%s```'
var message = util.format(format, entry.message)
client.chat.postMessage(options.channel, util.format(
client.chat.postMessage({
channel: options.channel
, text: util.format(
'>>> *%s/%s* %d [*%s*] %s'
, logger.LevelLabel[entry.priority]
, entry.tag
@@ -49,11 +55,9 @@ module.exports = function(options) {
, entry.identifier
, message
)
, {
username: 'STF'
, icon_url: 'https://openstf.io/favicon.png'
}
)
, username: 'STF'
, icon_url: 'https://openstf.io/favicon.png'
})
})
}