@newrelic/security-agent 0.1.1 → 0.1.3
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/CHANGELOG.md +12 -1
- package/THIRD_PARTY_NOTICES.md +34 -33
- package/lib/instrumentation-security/hooks/http/nr-http.js +2 -2
- package/lib/instrumentation-security/hooks/native/nr-childProcess.js +1 -1
- package/lib/nr-security-agent/lib/core/commonUtils.js +2 -2
- package/lib/nr-security-agent/lib/core/connections/websocket/websocket.js +18 -6
- package/lib/nr-security-agent/lib/core/xss-utils.js +2 -3
- package/lib/nr-security-agent/resources/config.js +2 -2
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
###v0.1.
|
|
1
|
+
### v0.1.3
|
|
2
|
+
* Updated semver to v7.5.3 (Fix for CWE-1333)
|
|
3
|
+
* Updated request-ip, log4js, html-entities, uuid and fast-safe-stringify to latest version.
|
|
4
|
+
* Fix for system call event generation to avoid null parameters in event.
|
|
5
|
+
* Fix for id in nr-csec-tracing-data.
|
|
6
|
+
* WS logging update.
|
|
7
|
+
|
|
8
|
+
### v0.1.2
|
|
9
|
+
* bump @aws-sdk/client-lambda to v3.348.0
|
|
10
|
+
* Minor fix in ws reconnect.
|
|
11
|
+
|
|
12
|
+
### v0.1.1
|
|
2
13
|
* Fix in mysql instrumentation on getConnection to check if callback is wrapped
|
|
3
14
|
* NR-123832: Support for fire and forget vulnerability detection
|
|
4
15
|
* Fixes for snapshot file.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -75,7 +75,7 @@ code, the source code can be found at [https://github.com/newrelic/csec-node-age
|
|
|
75
75
|
|
|
76
76
|
### @aws-sdk/client-lambda
|
|
77
77
|
|
|
78
|
-
This product includes source derived from [@aws-sdk/client-lambda](https://github.com/aws/aws-sdk-js-v3) ([v3.
|
|
78
|
+
This product includes source derived from [@aws-sdk/client-lambda](https://github.com/aws/aws-sdk-js-v3) ([v3.358.0](https://github.com/aws/aws-sdk-js-v3/tree/v3.358.0)), distributed under the [Apache-2.0 License](https://github.com/aws/aws-sdk-js-v3/blob/v3.358.0/LICENSE):
|
|
79
79
|
|
|
80
80
|
```
|
|
81
81
|
Apache License
|
|
@@ -284,22 +284,34 @@ This product includes source derived from [@aws-sdk/client-lambda](https://githu
|
|
|
284
284
|
|
|
285
285
|
### axios
|
|
286
286
|
|
|
287
|
-
This product includes source derived from [axios](https://github.com/axios/axios) ([
|
|
287
|
+
This product includes source derived from [axios](https://github.com/axios/axios) ([v0.21.4](https://github.com/axios/axios/tree/v0.21.4)), distributed under the [MIT License](https://github.com/axios/axios/blob/v0.21.4/LICENSE):
|
|
288
288
|
|
|
289
289
|
```
|
|
290
|
-
|
|
290
|
+
Copyright (c) 2014-present Matt Zabriskie
|
|
291
291
|
|
|
292
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
292
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
293
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
294
|
+
in the Software without restriction, including without limitation the rights
|
|
295
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
296
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
297
|
+
furnished to do so, subject to the following conditions:
|
|
293
298
|
|
|
294
|
-
The above copyright notice and this permission notice shall be included in
|
|
299
|
+
The above copyright notice and this permission notice shall be included in
|
|
300
|
+
all copies or substantial portions of the Software.
|
|
295
301
|
|
|
296
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
302
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
303
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
304
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
305
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
306
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
307
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
308
|
+
THE SOFTWARE.
|
|
297
309
|
|
|
298
310
|
```
|
|
299
311
|
|
|
300
312
|
### check-disk-space
|
|
301
313
|
|
|
302
|
-
This product includes source derived from [check-disk-space](https://github.com/Alex-D/check-disk-space) ([v3.
|
|
314
|
+
This product includes source derived from [check-disk-space](https://github.com/Alex-D/check-disk-space) ([v3.4.0](https://github.com/Alex-D/check-disk-space/tree/v3.4.0)), distributed under the [MIT License](https://github.com/Alex-D/check-disk-space/blob/v3.4.0/LICENSE):
|
|
303
315
|
|
|
304
316
|
```
|
|
305
317
|
MIT License
|
|
@@ -421,10 +433,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
421
433
|
|
|
422
434
|
### html-entities
|
|
423
435
|
|
|
424
|
-
This product includes source derived from [html-entities](https://github.com/mdevils/
|
|
436
|
+
This product includes source derived from [html-entities](https://github.com/mdevils/html-entities) ([v2.3.6](https://github.com/mdevils/html-entities/tree/v2.3.6)), distributed under the [MIT License](https://github.com/mdevils/html-entities/blob/v2.3.6/LICENSE):
|
|
425
437
|
|
|
426
438
|
```
|
|
427
|
-
Copyright (c)
|
|
439
|
+
Copyright (c) 2021 Dulin Marat
|
|
428
440
|
|
|
429
441
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
430
442
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -443,6 +455,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
443
455
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
444
456
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
445
457
|
THE SOFTWARE.
|
|
458
|
+
|
|
446
459
|
```
|
|
447
460
|
|
|
448
461
|
### is-invalid-path
|
|
@@ -627,7 +640,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
627
640
|
|
|
628
641
|
### request-ip
|
|
629
642
|
|
|
630
|
-
This product includes source derived from [request-ip](https://github.com/pbojinov/request-ip) ([
|
|
643
|
+
This product includes source derived from [request-ip](https://github.com/pbojinov/request-ip) ([v3.3.0](https://github.com/pbojinov/request-ip/tree/v3.3.0)), distributed under the [MIT License](https://github.com/pbojinov/request-ip/blob/v3.3.0/LICENSE.md):
|
|
631
644
|
|
|
632
645
|
```
|
|
633
646
|
The MIT License (MIT)
|
|
@@ -671,7 +684,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
671
684
|
|
|
672
685
|
### semver
|
|
673
686
|
|
|
674
|
-
This product includes source derived from [semver](https://github.com/npm/node-semver) ([
|
|
687
|
+
This product includes source derived from [semver](https://github.com/npm/node-semver) ([v7.5.3](https://github.com/npm/node-semver/tree/v7.5.3)), distributed under the [ISC License](https://github.com/npm/node-semver/blob/v7.5.3/LICENSE):
|
|
675
688
|
|
|
676
689
|
```
|
|
677
690
|
The ISC License
|
|
@@ -777,30 +790,18 @@ THE SOFTWARE.
|
|
|
777
790
|
|
|
778
791
|
### uuid
|
|
779
792
|
|
|
780
|
-
This product includes source derived from [uuid](https://github.com/uuidjs/uuid) ([
|
|
793
|
+
This product includes source derived from [uuid](https://github.com/uuidjs/uuid) ([v9.0.0](https://github.com/uuidjs/uuid/tree/v9.0.0)), distributed under the [MIT License](https://github.com/uuidjs/uuid/blob/v9.0.0/LICENSE.md):
|
|
781
794
|
|
|
782
795
|
```
|
|
783
796
|
The MIT License (MIT)
|
|
784
797
|
|
|
785
|
-
Copyright (c) 2010-
|
|
798
|
+
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
|
786
799
|
|
|
787
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
788
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
789
|
-
in the Software without restriction, including without limitation the rights
|
|
790
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
791
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
792
|
-
furnished to do so, subject to the following conditions:
|
|
800
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
793
801
|
|
|
794
|
-
The above copyright notice and this permission notice shall be included in all
|
|
795
|
-
copies or substantial portions of the Software.
|
|
802
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
796
803
|
|
|
797
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
798
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
799
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
800
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
801
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
802
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
803
|
-
SOFTWARE.
|
|
804
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
804
805
|
|
|
805
806
|
```
|
|
806
807
|
|
|
@@ -1839,7 +1840,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
1839
1840
|
|
|
1840
1841
|
### mongodb-memory-server
|
|
1841
1842
|
|
|
1842
|
-
This product includes source derived from [mongodb-memory-server](https://github.com/nodkz/mongodb-memory-server) ([v8.
|
|
1843
|
+
This product includes source derived from [mongodb-memory-server](https://github.com/nodkz/mongodb-memory-server) ([v8.13.0](https://github.com/nodkz/mongodb-memory-server/tree/v8.13.0)), distributed under the [MIT License](https://github.com/nodkz/mongodb-memory-server/blob/v8.13.0/LICENSE.md):
|
|
1843
1844
|
|
|
1844
1845
|
```
|
|
1845
1846
|
The MIT License (MIT)
|
|
@@ -2064,7 +2065,7 @@ Apache License
|
|
|
2064
2065
|
|
|
2065
2066
|
### mongodb
|
|
2066
2067
|
|
|
2067
|
-
This product includes source derived from [mongodb](https://github.com/mongodb/node-mongodb-native) ([v3.7.
|
|
2068
|
+
This product includes source derived from [mongodb](https://github.com/mongodb/node-mongodb-native) ([v3.7.4](https://github.com/mongodb/node-mongodb-native/tree/v3.7.4)), distributed under the [Apache-2.0 License](undefined):
|
|
2068
2069
|
|
|
2069
2070
|
```
|
|
2070
2071
|
Apache License
|
|
@@ -2480,7 +2481,7 @@ Apache License
|
|
|
2480
2481
|
|
|
2481
2482
|
### newrelic
|
|
2482
2483
|
|
|
2483
|
-
This product includes source derived from [newrelic](https://github.com/newrelic/node-newrelic) ([
|
|
2484
|
+
This product includes source derived from [newrelic](https://github.com/newrelic/node-newrelic) ([v10.3.1](https://github.com/newrelic/node-newrelic/tree/v10.3.1)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-newrelic/blob/v10.3.1/LICENSE):
|
|
2484
2485
|
|
|
2485
2486
|
```
|
|
2486
2487
|
Apache License
|
|
@@ -2777,7 +2778,7 @@ THE SOFTWARE
|
|
|
2777
2778
|
|
|
2778
2779
|
### sinon
|
|
2779
2780
|
|
|
2780
|
-
This product includes source derived from [sinon](https://github.com/sinonjs/sinon) ([v15.0
|
|
2781
|
+
This product includes source derived from [sinon](https://github.com/sinonjs/sinon) ([v15.2.0](https://github.com/sinonjs/sinon/tree/v15.2.0)), distributed under the [BSD-3-Clause License](https://github.com/sinonjs/sinon/blob/v15.2.0/LICENSE):
|
|
2781
2782
|
|
|
2782
2783
|
```
|
|
2783
2784
|
(The BSD License)
|
|
@@ -2812,7 +2813,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
2812
2813
|
|
|
2813
2814
|
### tap
|
|
2814
2815
|
|
|
2815
|
-
This product includes source derived from [tap](https://github.com/tapjs/node-tap) ([v16.3.
|
|
2816
|
+
This product includes source derived from [tap](https://github.com/tapjs/node-tap) ([v16.3.7](https://github.com/tapjs/node-tap/tree/v16.3.7)), distributed under the [ISC License](https://github.com/tapjs/node-tap/blob/v16.3.7/LICENSE):
|
|
2816
2817
|
|
|
2817
2818
|
```
|
|
2818
2819
|
The ISC License
|
|
@@ -135,10 +135,10 @@ function outboundHook(shim, mod, method, moduleName) {
|
|
|
135
135
|
if (arguments[0] instanceof Object) {
|
|
136
136
|
if (arguments[0] && arguments[0].headers && request.headers) {
|
|
137
137
|
arguments[0].headers.SECHOOK = id;
|
|
138
|
-
arguments[0].headers[NRCSECTRACINGDATA] = traceHeader + appUUID + '/' + this.secEvent.apiId + '/' + id + ';';
|
|
138
|
+
arguments[0].headers[NRCSECTRACINGDATA] = traceHeader + appUUID + '/' + this.secEvent.apiId + '/' + this.secEvent.id + ';';
|
|
139
139
|
} else {
|
|
140
140
|
arguments[0].headers = {};
|
|
141
|
-
arguments[0].headers[NRCSECTRACINGDATA] = traceHeader + appUUID + '/' + this.secEvent.apiId + '/' + id + ';';
|
|
141
|
+
arguments[0].headers[NRCSECTRACINGDATA] = traceHeader + appUUID + '/' + this.secEvent.apiId + '/' + this.secEvent.id + ';';
|
|
142
142
|
arguments[0].headers.SECHOOK = id;
|
|
143
143
|
}
|
|
144
144
|
if (request && request.headers[NR_CSEC_FUZZ_REQUEST_ID] && arguments[0].headers) {
|
|
@@ -30,7 +30,7 @@ function execFileHook(shim, childProcess, moduleName) {
|
|
|
30
30
|
const interceptedArgs = [arguments[0]];
|
|
31
31
|
shim.interceptedArgs = interceptedArgs;
|
|
32
32
|
const request = requestManager.getRequest(shim);
|
|
33
|
-
if (request) {
|
|
33
|
+
if (request && arguments[0]) {
|
|
34
34
|
const traceObject = secUtils.getTraceObject(shim);
|
|
35
35
|
const secMetadata = securityMetaData.getSecurityMetaData(request, interceptedArgs, traceObject, secUtils.getExecutionId(), EVENT_TYPE.SYSTEM_COMMAND, EVENT_CATEGORY.SYS)
|
|
36
36
|
const secEvent = API.generateSecEvent(secMetadata);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/* eslint-disable prefer-promise-reject-errors */
|
|
7
7
|
const fs = require('fs');
|
|
8
|
-
const
|
|
8
|
+
const uuidV = require('uuid');
|
|
9
9
|
const logs = require('./logging');
|
|
10
10
|
const logger = logs.getLogger();
|
|
11
11
|
const OS = require('os');
|
|
@@ -27,7 +27,7 @@ let websocketHealth;
|
|
|
27
27
|
* @returns UUID
|
|
28
28
|
*/
|
|
29
29
|
function getUUID(){
|
|
30
|
-
let uuid = process.env.applicationUUID ||
|
|
30
|
+
let uuid = process.env.applicationUUID || uuidV.v4();
|
|
31
31
|
process.env.applicationUUID = uuid;
|
|
32
32
|
return uuid;
|
|
33
33
|
}
|
|
@@ -115,6 +115,12 @@ SecWebSocket.prototype.init = function init() {
|
|
|
115
115
|
webSocket.on(WS_ON_ERR, this.errCB);
|
|
116
116
|
webSocket.on(WS_ON_PONG, () => {
|
|
117
117
|
lastPongtime = Date.now();
|
|
118
|
+
commonUtils.setWSHealthStatus('OK');
|
|
119
|
+
logger.debug("Pong received from Validator");
|
|
120
|
+
})
|
|
121
|
+
webSocket.on('close', () => {
|
|
122
|
+
commonUtils.setWSHealthStatus('Error');
|
|
123
|
+
logger.warn("WS connection closed");
|
|
118
124
|
})
|
|
119
125
|
this.instance = webSocket;
|
|
120
126
|
};
|
|
@@ -310,6 +316,15 @@ const handleDispatchFailure = (self, event, eventStr) => {
|
|
|
310
316
|
*/
|
|
311
317
|
const defaultOnOpenCB = () => async function onOpen() {
|
|
312
318
|
const self = this;
|
|
319
|
+
lastPongtime = 0;
|
|
320
|
+
|
|
321
|
+
if (pingIntervalConst) {
|
|
322
|
+
clearInterval(pingIntervalConst);
|
|
323
|
+
}
|
|
324
|
+
pingIntervalConst = setInterval(() => {
|
|
325
|
+
self.pingWS();
|
|
326
|
+
}, 30000)
|
|
327
|
+
|
|
313
328
|
if (self.isICReadyForEvents) {
|
|
314
329
|
return;
|
|
315
330
|
}
|
|
@@ -317,12 +332,7 @@ const defaultOnOpenCB = () => async function onOpen() {
|
|
|
317
332
|
self.reconnect();
|
|
318
333
|
return;
|
|
319
334
|
}
|
|
320
|
-
|
|
321
|
-
clearInterval(pingIntervalConst);
|
|
322
|
-
}
|
|
323
|
-
pingIntervalConst = setInterval(() => {
|
|
324
|
-
self.pingWS();
|
|
325
|
-
}, 30000)
|
|
335
|
+
|
|
326
336
|
const validatorService = commonUtils.getValidatorServiceEndpointURL();
|
|
327
337
|
initLogger.info(`[STEP-4] => Web socket connection to SaaS validator established successfully at ${validatorService}`)
|
|
328
338
|
try {
|
|
@@ -378,6 +388,8 @@ const defaultOnErrCB = () => function onClose(error) {
|
|
|
378
388
|
commonUtils.setWSHealthStatus('Error');
|
|
379
389
|
statusUtils.addErrortoBuffer(error);
|
|
380
390
|
const self = this;
|
|
391
|
+
logger.error("Error while connecting to validator:",error.message)
|
|
392
|
+
logger.warn("Security Agent INACTIVE!!!")
|
|
381
393
|
if (error && error.code && (error.code === 'ECONNREFUSED' || error.code === 'EPIPE' || error.code === 'ECONNRESET')) {
|
|
382
394
|
logger.debug("WS Client Error callback called:", error);
|
|
383
395
|
self.obeyReconnect();
|
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
const _ = require('lodash');
|
|
7
|
-
const { AllHtmlEntities } = require('html-entities');
|
|
8
7
|
const decode = require('unescape');
|
|
9
8
|
const querystring = require('querystring');
|
|
10
9
|
|
|
11
10
|
const { Agent } = require('./agent');
|
|
12
11
|
|
|
13
|
-
const
|
|
12
|
+
const htmlEntities = require('html-entities');
|
|
14
13
|
|
|
15
14
|
const tagNameRegex = /<([a-zA-Z_-]+[0-9]*|!--)/gmi;
|
|
16
15
|
const attribRegex = /([^(/\s<'">)]+?)(?:\s*)=\s*(('|")([\s\S]*?)(?:(?=(\\?))\5.)*?\3|.+?(?=\/>|>|\?>|\s|<\/|$))/gmi;
|
|
@@ -222,7 +221,7 @@ function getXSSConstructs (data) {
|
|
|
222
221
|
if (!_.isEmpty(key) && (upperCaseAttribKey.startsWith('ON') || upperCaseAttribKey === 'SRC' || upperCaseAttribKey === 'HREF' ||
|
|
223
222
|
upperCaseAttribKey === 'ACTION' || upperCaseAttribKey === 'FORMACTION' || upperCaseAttribKey === 'SRCDOC' ||
|
|
224
223
|
upperCaseAttribKey === 'DATA' || decode(val).toUpperCase().replace(/\s/g, '').includes('JAVASCRIPT:') ||
|
|
225
|
-
|
|
224
|
+
htmlEntities.decode(val).toUpperCase().replace(/\s/g, '').includes('JAVASCRIPT:'))) {
|
|
226
225
|
isAttackConstruct = true;
|
|
227
226
|
}
|
|
228
227
|
} else {
|
|
@@ -11,8 +11,8 @@ if(process.platform == 'win32'){
|
|
|
11
11
|
AGENT_DIR = path.join(__dirname, "..\\..\\..\\");
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
process.env.applicationUUID = process.env.applicationUUID ||
|
|
14
|
+
const uuid = require('uuid');
|
|
15
|
+
process.env.applicationUUID = process.env.applicationUUID || uuid.v4();
|
|
16
16
|
|
|
17
17
|
module.exports = {
|
|
18
18
|
AGENT_DIR,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/security-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "New Relic Security Agent for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"jsonVersion": "1.0.1",
|
|
@@ -35,27 +35,27 @@
|
|
|
35
35
|
"url": "https://github.com/newrelic/csec-node-agent.git"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@aws-sdk/client-lambda": "3.
|
|
38
|
+
"@aws-sdk/client-lambda": "^3.348.0",
|
|
39
39
|
"axios": "0.21.4",
|
|
40
|
-
"check-disk-space": "^3.
|
|
41
|
-
"content-type": "^1.0.
|
|
42
|
-
"fast-safe-stringify": "^2.
|
|
40
|
+
"check-disk-space": "^3.4.0",
|
|
41
|
+
"content-type": "^1.0.5",
|
|
42
|
+
"fast-safe-stringify": "^2.1.1",
|
|
43
43
|
"find-package-json": "^1.2.0",
|
|
44
44
|
"hash.js": "^1.1.7",
|
|
45
|
-
"html-entities": "^
|
|
45
|
+
"html-entities": "^2.3.6",
|
|
46
46
|
"is-invalid-path": "^1.0.2",
|
|
47
47
|
"js-yaml": "^4.1.0",
|
|
48
|
-
"jsonschema": "^1.4.
|
|
48
|
+
"jsonschema": "^1.4.1",
|
|
49
49
|
"lodash": "^4.17.21",
|
|
50
|
-
"log4js": "^6.
|
|
50
|
+
"log4js": "^6.9.1",
|
|
51
51
|
"pretty-bytes": "^5.6.0",
|
|
52
|
-
"request-ip": "^
|
|
52
|
+
"request-ip": "^3.3.0",
|
|
53
53
|
"ringbufferjs": "^2.0.0",
|
|
54
|
-
"semver": "^
|
|
54
|
+
"semver": "^7.5.3",
|
|
55
55
|
"sync-request": "^6.1.0",
|
|
56
56
|
"unescape": "^1.0.1",
|
|
57
57
|
"unescape-js": "^1.1.4",
|
|
58
|
-
"uuid": "^
|
|
58
|
+
"uuid": "^9.0.0",
|
|
59
59
|
"ws": "^7.5.9"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"mongodb-memory-server": "^8.11.2",
|
|
82
82
|
"mongodb2": "npm:mongodb@^2.2.36",
|
|
83
83
|
"mongodb3": "npm:mongodb@^3.7.3",
|
|
84
|
-
"newrelic": "^
|
|
84
|
+
"newrelic": "^10.3.1",
|
|
85
85
|
"request": "^2.88.2",
|
|
86
86
|
"restify": "^11.1.0",
|
|
87
87
|
"sinon": "^15.0.0",
|