@contrast/config 1.11.0 → 1.12.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 +1 -1
- package/lib/options.js +9 -0
- package/lib/util.js +2 -1
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
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.
|
|
3
|
+
"version": "1.12.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.
|
|
20
|
+
"@contrast/common": "1.10.0",
|
|
21
21
|
"yaml": "^2.2.2"
|
|
22
22
|
}
|
|
23
23
|
}
|