Skip to content

Commit

Permalink
Merge pull request #1428 from snyk/fix/sarif-output-changes
Browse files Browse the repository at this point in the history
fix: sarif descirption change
  • Loading branch information
RotemS authored Sep 30, 2020
2 parents 70f8a2c + 4abfb97 commit 00b0fa7
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/[email protected]"
Expand Down

0 comments on commit 00b0fa7

Please sign in to comment.