Skip to content

Commit

Permalink
fix: sarif change - severity to look the same for IaC and containers
Browse files Browse the repository at this point in the history
  • Loading branch information
RotemS committed Sep 29, 2020
1 parent e4647d6 commit 4abfb97
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cli/commands/test/iac-output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export function mapIacTestResponseToSarifTool(
tool.driver.rules?.push({
id: iacIssue.id,
shortDescription: {
text: `${upperFirst(iacIssue.severity)} - ${iacIssue.title}`,
text: `${upperFirst(iacIssue.severity)} severity - ${iacIssue.title}`,
},
fullDescription: {
text: `${iacTypeToText[iacIssue.type]} ${iacIssue.subType}`,
Expand Down
5 changes: 4 additions & 1 deletion src/cli/commands/test/sarif-output.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as sarif from 'sarif';
import { upperFirst } from 'lodash';

export function createSarifOutputForContainers(testResult): sarif.Log {
const sarifRes: sarif.Log = {
Expand Down Expand Up @@ -40,7 +41,9 @@ export function getTool(testResult): sarif.Tool {
return {
id: vuln.id,
shortDescription: {
text: `${vuln.severity} severity ${vuln.title} vulnerability in ${vuln.packageName}`,
text: `${upperFirst(vuln.severity)} severity - ${
vuln.title
} vulnerability in ${vuln.packageName}`,
},
fullDescription: {
text: cve
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"id": "SNYK-LINUX-BZIP2-106947",
"shortDescription": {
"text": "low severity Denial of Service (DoS) vulnerability in bzip2"
"text": "Low severity - Denial of Service (DoS) vulnerability in bzip2"
},
"fullDescription": {
"text": "(CVE-2016-3189) bzip2/libbz2-1.0@1.0.6-8.1"
Expand Down

0 comments on commit 4abfb97

Please sign in to comment.