@newrelic/security-agent 0.7.0 → 1.1.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.
Files changed (90) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +20 -25
  3. package/README.md +16 -2
  4. package/lib/instrumentation-security/core/constants.js +1 -1
  5. package/lib/instrumentation-security/core/event-constants.js +1 -1
  6. package/lib/instrumentation-security/core/grpc-utils.js +53 -0
  7. package/lib/instrumentation-security/core/request-manager.js +1 -1
  8. package/lib/instrumentation-security/core/route-manager.js +29 -6
  9. package/lib/instrumentation-security/core/sec-trace.js +1 -1
  10. package/lib/instrumentation-security/core/sec-utils.js +4 -4
  11. package/lib/instrumentation-security/core/security-metadata.js +1 -1
  12. package/lib/instrumentation-security/core/stack-trace.js +1 -1
  13. package/lib/instrumentation-security/hooks/@nestjs/nr-nestjs-core.js +1 -1
  14. package/lib/instrumentation-security/hooks/director/nr-director.js +1 -1
  15. package/lib/instrumentation-security/hooks/express/nr-express.js +3 -5
  16. package/lib/instrumentation-security/hooks/fastify/nr-fastify.js +1 -1
  17. package/lib/instrumentation-security/hooks/fs/nr-fs.js +1 -1
  18. package/lib/instrumentation-security/hooks/grpc-js/nr-grpc.js +284 -0
  19. package/lib/instrumentation-security/hooks/hapi/nr-hapi.js +1 -1
  20. package/lib/instrumentation-security/hooks/http/nr-http.js +1 -1
  21. package/lib/instrumentation-security/hooks/koa/@koa/nr-@koa-router.js +1 -1
  22. package/lib/instrumentation-security/hooks/ldap/nr-ldap.js +1 -1
  23. package/lib/instrumentation-security/hooks/mongodb/common.js +1 -1
  24. package/lib/instrumentation-security/hooks/mongodb/constants.js +1 -1
  25. package/lib/instrumentation-security/hooks/mongodb/nr-mongodb.js +1 -1
  26. package/lib/instrumentation-security/hooks/mongodb/v2-mongo.js +1 -1
  27. package/lib/instrumentation-security/hooks/mongodb/v3-mongo.js +1 -1
  28. package/lib/instrumentation-security/hooks/mongodb/v4-mongo.js +1 -1
  29. package/lib/instrumentation-security/hooks/mysql/nr-mysql.js +1 -1
  30. package/lib/instrumentation-security/hooks/native/nr-childProcess.js +1 -1
  31. package/lib/instrumentation-security/hooks/postgres/nr-postgres.js +1 -1
  32. package/lib/instrumentation-security/hooks/require/nr-require.js +1 -1
  33. package/lib/instrumentation-security/hooks/restify/nr-restify.js +1 -1
  34. package/lib/instrumentation-security/hooks/undici/nr-undici.js +139 -0
  35. package/lib/instrumentation-security/hooks/xpath/nr-xpath.js +1 -1
  36. package/lib/instrumentation-security/index.js +57 -1
  37. package/lib/nr-security-agent/index.js +1 -1
  38. package/lib/nr-security-agent/lib/core/Auth-headers.js +1 -1
  39. package/lib/nr-security-agent/lib/core/ContainerProperties.js +1 -1
  40. package/lib/nr-security-agent/lib/core/ECSProperties.js +1 -1
  41. package/lib/nr-security-agent/lib/core/FuzzFailEvent.js +1 -1
  42. package/lib/nr-security-agent/lib/core/LinkingMetadata.js +1 -1
  43. package/lib/nr-security-agent/lib/core/LogMessage.js +1 -1
  44. package/lib/nr-security-agent/lib/core/PodProperties.js +1 -1
  45. package/lib/nr-security-agent/lib/core/Policy.js +1 -1
  46. package/lib/nr-security-agent/lib/core/agent-status.js +1 -1
  47. package/lib/nr-security-agent/lib/core/agent.js +1 -1
  48. package/lib/nr-security-agent/lib/core/apiEndpoints.js +29 -0
  49. package/lib/nr-security-agent/lib/core/applicationinfo.js +1 -1
  50. package/lib/nr-security-agent/lib/core/commonUtils.js +5 -5
  51. package/lib/nr-security-agent/lib/core/connections/aws-lambda-client.js +1 -1
  52. package/lib/nr-security-agent/lib/core/connections/grpcClient.js +111 -0
  53. package/lib/nr-security-agent/lib/core/connections/restclient.js +1 -1
  54. package/lib/nr-security-agent/lib/core/connections/websocket/index.js +1 -1
  55. package/lib/nr-security-agent/lib/core/connections/websocket/response/IASTUtils.js +1 -1
  56. package/lib/nr-security-agent/lib/core/connections/websocket/response/collecotor-policy-error-handler.js +1 -1
  57. package/lib/nr-security-agent/lib/core/connections/websocket/response/collector-policy-handler.js +1 -1
  58. package/lib/nr-security-agent/lib/core/connections/websocket/response/fuzz-request-handler.js +32 -12
  59. package/lib/nr-security-agent/lib/core/connections/websocket/response/iast-cool-down.js +1 -1
  60. package/lib/nr-security-agent/lib/core/connections/websocket/response/iast-record-deletion.js +1 -1
  61. package/lib/nr-security-agent/lib/core/connections/websocket/response/index.js +1 -1
  62. package/lib/nr-security-agent/lib/core/connections/websocket/response/no-op-handler.js +1 -1
  63. package/lib/nr-security-agent/lib/core/connections/websocket/response/startup-handshake-handler.js +4 -1
  64. package/lib/nr-security-agent/lib/core/connections/websocket/response/unsupported-agent-handler.js +1 -1
  65. package/lib/nr-security-agent/lib/core/connections/websocket/response/ws-reconnect.js +1 -1
  66. package/lib/nr-security-agent/lib/core/connections/websocket/websocket.js +1 -1
  67. package/lib/nr-security-agent/lib/core/event-stats.js +1 -1
  68. package/lib/nr-security-agent/lib/core/event.js +7 -2
  69. package/lib/nr-security-agent/lib/core/health-check.js +1 -1
  70. package/lib/nr-security-agent/lib/core/json-file-handler.js +1 -1
  71. package/lib/nr-security-agent/lib/core/jsonValidator.js +1 -1
  72. package/lib/nr-security-agent/lib/core/lambda-delegated-task-service.js +1 -1
  73. package/lib/nr-security-agent/lib/core/logging.js +6 -6
  74. package/lib/nr-security-agent/lib/core/sec-agent-constants.js +1 -1
  75. package/lib/nr-security-agent/lib/core/sec-util.js +1 -1
  76. package/lib/nr-security-agent/lib/core/sha-size-util.js +1 -1
  77. package/lib/nr-security-agent/lib/core/sha_worker.js +1 -1
  78. package/lib/nr-security-agent/lib/core/startup-config.js +1 -1
  79. package/lib/nr-security-agent/lib/core/statusUtils.js +3 -3
  80. package/lib/nr-security-agent/lib/core/timeunit.js +1 -1
  81. package/lib/nr-security-agent/lib/core/websocket-client.js +11 -2
  82. package/lib/nr-security-agent/lib/core/xss-utils.js +1 -1
  83. package/lib/nr-security-agent/lib/models/lambda-delegated-task/constants.js +1 -1
  84. package/lib/nr-security-agent/lib/models/lambda-delegated-task/index.js +1 -1
  85. package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-sha-calculation.js +1 -1
  86. package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-task-base.js +1 -1
  87. package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-task-type.js +1 -1
  88. package/lib/nr-security-agent/resources/config.js +1 -1
  89. package/lib/nr-security-api/index.js +1 -1
  90. package/package.json +7 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ### v1.1.0 (2024-03-19)
2
+ #### Features
3
+ * IAST support for grpc
4
+ * Functionality to report API endpoints of the application
5
+ * IAST support for undici
6
+ #### Bug fixes
7
+ * Updated permissions for file/directory created by security agent
8
+ #### Miscellaneous chores
9
+ * Bumped follow-redirects from v1.15.2 to v1.15.4
10
+ * Updated axios to v1.6.8
11
+ * Bumped ip from v2.0.0 to v2.0.1
12
+ * Bumped undici from 5.28.2 to v5.28.3
13
+ * Readme update
14
+
15
+ ### v1.0.1 (2024-02-07)
16
+ #### Bug fixes
17
+ * Reporting of framework in security event json
18
+ #### Miscellaneous chores
19
+ * Updated software license to New Relic Software License Version 1.0
20
+ * Ability to send critical messages on successful startup of agent
21
+ * Updated Copyright headers
22
+ * Updated license in readme
23
+
1
24
  ### v0.7.0 (2024-01-18)
2
25
  #### Features
3
26
  * Handling to exclude unsupported content types from rxss processing
package/LICENSE CHANGED
@@ -1,43 +1,38 @@
1
- ## New Relic Pre-Release Software Notice
1
+ ## New Relic Software License v1.0
2
2
 
3
3
  ### Acceptance
4
4
 
5
- This software license applies to the repositories, directories, or files that it has been associated with (referred to here as the “Pre-Release Software”). In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
6
- License
5
+ This software license applies to the repositories, directories, or files that it has been associated with (referred to here as “the Software”). In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
7
6
 
8
- New Relic, Inc. (“New Relic”) grants you a license under its copyrights and patents to do everything necessary for you to use the Pre-Release Software for the Permitted Purposes and subject to your compliance with the Confidentiality terms and all other Restrictions on Use. All other uses are prohibited.
7
+ ### License
9
8
 
10
- ### Permitted Purposes
11
-
12
- The Pre-Release Software is solely for use with New Relic’s proprietary SaaS service (“New Relic Service”). To use the Pre-Release Software you must have a valid and active subscription agreement to the New Relic Service. You may not use the Pre-Release Software in conjunction with any other similar service.
13
-
14
- Use of the Pre-Release Software is limited to evaluation and feedback, including pull requests, of the pre-release features and capabilities. The use of the Pre-Release Software requires a signed New Relic Pre-Release Agreement. The New Relic Pre-Release Agreement will control in event of a conflict with this license. The Pre-Release Software is also subject to the New Relic pre-release policy. A copy of the New Relic Pre-release policy available at https://docs.newrelic.com/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy/.
9
+ New Relic grants you a license for the Software to do everything you might do with the Software that would otherwise infringe the New Relic’s copyrights or patent rights, conditional on only using the Software for Permitted Purposes and compliance with all other Restrictions on Use. All other uses are prohibited.
15
10
 
16
- ### Confidentiality
11
+ ### Permitted Purposes
17
12
 
18
- Any Pre-Release Software not posted publicly contains New Relic Trade Secrets. You may not disclose the features and capabilities of the Pre-Release Software to any third party by any means. You will use commercially reasonable measures to maintain the secrecy of the features and capabilities of the Pre-Release Software. Without limiting the permissions you receive under any open source software (“OSS”) license, you may not disclose the source code of any OSS included as part of the Pre-Release Software in a way that discloses the New Relic Trade Secrets.
13
+ The Software is solely for use with New Relic’s proprietary SaaS service (“New Relic Service”). To use the Software you must have a valid and active subscription agreement to the New Relic Service. You may not use the Software in conjunction with any other similar service.
19
14
 
20
- ### Restrictions on Use
15
+ ### Restrictions on Use
21
16
 
22
- 1. The use of the Pre-Release Software is limited to you and your organization. You cannot expose the Pre-Release Software to third parties via the network or use the Pre-Release Software on behalf of anyone else.
23
- 2. You cannot modify the Pre-Release Software. You can compile or link the Pre-Release Software into your programs as described in the New Relic Documentation, but you cannot otherwise make any derivative works of the Pre-Release Software.
24
- 3. You cannot reverse engineer or decompile the Pre-Release Software.
25
- 4. You cannot use the Pre-Release Software for competitive analysis, benchmarking, or any purposes that compete with or are intended to compete with New Relic.
26
- 5. You cannot remove or obscure any proprietary notices in the Pre-Release Software.
27
- 6. You can only copy the Software to the extent needed to use the Pre-Release Software within your organization. You cannot distribute the Software to any third parties.
28
- 7. You can only use the New Relic Services and the Pre-Release Software consistent with New Relic’s product Documentation and Acceptable Use Policy.
17
+ 1. The use of the Software is limited to you and your organization. You cannot expose the Software to third parties via the network or use the Software on behalf of anyone else.
18
+ 2. You cannot modify the Software. You can compile or link the Software into your programs as described in the New Relic Documentation, but you cannot otherwise make any derivative works of the Software.
19
+ 3. You cannot reverse engineer or decompile the Software.
20
+ 4. You cannot use the Software for competitive analysis, benchmarking, or any purposes that compete with or are intended to compete with New Relic.
21
+ 5. You cannot remove or obscure any proprietary notices in the Software.
22
+ 6. You can only copy the Software to the extent needed to use the Software within your organization. You cannot distribute the Software to any third parties.
23
+ 7. You can only use the New Relic Services and the Software consistent with your subscription agreement with New Relic, New Relic’s product Documentation and Acceptable Use Policy.
29
24
 
30
25
  ### Intellectual Property
31
26
 
32
- Any feedback provided to New Relic about the Pre-Release Software, including feedback provided as source code, comments, or other copyrightable or patentable material, is provided to New Relic under the terms of the Apache Software License, version 2. If you do not provide attribution information or a copy of the license with your feedback, you waive the performance of those requirements of the Apache License with respect to New Relic. The license grant regarding any feedback is irrevocable and persists past the termination of this license.
27
+ Any feedback provided to New Relic about the Software, including feedback provided as source code, comments, or other copyrightable or patentable material, is provided to New Relic under the terms of the Apache Software License, version 2. If you do not provide attribution information or a copy of the license with your feedback, you waive the performance of those requirements of the Apache License with respect to New Relic. The license grant regarding any feedback is irrevocable and persists past the termination of this license.
33
28
 
34
29
  ### Termination
35
30
 
36
- This license terminates when the Pre-Release Software stops being provided by New Relic or when described by the New Relic Pre-Release Agreement, whichever comes first. When this license terminates, you have a commercially reasonable time to either remove the Pre-Release Software from your systems or to upgrade to a publicly released version of the Software.
31
+ This license terminates when the Software stops being provided by New Relic or when described by the New Relic subscription agreement, whichever comes first. When this license terminates, you have a commercially reasonable time to either remove the Software from your systems.
37
32
 
38
33
  ### Other Terms
39
34
 
40
- 1. The Pre-Release Software is provided “AS IS.” New Relic disclaims all warranties, whether express, implied, statutory or otherwise, including warranties of merchantability, fitness for a particular purpose, title and noninfringement.
41
- 2. The Pre-Release Software has known flaws. You use the Pre-Release Software at your own risk.
42
- 3. To the full extent permitted by law, New Relic will have no liability arising from or related to the Pre-Release Software or from this license for any direct, indirect, special, incidental, or consequential damages of any kind, even if advised of their possibility in advance, and regardless of legal theory (whether contract, tort, negligence, strict liability or otherwise).
43
- 4. The Pre-Release Software may contain third-party software, including open source software. The third party software is governed by its own license and subject to its own terms, disclosed in the provided licensing information associated with the third party components. If a source code disclosure is required under the terms of the license covering any OSS component, the source code can be requested of New Relic by emailing opensource@newrelic.com.
35
+ 1. The Software is provided “AS IS.” New Relic disclaims all warranties, whether express, implied, statutory or otherwise, including warranties of merchantability, fitness for a particular purpose, title, and noninfringement.
36
+ 2. To the full extent permitted by law, New Relic will have no liability arising from or related to the Software or from this license for any direct, indirect, special, incidental, or consequential damages of any kind, even if advised of their possibility in advance, and regardless of legal theory (whether contract, tort, negligence, strict liability or otherwise).
37
+ 3. The Software may contain third-party software, including open source software (“OSS”). The third party software is governed by its own license and subject to its own terms, disclosed in the provided licensing information associated with the third party components. If a source code disclosure is required under the terms of the license covering any OSS component, the source code can be requested of New Relic by emailing opensource@newrelic.com.
38
+
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  **Note**: The IAST capability should only be used in pre-production environments as the application is tested for real exploitable vulnerabilities.
5
5
 
6
- The New Relic security agent is in preview and is not generally available. This module enables instrumentation of a Node.js application for interactive application security testing(IAST) and exposes exploitable vulnerabilities.
6
+ The New Relic security agent enables instrumentation of a Node.js application for Interactive Application Security Testing(IAST) and exposes exploitable vulnerabilities.
7
7
 
8
8
  ## Installation
9
9
 
@@ -67,9 +67,23 @@ The [Developer docs](http://newrelic.github.io/node-newrelic/) for writing instr
67
67
  - [ldapts](https://www.npmjs.com/package/ldapts)(2.x and above)
68
68
  - [xpath](https://www.npmjs.com/package/xpath)(0.0.20 and above)
69
69
  - [xpath.js](https://www.npmjs.com/package/xpath.js)(0.0.1 and above)
70
+ - [undici](https://www.npmjs.com/package/undici)(4.7.0 and above)
71
+ - [@grpc/grpc-js](https://www.npmjs.com/package/@grpc/grpc-js)(1.4.x and above)
70
72
 
71
73
  For more information, please see New Relic Node.js agent [compatibility and requirements](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent/).
72
74
 
75
+ ### Supported Vulnerabilities
76
+ - Remote Code Execution
77
+ - SQL Injection
78
+ - NoSQL Injection
79
+ - Stored XSS
80
+ - Reflected XSS
81
+ - Reverse Shell attack
82
+ - File Access
83
+ - SSRF
84
+ - Application Integrity Violation
85
+ - LDAP Injection
86
+ - XPath Injection
73
87
  ## Testing
74
88
 
75
89
  The module includes a suite of unit and functional tests which should be used to
@@ -99,7 +113,7 @@ If you believe you have found a security vulnerability in this project or any of
99
113
  If you would like to contribute to this project, review [these guidelines](https://github.com/newrelic/csec-node-agent/blob/main/CONTRIBUTING.md).
100
114
 
101
115
  ## License
102
- The New Relic security agent is licensed under the New Relic Pre-Release Software Notice.
116
+ The New Relic security agent is licensed under the New Relic Software License v1.0.
103
117
  The `@newrelic/security-agent` also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.
104
118
 
105
119
  [1]: https://img.shields.io/npm/v/@newrelic/security-agent.svg
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*
3
3
  * Copyright 2023 New Relic Corporation. All rights reserved.
4
- * SPDX-License-Identifier: New Relic Pre-Release
4
+ * SPDX-License-Identifier: New Relic Software License v1.0
5
5
  */
6
6
 
7
7
  'use strict';
@@ -1,7 +1,7 @@
1
1
 
2
2
  /*
3
3
  * Copyright 2023 New Relic Corporation. All rights reserved.
4
- * SPDX-License-Identifier: New Relic Pre-Release
4
+ * SPDX-License-Identifier: New Relic Software License v1.0
5
5
  */
6
6
 
7
7
  const EVENT_TYPE = {
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Copyright 2023 New Relic Corporation. All rights reserved.
3
+ * SPDX-License-Identifier: New Relic Pre-Release
4
+ */
5
+
6
+
7
+ const grpcServiceMap = new Map();
8
+ const grpcMethodMap = new Map();
9
+ /**
10
+ * Utility to set service based on key value pair
11
+ * @param {*} key
12
+ * @param {*} value
13
+ */
14
+ function setService(key, value){
15
+ grpcServiceMap.set(key,value);
16
+ }
17
+
18
+ /**
19
+ * Utility to get service corresponding to key
20
+ * @param {*} key
21
+ * @returns
22
+ */
23
+ function getService(key){
24
+ return grpcServiceMap.get(key);
25
+ }
26
+
27
+ /**
28
+ * Utility to set method object
29
+ * @param {*} key
30
+ * @param {*} value
31
+ */
32
+ function setMethod(key, value){
33
+ grpcMethodMap.set(key,value);
34
+ }
35
+
36
+ /**
37
+ * Utility to get method object
38
+ * @param {*} key
39
+ * @returns
40
+ */
41
+ function getMethod(key){
42
+ return grpcMethodMap.get(key);
43
+ }
44
+
45
+ module.exports={
46
+ setService,
47
+ getService,
48
+ grpcServiceMap,
49
+ setMethod,
50
+ getMethod,
51
+ grpcMethodMap
52
+
53
+ }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  const requestMap = new Map();
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
 
@@ -10,8 +10,8 @@ const routeMap = new Map();
10
10
  * @param {*} key
11
11
  * @param {*} value
12
12
  */
13
- function setRoute(key, value){
14
- routeMap.set(key,value);
13
+ function setRoute(key, value) {
14
+ routeMap.set(key, value);
15
15
  }
16
16
 
17
17
  /**
@@ -19,12 +19,35 @@ function setRoute(key, value){
19
19
  * @param {*} key
20
20
  * @returns
21
21
  */
22
- function getRoute(key){
22
+ function getRoute(key) {
23
23
  return routeMap.get(key);
24
24
  }
25
25
 
26
- module.exports={
26
+ /**
27
+ * Utility to get all api end points
28
+ * @returns all keys from routeMap
29
+ */
30
+ function getAllAPIEndPoints() {
31
+ let apiEndpoints = [];
32
+ try {
33
+ routeMap.forEach((value, key) => {
34
+ let obj = {};
35
+ let splitted = key.split('@');
36
+ obj.method = splitted[0];
37
+ obj.path = splitted[1];
38
+ obj.handler = routeMap.get(key);
39
+ apiEndpoints.push(obj);
40
+ })
41
+ } catch (error) {
42
+
43
+ }
44
+
45
+ return apiEndpoints;
46
+ }
47
+
48
+ module.exports = {
27
49
  getRoute,
28
50
  setRoute,
29
- routeMap
51
+ routeMap,
52
+ getAllAPIEndPoints
30
53
  }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  const path = require('path');
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  const stackTraceModule = require('./stack-trace');
@@ -150,11 +150,11 @@ function getExecutionId(){
150
150
  function createPathIfNotExist (dir) {
151
151
  try {
152
152
  if (!fs.existsSync(dir)) {
153
- fs.mkdirSync(dir, 777, { recursive: true });
153
+ fs.mkdirSync(dir, 770, { recursive: true });
154
154
  logger.info(dir + ' Created');
155
- fs.chmodSync(dir, 0o777);
155
+ fs.chmodSync(dir, 0o770);
156
156
  } else {
157
- fs.chmodSync(dir, 0o777);
157
+ fs.chmodSync(dir, 0o770);
158
158
  logger.debug(dir + ' Already Exists');
159
159
  }
160
160
  } catch (error) {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  'use strict';
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  'use strict'
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  'use strict'
@@ -27,9 +27,8 @@ module.exports = function initialize(shim, express, moduleName) {
27
27
 
28
28
  if (express.Router.use) {
29
29
  wrapExpress4(shim, express)
30
- } else {
31
- // wrapExpress3(shim, express)
32
- }
30
+ }
31
+
33
32
  }
34
33
 
35
34
  /**
@@ -57,7 +56,6 @@ function wrapExpress4(shim, express) {
57
56
  }
58
57
  })
59
58
 
60
-
61
59
  //Wrapper to hook process_params method to extract out path param and query params.
62
60
  shim.wrap(express.Router, 'process_params', function wrapParam(shim, fn) {
63
61
  if (!shim.isFunction(fn)) {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  'use strict'
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Copyright 2023 New Relic Corporation. All rights reserved.
3
- * SPDX-License-Identifier: New Relic Pre-Release
3
+ * SPDX-License-Identifier: New Relic Software License v1.0
4
4
  */
5
5
 
6
6
  module.exports = initialize;