@contrast/config 1.11.0 → 1.13.0

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.
package/lib/index.d.ts CHANGED
@@ -172,7 +172,7 @@ export interface Config {
172
172
  session_id: string | null;
173
173
 
174
174
  /** Provide metadata used to create a new session within Contrast UI/ */
175
- session_metadtata: string | null;
175
+ session_metadata: string | null;
176
176
  };
177
177
 
178
178
  assess: {
package/lib/options.js CHANGED
@@ -465,6 +465,7 @@ const assess = [
465
465
  {
466
466
  name: 'assess.trust_custom_validators',
467
467
  arg: '<trust-custom-validators>',
468
+ fn: castBoolean,
468
469
  default: false,
469
470
  desc: 'trust incoming strings when they pass custom validators (Mongoose, Joi)',
470
471
  },
@@ -490,6 +491,14 @@ const assess = [
490
491
  fn: parseNum,
491
492
  desc: 'set limit for maximum number of source events (tracked strings) created per request',
492
493
  },
494
+ {
495
+ name: 'assess.safe_positives.enable',
496
+ arg: '[false]',
497
+ default: false,
498
+ fn: castBoolean,
499
+ desc: 'enable detection and reporting of findings regarding safe security practices, aka safe positives. ' +
500
+ 'these results will be written to the location described by the `agent.reporters.file` option.',
501
+ },
493
502
  ];
494
503
 
495
504
  const server = [
package/lib/util.js CHANGED
@@ -109,8 +109,9 @@ function checkConfigPath() {
109
109
  os.platform() === 'win32'
110
110
  ? `${process.env['ProgramData']}\\contrast`
111
111
  : '/etc/contrast';
112
+ const configSubDir = `${configDir}${path.sep}node`;
112
113
 
113
- for (const dir of [process.cwd(), configDir]) {
114
+ for (const dir of [process.cwd(), configSubDir, configDir]) {
114
115
  const checkPath = path.resolve(dir, 'contrast_security.yaml');
115
116
  if (fs.existsSync(checkPath)) {
116
117
  return checkPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/config",
3
- "version": "1.11.0",
3
+ "version": "1.13.0",
4
4
  "description": "An API for discovering Contrast agent configuration data",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -17,7 +17,7 @@
17
17
  "test": "../scripts/test.sh"
18
18
  },
19
19
  "dependencies": {
20
- "@contrast/common": "1.9.0",
20
+ "@contrast/common": "1.11.0",
21
21
  "yaml": "^2.2.2"
22
22
  }
23
23
  }