Skip to content

Fix wording when Fix not available #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ function check_level(sev_value) {
function vulnerabilities2SARIFResByPackage(data) {
let results = [];
let rules = [];
let ruleIds = [];
let resultUrl = "";
let baseUrl = null;

Expand Down Expand Up @@ -630,7 +629,7 @@ function getSARIFVulnFullDescription(pkg, vuln) {
Severity: ${vuln.severity.value}
Package: ${pkg.name}
Type: ${pkg.type}
Fix: ${pkg.suggestedFix || "Unknown"}
Fix: ${pkg.suggestedFix || "No fix available"}
URL: https://nvd.nist.gov/vuln/detail/${vuln.name}`;
}

Expand All @@ -643,7 +642,7 @@ function getSARIFPkgHelp(pkg) {
CVSS Version: ${vuln.cvssScore.value.version}
CVSS Vector: ${vuln.cvssScore.value.vector}
Version: ${pkg.version}
Fix Version: ${pkg.suggestedFix || "Unknown"}
Fix Version: ${pkg.suggestedFix || "No fix available"}
Exploitable: ${vuln.exploitable}
Type: ${pkg.type}
Location: ${pkg.path}
Expand All @@ -670,7 +669,7 @@ CVSS Score: ${vuln.cvssScore.value.score}
CVSS Version: ${vuln.cvssScore.value.version}
CVSS Vector: ${vuln.cvssScore.value.vector}
Version: ${pkg.version}
Fix Version: ${pkg.suggestedFix || "Unknown"}
Fix Version: ${pkg.suggestedFix || "No fix available"}
Exploitable: ${vuln.exploitable}
Type: ${pkg.type}
Location: ${pkg.path}
Expand Down Expand Up @@ -709,7 +708,7 @@ function getSARIFReportMessageByPackage(data, pkg, baseUrl) {
CVSS Score: ${vuln.cvssScore.value.score}
CVSS Version: ${vuln.cvssScore.value.version}
CVSS Vector: ${vuln.cvssScore.value.vector}
Fixed Version: ${(vuln.fixedInVersion || 'Unknown')}
Fixed Version: ${(vuln.fixedInVersion || 'No fix available')}
Exploitable: ${vuln.exploitable}
Link to NVD: [${vuln.name}](https://nvd.nist.gov/vuln/detail/${vuln.name})\n`;
});
Expand Down Expand Up @@ -740,7 +739,7 @@ function getSARIFReportMessage(data, vuln, pkg, baseUrl) {
CVSS Score: ${vuln.cvssScore.value.score}
CVSS Version: ${vuln.cvssScore.value.version}
CVSS Vector: ${vuln.cvssScore.value.vector}
Fixed Version: ${(vuln.fixedInVersion || 'Unknown')}
Fixed Version: ${(vuln.fixedInVersion || 'No fix available')}
Exploitable: ${vuln.exploitable}
Link to NVD: [${vuln.name}](https://nvd.nist.gov/vuln/detail/${vuln.name})`;

Expand Down Expand Up @@ -793,7 +792,7 @@ function getRulePkgMessage(rule, packages) {
`${vuln.cvssScore.value.score}`,
`${vuln.cvssScore.value.version}`,
`${vuln.cvssScore.value.vector}`,
`${pkg.suggestedFix || "Unknown"}`,
`${pkg.suggestedFix || "No fix available"}`,
`${vuln.exploitable}`
]);
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "secure-inline-scan-action",
"version": "4.1.0",
"version": "5.1.0",
"description": "This actions performs image analysis on locally built container image and posts the result of the analysis to Sysdig Secure.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function cleanupTemporaryDir(tmpDir) {
}

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

describe("input parsing", () => {
let oldEnv;
Expand Down
Loading