@contrast/contrast 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ export const HIGH = 'HIGH';
17
17
  export const CRITICAL = 'CRITICAL';
18
18
  // App
19
19
  export const APP_NAME = 'contrast';
20
- const APP_VERSION = '2.3.1';
20
+ const APP_VERSION = '2.3.2';
21
21
  export const TIMEOUT = 120000;
22
22
  export const CRITICAL_PRIORITY = 1;
23
23
  export const HIGH_PRIORITY = 2;
@@ -25,14 +25,19 @@ export const printFormattedOutputSca = (config, reportModelList, numberOfVulnera
25
25
  const report = new ReportList();
26
26
  for (const library of reportModelList) {
27
27
  const { artifactName, version, vulnerabilities, remediationAdvice } = library;
28
- const highestSeverity = findHighestSeverityCVESca(vulnerabilities, config);
29
- const severityCount = severityCountAllCVEsSca(vulnerabilities, new SeverityCountModel()).getTotal;
30
- if (highestSeverity.priority === undefined) {
31
- highestSeverity.priority = NOTE_PRIORITY;
32
- logDebug(config, `Unknown severity for vulnerability ${artifactName}`);
28
+ if (vulnerabilities.length === 0) {
29
+ logDebug(config, `Unable to find vulnerability for ${artifactName} version ${version}`);
30
+ }
31
+ else {
32
+ const highestSeverity = findHighestSeverityCVESca(vulnerabilities, config);
33
+ const severityCount = severityCountAllCVEsSca(vulnerabilities, new SeverityCountModel()).getTotal;
34
+ if (highestSeverity.priority === undefined) {
35
+ highestSeverity.priority = NOTE_PRIORITY;
36
+ logDebug(config, `Unknown severity for vulnerability ${artifactName}`);
37
+ }
38
+ const newOutputModel = new ReportModelStructure(new ReportCompositeKey(artifactName, version, highestSeverity, severityCount), vulnerabilities, remediationAdvice);
39
+ report.reportOutputList.push(newOutputModel);
33
40
  }
34
- const newOutputModel = new ReportModelStructure(new ReportCompositeKey(artifactName, version, highestSeverity, severityCount), vulnerabilities, remediationAdvice);
35
- report.reportOutputList.push(newOutputModel);
36
41
  }
37
42
  const outputOrderedByLowestSeverityAndLowestNumOfCvesFirst = orderBy(report.reportOutputList, [
38
43
  reportListItem => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/contrast",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Contrast Security's command line tool",
5
5
  "exports": "./dist/index.js",
6
6
  "type": "module",