Skip to content

Commit

Permalink
added process.env.ZAP_RISK_CODE
Browse files Browse the repository at this point in the history
  • Loading branch information
chapi authored and chapi committed Jun 6, 2023
1 parent 5ba8fe1 commit c6ff896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/parse_zap_outputs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function parseZapOutput(jsonData) {
const { uri, method, param, attack, evidence, otherinfo } = instance;
instanceDescription += `URI: ${uri}\nMethod: ${method}\nParam: ${param}\nAttack: ${attack}\nEvidence: ${evidence}\nOtherInfo: ${otherinfo}\n\n`;
}
if (alert.riskcode === '2' ) {
if (alert.riskcode === process.env.ZAP_RISK_CODE ) {
vulnerabilities.push({
name: alert.name.concat(': ', data.site[0]['@host']).replace(/-/g, ''),
solution: alert.solution.replace(/<\/?p>/g, ''),
Expand All @@ -44,7 +44,7 @@ function parseZapOutput(jsonData) {
async function createJiraTicket(vulnerability) {

// Search if a ticket already exist
let jqlQuery = `project = "${process.env.JIRA_PROJECT_KEY}" AND summary ~ "MCR - SNYK ${vulnerability.name}" AND created >= startOfDay("-60d") AND status NOT IN ("Closed")`;
let jqlQuery = `project = "${process.env.JIRA_PROJECT_KEY}" AND summary ~ "MCR - SNYK ${vulnerability.name}" AND created >= startOfDay("-60d") AND status NOT IN ("Closed", "Canceled")`;

let searchResult = await jira.searchJira(jqlQuery);

Expand Down

0 comments on commit c6ff896

Please sign in to comment.