@enterprise-cmcs/macpro-security-hub-sync
Advanced tools
Comparing version 1.14.1 to 1.14.2
@@ -95,20 +95,24 @@ "use strict"; | ||
}; | ||
let params = { | ||
username: undefined, | ||
accountId: undefined, | ||
}; | ||
if (process.env.JIRA_HOST?.includes("jiraent")) { | ||
axiosHeader["Authorization"] = `Bearer ${process.env.JIRA_TOKEN}`; | ||
params["username"] = currentUser.name; | ||
await (0, axios_1.default)({ | ||
method: "DELETE", | ||
url: `https://${process.env.JIRA_HOST}/rest/api/2/issue/${issueKey}/watchers`, | ||
headers: axiosHeader, | ||
params: { | ||
username: currentUser.name, | ||
}, | ||
}); | ||
} | ||
else { | ||
axiosHeader["Authorization"] = `Basic ${Buffer.from(`${process.env.JIRA_USERNAME}:${process.env.JIRA_TOKEN}`).toString("base64")}`; | ||
params["accountId"] = currentUser.accountId; | ||
await (0, axios_1.default)({ | ||
method: "DELETE", | ||
url: `https://${process.env.JIRA_HOST}/rest/api/3/issue/${issueKey}/watchers`, | ||
headers: axiosHeader, | ||
params: { | ||
accountId: currentUser.accountId, | ||
}, | ||
}); | ||
} | ||
await (0, axios_1.default)({ | ||
method: "DELETE", | ||
url: `https://${process.env.JIRA_HOST}/rest/api/3/issue/${issueKey}/watchers`, | ||
headers: axiosHeader, | ||
params, | ||
}); | ||
} | ||
@@ -115,0 +119,0 @@ catch (err) { |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "1.14.1", | ||
"version": "1.14.2", | ||
"description": "NPM module to create Jira issues for all findings in Security Hub for the current AWS account..", | ||
@@ -10,0 +10,0 @@ "main": "./dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52933
955
35