@contrast/contrast 1.0.23 → 1.0.24

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.
@@ -135,7 +135,10 @@ function getIssueRow(cveArray) {
135
135
  }
136
136
  function gatherRemediationAdvice(guidance, libraryName, libraryVersion) {
137
137
  const guidanceModel = new ReportGuidanceModel();
138
- const data = guidance[libraryName + '@' + libraryVersion];
138
+ const keyToFind = Object.keys(guidance).filter(key => {
139
+ return key.includes(libraryName + '@' + libraryVersion);
140
+ });
141
+ const data = guidance[keyToFind];
139
142
  if (data) {
140
143
  guidanceModel.minimum = data.minUpgradeVersion;
141
144
  guidanceModel.maximum = data.maxUpgradeVersion;
@@ -12,7 +12,7 @@ const MEDIUM = 'MEDIUM';
12
12
  const HIGH = 'HIGH';
13
13
  const CRITICAL = 'CRITICAL';
14
14
  const APP_NAME = 'contrast';
15
- const APP_VERSION = '1.0.23';
15
+ const APP_VERSION = '1.0.24';
16
16
  const TIMEOUT = 120000;
17
17
  const HIGH_COLOUR = '#ff9900';
18
18
  const CRITICAL_COLOUR = '#e35858';
@@ -24,7 +24,7 @@ const determineProjectTypeAndCwd = (files, config) => {
24
24
  };
25
25
  const buildMaven = (config, projectData, timeout) => {
26
26
  let command = 'mvn';
27
- let args = ['dependency:tree', '-B'];
27
+ let args = ['dependency:tree', '-B', '-Dscope=runtime'];
28
28
  if (config.mavenSettingsPath) {
29
29
  args.push('-s');
30
30
  args.push(config.mavenSettingsPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/contrast",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Contrast Security's command line tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -265,8 +265,12 @@ function getIssueRow(cveArray) {
265
265
  function gatherRemediationAdvice(guidance, libraryName, libraryVersion) {
266
266
  const guidanceModel = new ReportGuidanceModel()
267
267
 
268
- const data = guidance[libraryName + '@' + libraryVersion]
268
+ //partial key search as Java returns the group but other languages do not
269
+ const keyToFind = Object.keys(guidance).filter(key => {
270
+ return key.includes(libraryName + '@' + libraryVersion)
271
+ })
269
272
 
273
+ const data = guidance[keyToFind]
270
274
  if (data) {
271
275
  guidanceModel.minimum = data.minUpgradeVersion
272
276
  guidanceModel.maximum = data.maxUpgradeVersion
@@ -14,7 +14,7 @@ const HIGH = 'HIGH'
14
14
  const CRITICAL = 'CRITICAL'
15
15
  // App
16
16
  const APP_NAME = 'contrast'
17
- const APP_VERSION = '1.0.23'
17
+ const APP_VERSION = '1.0.24'
18
18
  const TIMEOUT = 120000
19
19
  const HIGH_COLOUR = '#ff9900'
20
20
  const CRITICAL_COLOUR = '#e35858'
@@ -30,7 +30,7 @@ const determineProjectTypeAndCwd = (files, config) => {
30
30
 
31
31
  const buildMaven = (config, projectData, timeout) => {
32
32
  let command = 'mvn'
33
- let args = ['dependency:tree', '-B']
33
+ let args = ['dependency:tree', '-B', '-Dscope=runtime']
34
34
  if (config.mavenSettingsPath) {
35
35
  args.push('-s')
36
36
  args.push(config.mavenSettingsPath)