Skip to content

Commit

Permalink
Merge pull request #104 from Checkmarx/critical_Add
Browse files Browse the repository at this point in the history
feat(critical): add critical severity to KICS github action
  • Loading branch information
asofsilva authored Feb 23, 2024
2 parents de3e88e + 9ff796f commit 9d6dace
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 43 deletions.
140 changes: 102 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@
},
"homepage": "https://github.com/Checkmarx/kics-github-action#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.0",
"@actions/github": "^5.0.0",
"@actions/io": "^1.1.1",
"@actions/tool-cache": "^1.7.1",
"moment": "^2.29.4"
"@actions/tool-cache": "^2.0.1",
"moment": "^2.29.4",
"uuid": "^8.3.2"
},
"devDependencies": {
"@vercel/ncc": "^0.36.1",
"prettier": "^2.4.1"
"prettier": "^2.4.1",
"@types/uuid": "^8.3.4"
}
}
6 changes: 5 additions & 1 deletion src/commenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ const moment = require('moment')
const { summary } = require('@actions/core/lib/summary');

const kicsLogo = "https://user-images.githubusercontent.com/111127232/203838108-ad537fea-4573-495a-9619-18500ee81dd9.png"
const severityOrder = ["HIGH", "MEDIUM", "LOW", "INFO", "TRACE"];
const severityOrder = ["CRITICAL","HIGH", "MEDIUM", "LOW", "INFO", "TRACE"];
const severityIcons = {
"CRITICAL": "https://github.com/Checkmarx/kics-github-action/assets/153724638/e73da659-8985-43a5-bb3c-ddbecd786690",
"HIGH": "https://user-images.githubusercontent.com/23239410/92157087-97285600-ee32-11ea-988f-0aca12c4c126.png",
"MEDIUM": "https://user-images.githubusercontent.com/23239410/92157093-98598300-ee32-11ea-83d7-af52251a011b.png",
"LOW": "https://user-images.githubusercontent.com/23239410/92157091-98598300-ee32-11ea-8498-19bd7d62019b.png",
Expand All @@ -27,6 +28,9 @@ function createComment(results, withQueries = false, excludedColumnsForCommentsW
if (severity in severityCounters) {
message += `| ![${severity}](${severityIcons[severity]}) | ${severity.toUpperCase()} | ${severityCounters[severity.toUpperCase()]} |\n`;
}
else {
message += `| ![${severity}](${severityIcons[severity]}) | ${severity.toUpperCase()} | 0 |\n`;
}
}
message += `| ![TOTAL](${emptyIcon}) | TOTAL | ${results['total_counter']} |`;

Expand Down

0 comments on commit 9d6dace

Please sign in to comment.