mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 09:28:06 +00:00
patch notify user on risk found
This commit is contained in:
@@ -128,10 +128,11 @@ export default async (app: Probot) => {
|
|||||||
|
|
||||||
const adminOrOwnerEmails = userEmails.map(userObject => userObject.email)
|
const adminOrOwnerEmails = userEmails.map(userObject => userObject.email)
|
||||||
|
|
||||||
|
const usersToNotify = pusher?.email ? [pusher.email, ...adminOrOwnerEmails] : [...adminOrOwnerEmails]
|
||||||
await sendMail({
|
await sendMail({
|
||||||
template: "secretLeakIncident.handlebars",
|
template: "secretLeakIncident.handlebars",
|
||||||
subjectLine: `Incident alert: leaked secrets found in Github repository ${repository.full_name}`,
|
subjectLine: `Incident alert: leaked secrets found in Github repository ${repository.full_name}`,
|
||||||
recipients: ["pusher.email", ...adminOrOwnerEmails],
|
recipients: usersToNotify,
|
||||||
substitutions: {
|
substitutions: {
|
||||||
numberOfSecrets: Object.keys(allFindingsByFingerprint).length,
|
numberOfSecrets: Object.keys(allFindingsByFingerprint).length,
|
||||||
pusher_email: pusher.email,
|
pusher_email: pusher.email,
|
||||||
|
|||||||
Reference in New Issue
Block a user