@contrast/assess 1.77.0 → 1.78.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/dataflow/propagation/install/string/concat.js +23 -2
- package/lib/dataflow/sinks/install/child-process.js +1 -1
- package/lib/dataflow/sinks/install/eval.js +1 -1
- package/lib/dataflow/sinks/install/fs.js +1 -1
- package/lib/dataflow/sinks/install/function.js +1 -1
- package/lib/dataflow/sinks/install/libxmljs.js +1 -1
- package/lib/dataflow/sinks/install/mssql.js +1 -1
- package/lib/dataflow/sinks/install/mysql.js +1 -1
- package/lib/dataflow/sinks/install/node-serialize.js +1 -1
- package/lib/dataflow/sinks/install/sequelize.js +1 -1
- package/lib/dataflow/sinks/install/sqlite3.js +1 -1
- package/lib/dataflow/sinks/install/vm.js +1 -1
- package/package.json +16 -16
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
'use strict';
|
|
17
17
|
|
|
18
|
-
const { primordials: { ArrayPrototypeJoin } } = require('@contrast/common');
|
|
18
|
+
const { isString, primordials: { ArrayPrototypeJoin } } = require('@contrast/common');
|
|
19
19
|
const { createAppendTags, getAdjustedUntrackedValue } = require('../../../tag-utils');
|
|
20
20
|
const { patchType } = require('../../common');
|
|
21
21
|
|
|
@@ -42,10 +42,31 @@ module.exports = function(core) {
|
|
|
42
42
|
metadata.push({ tracked: true, value: strInfo.value });
|
|
43
43
|
history.add(strInfo);
|
|
44
44
|
tags = createAppendTags(tags, strInfo.tags, globalOffset);
|
|
45
|
+
globalOffset += strInfo.value.length;
|
|
45
46
|
} else {
|
|
46
47
|
metadata.push({ tracked: false, value: getAdjustedUntrackedValue(arg) });
|
|
48
|
+
// See NODE-3995
|
|
49
|
+
// CAP wraps objects and overrides toString with a method that creates
|
|
50
|
+
// side effects that we need to avoid by not coercing to string
|
|
51
|
+
if (isString(arg)) {
|
|
52
|
+
globalOffset += arg.length;
|
|
53
|
+
} else if (typeof arg !== 'object') {
|
|
54
|
+
globalOffset += `${arg}`.length;
|
|
55
|
+
} else if (arg === null) {
|
|
56
|
+
globalOffset += 4;
|
|
57
|
+
} else if (arg instanceof RegExp) {
|
|
58
|
+
globalOffset += arg.source.length + arg.flags.length + 2;
|
|
59
|
+
} else if (arg instanceof Date) {
|
|
60
|
+
globalOffset += new Date(arg.getTime()).toString().length;
|
|
61
|
+
} else if (arg instanceof String || arg instanceof Number || arg instanceof Boolean) { // boxed primitives
|
|
62
|
+
globalOffset += `${arg.valueOf()}`.length;
|
|
63
|
+
} else if (arg instanceof Error) {
|
|
64
|
+
globalOffset += arg.message.length + 7;
|
|
65
|
+
} else {
|
|
66
|
+
globalOffset += 15; // [object Object]
|
|
67
|
+
}
|
|
47
68
|
}
|
|
48
|
-
globalOffset +=
|
|
69
|
+
globalOffset += isIteratingArray ? 1 : 0;
|
|
49
70
|
}
|
|
50
71
|
return [metadata, tags];
|
|
51
72
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/assess",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.78.0",
|
|
4
4
|
"description": "Contrast service providing framework-agnostic Assess support",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -13,26 +13,26 @@
|
|
|
13
13
|
"main": "lib/index.js",
|
|
14
14
|
"types": "lib/index.d.ts",
|
|
15
15
|
"engines": {
|
|
16
|
-
"npm": ">=
|
|
17
|
-
"node": ">=
|
|
16
|
+
"npm": ">=8.5.5",
|
|
17
|
+
"node": ">=18.7.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.
|
|
24
|
-
"@contrast/config": "1.
|
|
25
|
-
"@contrast/core": "1.
|
|
26
|
-
"@contrast/dep-hooks": "1.
|
|
23
|
+
"@contrast/common": "1.42.0",
|
|
24
|
+
"@contrast/config": "1.61.0",
|
|
25
|
+
"@contrast/core": "1.66.0",
|
|
26
|
+
"@contrast/dep-hooks": "1.35.0",
|
|
27
27
|
"@contrast/distringuish": "6.0.2",
|
|
28
|
-
"@contrast/instrumentation": "1.
|
|
29
|
-
"@contrast/logger": "1.
|
|
30
|
-
"@contrast/patcher": "1.
|
|
31
|
-
"@contrast/rewriter": "1.
|
|
32
|
-
"@contrast/route-coverage": "1.
|
|
33
|
-
"@contrast/scopes": "1.
|
|
34
|
-
"@contrast/sources": "1.
|
|
35
|
-
"@contrast/stack-trace-factory": "1.
|
|
36
|
-
"semver": "7.
|
|
28
|
+
"@contrast/instrumentation": "1.45.0",
|
|
29
|
+
"@contrast/logger": "1.39.0",
|
|
30
|
+
"@contrast/patcher": "1.38.0",
|
|
31
|
+
"@contrast/rewriter": "1.43.0",
|
|
32
|
+
"@contrast/route-coverage": "1.60.0",
|
|
33
|
+
"@contrast/scopes": "1.36.0",
|
|
34
|
+
"@contrast/sources": "1.12.0",
|
|
35
|
+
"@contrast/stack-trace-factory": "1.7.0",
|
|
36
|
+
"semver": "7.8.5"
|
|
37
37
|
}
|
|
38
38
|
}
|