Skip to content

Commit 77ec0c1

Browse files
JujuyehPaul Hodgetts
and
Paul Hodgetts
authored
Fix wording when Fix not available (#49)
* Update wording when fix unavailable (#47) * Bump package version (#48) * Update wording when fix unavailable * Bump package version to match vbranch --------- Co-authored-by: Paul Hodgetts <paul.hodgetts@paul.hodgetts> --------- Co-authored-by: Paul Hodgetts <paul.hodgetts@paul.hodgetts>
1 parent 9162a58 commit 77ec0c1

File tree

6 files changed

+18
-20
lines changed

6 files changed

+18
-20
lines changed

dist/index.js

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ function check_level(sev_value) {
463463
function vulnerabilities2SARIFResByPackage(data) {
464464
let results = [];
465465
let rules = [];
466-
let ruleIds = [];
467466
let resultUrl = "";
468467
let baseUrl = null;
469468

@@ -630,7 +629,7 @@ function getSARIFVulnFullDescription(pkg, vuln) {
630629
Severity: ${vuln.severity.value}
631630
Package: ${pkg.name}
632631
Type: ${pkg.type}
633-
Fix: ${pkg.suggestedFix || "Unknown"}
632+
Fix: ${pkg.suggestedFix || "No fix available"}
634633
URL: https://nvd.nist.gov/vuln/detail/${vuln.name}`;
635634
}
636635

@@ -643,7 +642,7 @@ function getSARIFPkgHelp(pkg) {
643642
CVSS Version: ${vuln.cvssScore.value.version}
644643
CVSS Vector: ${vuln.cvssScore.value.vector}
645644
Version: ${pkg.version}
646-
Fix Version: ${pkg.suggestedFix || "Unknown"}
645+
Fix Version: ${pkg.suggestedFix || "No fix available"}
647646
Exploitable: ${vuln.exploitable}
648647
Type: ${pkg.type}
649648
Location: ${pkg.path}
@@ -670,7 +669,7 @@ CVSS Score: ${vuln.cvssScore.value.score}
670669
CVSS Version: ${vuln.cvssScore.value.version}
671670
CVSS Vector: ${vuln.cvssScore.value.vector}
672671
Version: ${pkg.version}
673-
Fix Version: ${pkg.suggestedFix || "Unknown"}
672+
Fix Version: ${pkg.suggestedFix || "No fix available"}
674673
Exploitable: ${vuln.exploitable}
675674
Type: ${pkg.type}
676675
Location: ${pkg.path}
@@ -709,7 +708,7 @@ function getSARIFReportMessageByPackage(data, pkg, baseUrl) {
709708
CVSS Score: ${vuln.cvssScore.value.score}
710709
CVSS Version: ${vuln.cvssScore.value.version}
711710
CVSS Vector: ${vuln.cvssScore.value.vector}
712-
Fixed Version: ${(vuln.fixedInVersion || 'Unknown')}
711+
Fixed Version: ${(vuln.fixedInVersion || 'No fix available')}
713712
Exploitable: ${vuln.exploitable}
714713
Link to NVD: [${vuln.name}](https://nvd.nist.gov/vuln/detail/${vuln.name})\n`;
715714
});
@@ -740,7 +739,7 @@ function getSARIFReportMessage(data, vuln, pkg, baseUrl) {
740739
CVSS Score: ${vuln.cvssScore.value.score}
741740
CVSS Version: ${vuln.cvssScore.value.version}
742741
CVSS Vector: ${vuln.cvssScore.value.vector}
743-
Fixed Version: ${(vuln.fixedInVersion || 'Unknown')}
742+
Fixed Version: ${(vuln.fixedInVersion || 'No fix available')}
744743
Exploitable: ${vuln.exploitable}
745744
Link to NVD: [${vuln.name}](https://nvd.nist.gov/vuln/detail/${vuln.name})`;
746745

@@ -793,7 +792,7 @@ function getRulePkgMessage(rule, packages) {
793792
`${vuln.cvssScore.value.score}`,
794793
`${vuln.cvssScore.value.version}`,
795794
`${vuln.cvssScore.value.vector}`,
796-
`${pkg.suggestedFix || "Unknown"}`,
795+
`${pkg.suggestedFix || "No fix available"}`,
797796
`${vuln.exploitable}`
798797
]);
799798
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "secure-inline-scan-action",
3-
"version": "4.1.0",
3+
"version": "5.1.0",
44
"description": "This actions performs image analysis on locally built container image and posts the result of the analysis to Sysdig Secure.",
55
"main": "index.js",
66
"scripts": {

tests/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function cleanupTemporaryDir(tmpDir) {
1717
}
1818

1919
const exampleReport = JSON.stringify(require("./fixtures/report-test.json"));
20-
const exampleSarif = JSON.stringify(require("./fixtures/sarif-test.json"),null,2);
20+
//const exampleSarif = JSON.stringify(require("./fixtures/sarif-test.json"),null,2);
2121

2222
describe("input parsing", () => {
2323
let oldEnv;

0 commit comments

Comments
 (0)