@contrast/agent-bundle 5.39.0 → 5.40.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/node_modules/@contrast/agent/lib/start-agent.js +50 -40
- package/node_modules/@contrast/agent/package.json +10 -10
- package/node_modules/@contrast/agentify/lib/sources.js +1 -0
- package/node_modules/@contrast/agentify/package.json +14 -14
- package/node_modules/@contrast/architecture-components/package.json +5 -5
- package/node_modules/@contrast/assess/lib/crypto-analysis/install/math.js +1 -0
- package/node_modules/@contrast/assess/lib/dataflow/propagation/install/string/replace.js +6 -3
- package/node_modules/@contrast/assess/lib/dataflow/sources/index.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/{body-parser1.js → body-parser.js} +1 -1
- package/node_modules/@contrast/assess/package.json +11 -11
- package/node_modules/@contrast/common/lib/constants.d.ts +16 -0
- package/node_modules/@contrast/common/lib/constants.js +22 -1
- package/node_modules/@contrast/common/lib/index.d.ts +1 -0
- package/node_modules/@contrast/common/lib/index.js +12 -2
- package/node_modules/@contrast/common/package.json +1 -1
- package/node_modules/@contrast/config/lib/index.d.ts +1 -0
- package/node_modules/@contrast/config/package.json +3 -3
- package/node_modules/@contrast/core/package.json +5 -5
- package/node_modules/@contrast/deadzones/package.json +5 -5
- package/node_modules/@contrast/dep-hooks/package.json +3 -3
- package/node_modules/@contrast/esm-hooks/package.json +6 -6
- package/node_modules/@contrast/instrumentation/package.json +5 -5
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +155 -150
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/index.js +9 -2
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/utils.js +54 -43
- package/node_modules/@contrast/library-analysis/package.json +4 -4
- package/node_modules/@contrast/logger/package.json +3 -3
- package/node_modules/@contrast/metrics/package.json +6 -6
- package/node_modules/@contrast/patcher/package.json +2 -2
- package/node_modules/@contrast/protect/lib/input-analysis/index.js +1 -1
- package/node_modules/@contrast/protect/lib/input-analysis/install/{body-parser1.js → body-parser.js} +1 -1
- package/node_modules/@contrast/protect/package.json +11 -11
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/routes-observed.js +2 -1
- package/node_modules/@contrast/reporter/package.json +6 -6
- package/node_modules/@contrast/rewriter/package.json +5 -5
- package/node_modules/@contrast/route-coverage/lib/index.d.ts +2 -0
- package/node_modules/@contrast/route-coverage/lib/index.js +14 -8
- package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +491 -202
- package/node_modules/@contrast/route-coverage/package.json +9 -9
- package/node_modules/@contrast/scopes/package.json +5 -5
- package/node_modules/@contrast/telemetry/package.json +5 -5
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.d.ts +5 -0
- package/node_modules/@types/node/dns/promises.d.ts +11 -10
- package/node_modules/@types/node/dns.d.ts +18 -19
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/stream/web.d.ts +4 -0
- package/node_modules/@types/node/test.d.ts +1905 -2009
- package/package.json +2 -2
- package/node_modules/@contrast/route-coverage/lib/install/http.js +0 -44
- package/node_modules/path-to-regexp/LICENSE +0 -21
- package/node_modules/path-to-regexp/Readme.md +0 -216
- package/node_modules/path-to-regexp/dist/index.d.ts +0 -136
- package/node_modules/path-to-regexp/dist/index.js +0 -403
- package/node_modules/path-to-regexp/dist/index.js.map +0 -1
- package/node_modules/path-to-regexp/package.json +0 -62
|
@@ -19,7 +19,6 @@ const process = require('process');
|
|
|
19
19
|
const { isMainThread, threadId } = require('worker_threads');
|
|
20
20
|
const { safeConsoleError, safeConsoleWarn } = require('@contrast/common');
|
|
21
21
|
const { Core } = require('@contrast/core/lib/ioc/core');
|
|
22
|
-
const _agentify = require('@contrast/agentify');
|
|
23
22
|
|
|
24
23
|
const {
|
|
25
24
|
name: agentName,
|
|
@@ -30,6 +29,8 @@ const {
|
|
|
30
29
|
}
|
|
31
30
|
} = require('../package.json');
|
|
32
31
|
|
|
32
|
+
const kContrastInitialized = Symbol(`${agentName}:initialized`);
|
|
33
|
+
|
|
33
34
|
function initCore() {
|
|
34
35
|
const core = new Core({
|
|
35
36
|
agentName,
|
|
@@ -70,46 +71,55 @@ function loadFeatures(core) {
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
function startAgent({ type = 'cjs' } = {}) {
|
|
73
|
-
if (isMainThread) {
|
|
74
|
-
try {
|
|
75
|
-
const core = initCore();
|
|
76
|
-
const agentify = _agentify(core);
|
|
77
|
-
|
|
78
|
-
return agentify(loadFeatures, {
|
|
79
|
-
installOrder: [
|
|
80
|
-
'reporter',
|
|
81
|
-
'startupValidation',
|
|
82
|
-
'telemetry',
|
|
83
|
-
'contrastMethods',
|
|
84
|
-
'deadzones',
|
|
85
|
-
'scopes',
|
|
86
|
-
'secObs',
|
|
87
|
-
'sources',
|
|
88
|
-
'architectureComponents',
|
|
89
|
-
'routeCoverage',
|
|
90
|
-
'assess',
|
|
91
|
-
'protect',
|
|
92
|
-
'depHooks',
|
|
93
|
-
'libraryAnalysis',
|
|
94
|
-
'heapSnapshots',
|
|
95
|
-
'metrics',
|
|
96
|
-
'rewriteHooks',
|
|
97
|
-
'functionHooks',
|
|
98
|
-
'esmHooks',
|
|
99
|
-
'diagnostics',
|
|
100
|
-
],
|
|
101
|
-
type
|
|
102
|
-
});
|
|
103
|
-
} catch (cause) {
|
|
104
|
-
// agentify should catch any startup errors and handle necessary logging,
|
|
105
|
-
// but this is just in case a fatal error occurs during composition.
|
|
106
|
-
safeConsoleError(new Error(
|
|
107
|
-
'Startup error was not handled by agentify. Application Will be run without instrumentation.',
|
|
108
|
-
{ cause }
|
|
109
|
-
));
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
74
|
+
if (!isMainThread) {
|
|
112
75
|
safeConsoleWarn('Not in main thread. Thread (tid: %d) continuing without instrumentation.', threadId);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (global[kContrastInitialized]) {
|
|
80
|
+
safeConsoleWarn('%s has already been initialized. Continuing without reinstrumentation.', agentName);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
global[kContrastInitialized] = true;
|
|
86
|
+
|
|
87
|
+
const core = initCore();
|
|
88
|
+
const agentify = require('@contrast/agentify')(core);
|
|
89
|
+
|
|
90
|
+
return agentify(loadFeatures, {
|
|
91
|
+
installOrder: [
|
|
92
|
+
'reporter',
|
|
93
|
+
'startupValidation',
|
|
94
|
+
'telemetry',
|
|
95
|
+
'contrastMethods',
|
|
96
|
+
'deadzones',
|
|
97
|
+
'scopes',
|
|
98
|
+
'secObs',
|
|
99
|
+
'sources',
|
|
100
|
+
'architectureComponents',
|
|
101
|
+
'routeCoverage',
|
|
102
|
+
'assess',
|
|
103
|
+
'protect',
|
|
104
|
+
'depHooks',
|
|
105
|
+
'libraryAnalysis',
|
|
106
|
+
'heapSnapshots',
|
|
107
|
+
'metrics',
|
|
108
|
+
'rewriteHooks',
|
|
109
|
+
'functionHooks',
|
|
110
|
+
'esmHooks',
|
|
111
|
+
'diagnostics',
|
|
112
|
+
],
|
|
113
|
+
type
|
|
114
|
+
});
|
|
115
|
+
} catch (cause) {
|
|
116
|
+
delete global[kContrastInitialized];
|
|
117
|
+
// agentify should catch any startup errors and handle necessary logging,
|
|
118
|
+
// but this is just in case a fatal error occurs during composition.
|
|
119
|
+
safeConsoleError(new Error(
|
|
120
|
+
'Startup error was not handled by agentify. Application Will be run without instrumentation.',
|
|
121
|
+
{ cause }
|
|
122
|
+
));
|
|
113
123
|
}
|
|
114
124
|
}
|
|
115
125
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/agent",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.40.0",
|
|
4
4
|
"description": "Assess and Protect agents for Node.js",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"test": "bash ../scripts/test.sh"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@contrast/agentify": "1.52.
|
|
31
|
-
"@contrast/architecture-components": "1.42.
|
|
32
|
-
"@contrast/assess": "1.58.
|
|
33
|
-
"@contrast/common": "1.34.
|
|
34
|
-
"@contrast/core": "1.54.
|
|
35
|
-
"@contrast/library-analysis": "1.44.
|
|
36
|
-
"@contrast/protect": "1.64.
|
|
37
|
-
"@contrast/route-coverage": "1.45.
|
|
30
|
+
"@contrast/agentify": "1.52.2",
|
|
31
|
+
"@contrast/architecture-components": "1.42.2",
|
|
32
|
+
"@contrast/assess": "1.58.2",
|
|
33
|
+
"@contrast/common": "1.34.2",
|
|
34
|
+
"@contrast/core": "1.54.2",
|
|
35
|
+
"@contrast/library-analysis": "1.44.2",
|
|
36
|
+
"@contrast/protect": "1.64.2",
|
|
37
|
+
"@contrast/route-coverage": "1.45.2",
|
|
38
38
|
"@contrast/sec-obs": "1.0.0-alpha.8",
|
|
39
|
-
"@contrast/telemetry": "1.29.
|
|
39
|
+
"@contrast/telemetry": "1.29.2"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -37,6 +37,7 @@ module.exports = function(core) {
|
|
|
37
37
|
// take a snapshot of Perf.all at this point. this will get logged
|
|
38
38
|
// at some point on the perf interval timer.
|
|
39
39
|
core.Perf.mark('listening');
|
|
40
|
+
messages.emit(Event.SERVER_LISTENING, { type: serverType, server: data.obj });
|
|
40
41
|
}
|
|
41
42
|
return next();
|
|
42
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/agentify",
|
|
3
|
-
"version": "1.52.
|
|
3
|
+
"version": "1.52.2",
|
|
4
4
|
"description": "Configures Contrast agent services and instrumentation within an application",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -20,21 +20,21 @@
|
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.34.
|
|
24
|
-
"@contrast/config": "1.49.
|
|
25
|
-
"@contrast/core": "1.54.
|
|
26
|
-
"@contrast/deadzones": "1.26.
|
|
27
|
-
"@contrast/dep-hooks": "1.23.
|
|
28
|
-
"@contrast/esm-hooks": "2.28.
|
|
23
|
+
"@contrast/common": "1.34.2",
|
|
24
|
+
"@contrast/config": "1.49.2",
|
|
25
|
+
"@contrast/core": "1.54.2",
|
|
26
|
+
"@contrast/deadzones": "1.26.2",
|
|
27
|
+
"@contrast/dep-hooks": "1.23.2",
|
|
28
|
+
"@contrast/esm-hooks": "2.28.2",
|
|
29
29
|
"@contrast/find-package-json": "^1.1.0",
|
|
30
|
-
"@contrast/instrumentation": "1.33.
|
|
31
|
-
"@contrast/logger": "1.27.
|
|
32
|
-
"@contrast/metrics": "1.31.
|
|
33
|
-
"@contrast/patcher": "1.26.
|
|
30
|
+
"@contrast/instrumentation": "1.33.2",
|
|
31
|
+
"@contrast/logger": "1.27.2",
|
|
32
|
+
"@contrast/metrics": "1.31.2",
|
|
33
|
+
"@contrast/patcher": "1.26.2",
|
|
34
34
|
"@contrast/perf": "1.3.1",
|
|
35
|
-
"@contrast/reporter": "1.51.
|
|
36
|
-
"@contrast/rewriter": "1.30.
|
|
37
|
-
"@contrast/scopes": "1.24.
|
|
35
|
+
"@contrast/reporter": "1.51.2",
|
|
36
|
+
"@contrast/rewriter": "1.30.2",
|
|
37
|
+
"@contrast/scopes": "1.24.2",
|
|
38
38
|
"on-finished": "^2.4.1",
|
|
39
39
|
"semver": "^7.6.0"
|
|
40
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/architecture-components",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.2",
|
|
4
4
|
"description": "Detects external systems being connected to by applications.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.34.
|
|
24
|
-
"@contrast/dep-hooks": "1.23.
|
|
25
|
-
"@contrast/logger": "1.27.
|
|
26
|
-
"@contrast/patcher": "1.26.
|
|
23
|
+
"@contrast/common": "1.34.2",
|
|
24
|
+
"@contrast/dep-hooks": "1.23.2",
|
|
25
|
+
"@contrast/logger": "1.27.2",
|
|
26
|
+
"@contrast/patcher": "1.26.2"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -288,10 +288,13 @@ module.exports = function(core) {
|
|
|
288
288
|
source: data._objInfo ? (data._history.size > 1 ? 'A' : 'O') : 'P',
|
|
289
289
|
target: 'R',
|
|
290
290
|
});
|
|
291
|
-
if (!event) return null;
|
|
292
291
|
|
|
293
|
-
|
|
294
|
-
|
|
292
|
+
if (event) {
|
|
293
|
+
const { extern } = tracker.track(result, event);
|
|
294
|
+
return extern;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return result;
|
|
295
298
|
}
|
|
296
299
|
});
|
|
297
300
|
},
|
|
@@ -26,7 +26,7 @@ module.exports = function (core) {
|
|
|
26
26
|
require('./install/hapi')(core);
|
|
27
27
|
require('./install/koa')(core);
|
|
28
28
|
require('./install/restify')(core);
|
|
29
|
-
require('./install/body-
|
|
29
|
+
require('./install/body-parser')(core);
|
|
30
30
|
require('./install/busboy')(core);
|
|
31
31
|
require('./install/cookie-parser1')(core);
|
|
32
32
|
require('./install/formidable1')(core);
|
|
@@ -97,7 +97,7 @@ module.exports = function init(core) {
|
|
|
97
97
|
core.assess.dataflow.sources.bodyParser1Instrumentation = {
|
|
98
98
|
install() {
|
|
99
99
|
depHooks.resolve(
|
|
100
|
-
{ name: 'body-parser', version: '>=1 <
|
|
100
|
+
{ name: 'body-parser', version: '>=1 <3' },
|
|
101
101
|
/** @param {import('body-parser').BodyParser} bodyParser */
|
|
102
102
|
(bodyParser) => {
|
|
103
103
|
bodyParser = patcher.patch(bodyParser, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/assess",
|
|
3
|
-
"version": "1.58.
|
|
3
|
+
"version": "1.58.2",
|
|
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)",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.34.
|
|
24
|
-
"@contrast/config": "1.49.
|
|
25
|
-
"@contrast/core": "1.54.
|
|
26
|
-
"@contrast/dep-hooks": "1.23.
|
|
23
|
+
"@contrast/common": "1.34.2",
|
|
24
|
+
"@contrast/config": "1.49.2",
|
|
25
|
+
"@contrast/core": "1.54.2",
|
|
26
|
+
"@contrast/dep-hooks": "1.23.2",
|
|
27
27
|
"@contrast/distringuish": "^5.1.0",
|
|
28
|
-
"@contrast/instrumentation": "1.33.
|
|
29
|
-
"@contrast/logger": "1.27.
|
|
30
|
-
"@contrast/patcher": "1.26.
|
|
31
|
-
"@contrast/rewriter": "1.30.
|
|
32
|
-
"@contrast/route-coverage": "1.45.
|
|
33
|
-
"@contrast/scopes": "1.24.
|
|
28
|
+
"@contrast/instrumentation": "1.33.2",
|
|
29
|
+
"@contrast/logger": "1.27.2",
|
|
30
|
+
"@contrast/patcher": "1.26.2",
|
|
31
|
+
"@contrast/rewriter": "1.30.2",
|
|
32
|
+
"@contrast/route-coverage": "1.45.2",
|
|
33
|
+
"@contrast/scopes": "1.24.2",
|
|
34
34
|
"semver": "^7.6.0"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare enum Event {
|
|
2
2
|
RESPONSE_FINISH = "response-finish",
|
|
3
|
+
SERVER_LISTENING = "server-listening",
|
|
3
4
|
ROUTE_COVERAGE_DISCOVERY_FINISHED = "route-coverage-discovery-finished",
|
|
4
5
|
ARCHITECTURE_COMPONENT = "architecture-component",
|
|
5
6
|
ASSESS_DATAFLOW_FINDING = "assess-dataflow-findings",
|
|
@@ -188,6 +189,11 @@ export declare enum DataflowTag {
|
|
|
188
189
|
COOKIE = "COOKIE",
|
|
189
190
|
WEAK_URL_ENCODED = "WEAK_URL_ENCODED"
|
|
190
191
|
}
|
|
192
|
+
export declare enum ServerEnvironment {
|
|
193
|
+
QA = "QA",
|
|
194
|
+
PRODUCTION = "PRODUCTION",
|
|
195
|
+
DEVELOPMENT = "DEVELOPMENT"
|
|
196
|
+
}
|
|
191
197
|
export declare const BLOCKING_MODES: readonly ["block", "block_at_perimeter"];
|
|
192
198
|
export declare const FS_METHODS: readonly [{
|
|
193
199
|
readonly name: "access";
|
|
@@ -382,4 +388,14 @@ export declare enum agentLibIDListTypes {
|
|
|
382
388
|
export declare const symbols: {
|
|
383
389
|
readonly kMetrics: symbol;
|
|
384
390
|
};
|
|
391
|
+
export declare const URI_REGEXES: readonly [{
|
|
392
|
+
readonly rx: RegExp;
|
|
393
|
+
readonly rp: "{uuid}";
|
|
394
|
+
}, {
|
|
395
|
+
readonly rx: RegExp;
|
|
396
|
+
readonly rp: "{hash}";
|
|
397
|
+
}, {
|
|
398
|
+
readonly rx: RegExp;
|
|
399
|
+
readonly rp: "{n}";
|
|
400
|
+
}];
|
|
385
401
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
* way not consistent with the End User License Agreement.
|
|
15
15
|
*/
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.symbols = exports.agentLibIDListTypes = exports.FS_METHODS = exports.BLOCKING_MODES = exports.DataflowTag = exports.ExclusionType = exports.InputType = exports.SessionConfigurationRule = exports.ResponseScanningRule = exports.Rule = exports.ProtectRuleMode = exports.Event = void 0;
|
|
17
|
+
exports.URI_REGEXES = exports.symbols = exports.agentLibIDListTypes = exports.FS_METHODS = exports.BLOCKING_MODES = exports.ServerEnvironment = exports.DataflowTag = exports.ExclusionType = exports.InputType = exports.SessionConfigurationRule = exports.ResponseScanningRule = exports.Rule = exports.ProtectRuleMode = exports.Event = void 0;
|
|
18
18
|
var Event;
|
|
19
19
|
(function (Event) {
|
|
20
20
|
// lifecycle
|
|
21
21
|
Event["RESPONSE_FINISH"] = "response-finish";
|
|
22
|
+
Event["SERVER_LISTENING"] = "server-listening";
|
|
22
23
|
Event["ROUTE_COVERAGE_DISCOVERY_FINISHED"] = "route-coverage-discovery-finished";
|
|
23
24
|
// reports
|
|
24
25
|
Event["ARCHITECTURE_COMPONENT"] = "architecture-component";
|
|
@@ -219,6 +220,12 @@ var DataflowTag;
|
|
|
219
220
|
DataflowTag["COOKIE"] = "COOKIE";
|
|
220
221
|
DataflowTag["WEAK_URL_ENCODED"] = "WEAK_URL_ENCODED";
|
|
221
222
|
})(DataflowTag || (exports.DataflowTag = DataflowTag = {}));
|
|
223
|
+
var ServerEnvironment;
|
|
224
|
+
(function (ServerEnvironment) {
|
|
225
|
+
ServerEnvironment["QA"] = "QA";
|
|
226
|
+
ServerEnvironment["PRODUCTION"] = "PRODUCTION";
|
|
227
|
+
ServerEnvironment["DEVELOPMENT"] = "DEVELOPMENT";
|
|
228
|
+
})(ServerEnvironment || (exports.ServerEnvironment = ServerEnvironment = {}));
|
|
222
229
|
exports.BLOCKING_MODES = ['block', 'block_at_perimeter'];
|
|
223
230
|
exports.FS_METHODS = [
|
|
224
231
|
{ name: 'access', promises: true, sync: true, indices: [0] },
|
|
@@ -267,4 +274,18 @@ var agentLibIDListTypes;
|
|
|
267
274
|
exports.symbols = {
|
|
268
275
|
kMetrics: Symbol('contrast.metrics'),
|
|
269
276
|
};
|
|
277
|
+
exports.URI_REGEXES = [
|
|
278
|
+
{
|
|
279
|
+
rx: /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/g,
|
|
280
|
+
rp: '{uuid}'
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
rx: /([a-fA-F0-9]{2}){16,}/g,
|
|
284
|
+
rp: '{hash}'
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
rx: /(\d+)/g,
|
|
288
|
+
rp: '{n}'
|
|
289
|
+
},
|
|
290
|
+
];
|
|
270
291
|
//# sourceMappingURL=constants.js.map
|
|
@@ -37,4 +37,5 @@ export declare function set(obj: Record<string, any>, name: string, value: any):
|
|
|
37
37
|
export declare function safeConsoleError(...args: Parameters<typeof console.error>): void;
|
|
38
38
|
/** Suppresses output to stderr when installed by the universal agent */
|
|
39
39
|
export declare function safeConsoleWarn(...args: Parameters<typeof console.warn>): void;
|
|
40
|
+
export declare function normalizeURI(uri: string): string;
|
|
40
41
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -28,14 +28,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
28
28
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.safeConsoleWarn = exports.safeConsoleError = exports.set = exports.get = exports.groupResultsMap = exports.callChildComponentMethods = exports.callChildComponentMethodsSync = exports.traverseKeys = exports.traverseValues = exports.traverseKeysAndValues = exports.encodeString = exports.isNonEmptyObject = exports.isString = exports.empties = void 0;
|
|
31
|
+
exports.normalizeURI = exports.safeConsoleWarn = exports.safeConsoleError = exports.set = exports.get = exports.groupResultsMap = exports.callChildComponentMethods = exports.callChildComponentMethodsSync = exports.traverseKeys = exports.traverseValues = exports.traverseKeysAndValues = exports.encodeString = exports.isNonEmptyObject = exports.isString = exports.empties = void 0;
|
|
32
32
|
const constants_1 = require("./constants");
|
|
33
33
|
const primordials_1 = require("./primordials");
|
|
34
34
|
__exportStar(require("./constants"), exports);
|
|
35
35
|
__exportStar(require("./types"), exports);
|
|
36
36
|
__exportStar(require("./primordials"), exports);
|
|
37
37
|
const { CONTRAST_INSTALLATION_TOOL = 'NONE' } = process.env;
|
|
38
|
-
const { StringPrototypeSplit, BufferFrom, BufferPrototypeToString } = primordials_1.primordials;
|
|
38
|
+
const { StringPrototypeReplaceAll, StringPrototypeSplit, BufferFrom, BufferPrototypeToString } = primordials_1.primordials;
|
|
39
39
|
exports.empties = {
|
|
40
40
|
OBJECT: Object.freeze({}),
|
|
41
41
|
ARRAY: Object.freeze([]),
|
|
@@ -225,4 +225,14 @@ function safeConsoleWarn(...args) {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
exports.safeConsoleWarn = safeConsoleWarn;
|
|
228
|
+
function normalizeURI(uri) {
|
|
229
|
+
let normalizedUri = uri;
|
|
230
|
+
constants_1.URI_REGEXES.forEach(({ rx, rp }) => {
|
|
231
|
+
//@ts-ignore
|
|
232
|
+
normalizedUri = StringPrototypeReplaceAll.call(normalizedUri, rx, rp);
|
|
233
|
+
});
|
|
234
|
+
return normalizedUri;
|
|
235
|
+
}
|
|
236
|
+
exports.normalizeURI = normalizeURI;
|
|
237
|
+
;
|
|
228
238
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/common",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.2",
|
|
4
4
|
"description": "Shared constants and utilities for all Contrast Agent modules",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/config",
|
|
3
|
-
"version": "1.49.
|
|
3
|
+
"version": "1.49.2",
|
|
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)",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.34.
|
|
24
|
-
"@contrast/core": "1.54.
|
|
23
|
+
"@contrast/common": "1.34.2",
|
|
24
|
+
"@contrast/core": "1.54.2",
|
|
25
25
|
"yaml": "^2.2.2"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/core",
|
|
3
|
-
"version": "1.54.
|
|
3
|
+
"version": "1.54.2",
|
|
4
4
|
"description": "Preconfigured Contrast agent core services and models",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"test": "bash ../scripts/test.sh"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@contrast/common": "1.34.
|
|
23
|
-
"@contrast/config": "1.49.
|
|
22
|
+
"@contrast/common": "1.34.2",
|
|
23
|
+
"@contrast/config": "1.49.2",
|
|
24
24
|
"@contrast/find-package-json": "^1.1.0",
|
|
25
25
|
"@contrast/fn-inspect": "^4.3.0",
|
|
26
|
-
"@contrast/logger": "1.27.
|
|
27
|
-
"@contrast/patcher": "1.26.
|
|
26
|
+
"@contrast/logger": "1.27.2",
|
|
27
|
+
"@contrast/patcher": "1.26.2",
|
|
28
28
|
"@contrast/perf": "1.3.1",
|
|
29
29
|
"@tsxper/crc32": "^2.1.3",
|
|
30
30
|
"axios": "^1.7.4",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/deadzones",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.2",
|
|
4
4
|
"description": "Configures Contrast agent services and instrumentation within an application",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.34.
|
|
24
|
-
"@contrast/dep-hooks": "1.23.
|
|
25
|
-
"@contrast/patcher": "1.26.
|
|
26
|
-
"@contrast/scopes": "1.24.
|
|
23
|
+
"@contrast/common": "1.34.2",
|
|
24
|
+
"@contrast/dep-hooks": "1.23.2",
|
|
25
|
+
"@contrast/patcher": "1.26.2",
|
|
26
|
+
"@contrast/scopes": "1.24.2"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/dep-hooks",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.2",
|
|
4
4
|
"description": "Post hooks for Module.prototype.require",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"test": "bash ../scripts/test.sh"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@contrast/common": "1.34.
|
|
24
|
+
"@contrast/common": "1.34.2",
|
|
25
25
|
"@contrast/find-package-json": "^1.1.0",
|
|
26
|
-
"@contrast/logger": "1.27.
|
|
26
|
+
"@contrast/logger": "1.27.2",
|
|
27
27
|
"semver": "^7.6.3"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/esm-hooks",
|
|
3
|
-
"version": "2.28.
|
|
3
|
+
"version": "2.28.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Support for loading and instrumenting ECMAScript modules",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"test": "bash ../scripts/test.sh"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@contrast/common": "1.34.
|
|
26
|
-
"@contrast/config": "1.49.
|
|
27
|
-
"@contrast/core": "1.54.
|
|
25
|
+
"@contrast/common": "1.34.2",
|
|
26
|
+
"@contrast/config": "1.49.2",
|
|
27
|
+
"@contrast/core": "1.54.2",
|
|
28
28
|
"@contrast/find-package-json": "^1.1.0",
|
|
29
|
-
"@contrast/logger": "1.27.
|
|
30
|
-
"@contrast/rewriter": "1.30.
|
|
29
|
+
"@contrast/logger": "1.27.2",
|
|
30
|
+
"@contrast/rewriter": "1.30.2"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/instrumentation",
|
|
3
|
-
"version": "1.33.
|
|
3
|
+
"version": "1.33.2",
|
|
4
4
|
"description": "Shared hooks and patches between Protect and Assess components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.34.
|
|
24
|
-
"@contrast/dep-hooks": "1.23.
|
|
25
|
-
"@contrast/logger": "1.27.
|
|
26
|
-
"@contrast/patcher": "1.26.
|
|
23
|
+
"@contrast/common": "1.34.2",
|
|
24
|
+
"@contrast/dep-hooks": "1.23.2",
|
|
25
|
+
"@contrast/logger": "1.27.2",
|
|
26
|
+
"@contrast/patcher": "1.26.2"
|
|
27
27
|
}
|
|
28
28
|
}
|