@newrelic/security-agent 0.7.0 → 1.0.1

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 (85) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +20 -25
  3. package/README.md +13 -1
  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/request-manager.js +1 -1
  7. package/lib/instrumentation-security/core/route-manager.js +1 -1
  8. package/lib/instrumentation-security/core/sec-trace.js +1 -1
  9. package/lib/instrumentation-security/core/sec-utils.js +1 -1
  10. package/lib/instrumentation-security/core/security-metadata.js +1 -1
  11. package/lib/instrumentation-security/core/stack-trace.js +1 -1
  12. package/lib/instrumentation-security/hooks/@nestjs/nr-nestjs-core.js +1 -1
  13. package/lib/instrumentation-security/hooks/director/nr-director.js +1 -1
  14. package/lib/instrumentation-security/hooks/express/nr-express.js +1 -1
  15. package/lib/instrumentation-security/hooks/fastify/nr-fastify.js +1 -1
  16. package/lib/instrumentation-security/hooks/fs/nr-fs.js +1 -1
  17. package/lib/instrumentation-security/hooks/hapi/nr-hapi.js +1 -1
  18. package/lib/instrumentation-security/hooks/http/nr-http.js +1 -1
  19. package/lib/instrumentation-security/hooks/koa/@koa/nr-@koa-router.js +1 -1
  20. package/lib/instrumentation-security/hooks/ldap/nr-ldap.js +1 -1
  21. package/lib/instrumentation-security/hooks/mongodb/common.js +1 -1
  22. package/lib/instrumentation-security/hooks/mongodb/constants.js +1 -1
  23. package/lib/instrumentation-security/hooks/mongodb/nr-mongodb.js +1 -1
  24. package/lib/instrumentation-security/hooks/mongodb/v2-mongo.js +1 -1
  25. package/lib/instrumentation-security/hooks/mongodb/v3-mongo.js +1 -1
  26. package/lib/instrumentation-security/hooks/mongodb/v4-mongo.js +1 -1
  27. package/lib/instrumentation-security/hooks/mysql/nr-mysql.js +1 -1
  28. package/lib/instrumentation-security/hooks/native/nr-childProcess.js +1 -1
  29. package/lib/instrumentation-security/hooks/postgres/nr-postgres.js +1 -1
  30. package/lib/instrumentation-security/hooks/require/nr-require.js +1 -1
  31. package/lib/instrumentation-security/hooks/restify/nr-restify.js +1 -1
  32. package/lib/instrumentation-security/hooks/xpath/nr-xpath.js +1 -1
  33. package/lib/instrumentation-security/index.js +1 -1
  34. package/lib/nr-security-agent/index.js +1 -1
  35. package/lib/nr-security-agent/lib/core/Auth-headers.js +1 -1
  36. package/lib/nr-security-agent/lib/core/ContainerProperties.js +1 -1
  37. package/lib/nr-security-agent/lib/core/ECSProperties.js +1 -1
  38. package/lib/nr-security-agent/lib/core/FuzzFailEvent.js +1 -1
  39. package/lib/nr-security-agent/lib/core/LinkingMetadata.js +1 -1
  40. package/lib/nr-security-agent/lib/core/LogMessage.js +1 -1
  41. package/lib/nr-security-agent/lib/core/PodProperties.js +1 -1
  42. package/lib/nr-security-agent/lib/core/Policy.js +1 -1
  43. package/lib/nr-security-agent/lib/core/agent-status.js +1 -1
  44. package/lib/nr-security-agent/lib/core/agent.js +1 -1
  45. package/lib/nr-security-agent/lib/core/applicationinfo.js +1 -1
  46. package/lib/nr-security-agent/lib/core/commonUtils.js +1 -1
  47. package/lib/nr-security-agent/lib/core/connections/aws-lambda-client.js +1 -1
  48. package/lib/nr-security-agent/lib/core/connections/restclient.js +1 -1
  49. package/lib/nr-security-agent/lib/core/connections/websocket/index.js +1 -1
  50. package/lib/nr-security-agent/lib/core/connections/websocket/response/IASTUtils.js +1 -1
  51. package/lib/nr-security-agent/lib/core/connections/websocket/response/collecotor-policy-error-handler.js +1 -1
  52. package/lib/nr-security-agent/lib/core/connections/websocket/response/collector-policy-handler.js +1 -1
  53. package/lib/nr-security-agent/lib/core/connections/websocket/response/fuzz-request-handler.js +1 -1
  54. package/lib/nr-security-agent/lib/core/connections/websocket/response/iast-cool-down.js +1 -1
  55. package/lib/nr-security-agent/lib/core/connections/websocket/response/iast-record-deletion.js +1 -1
  56. package/lib/nr-security-agent/lib/core/connections/websocket/response/index.js +1 -1
  57. package/lib/nr-security-agent/lib/core/connections/websocket/response/no-op-handler.js +1 -1
  58. package/lib/nr-security-agent/lib/core/connections/websocket/response/startup-handshake-handler.js +4 -1
  59. package/lib/nr-security-agent/lib/core/connections/websocket/response/unsupported-agent-handler.js +1 -1
  60. package/lib/nr-security-agent/lib/core/connections/websocket/response/ws-reconnect.js +1 -1
  61. package/lib/nr-security-agent/lib/core/connections/websocket/websocket.js +1 -1
  62. package/lib/nr-security-agent/lib/core/event-stats.js +1 -1
  63. package/lib/nr-security-agent/lib/core/event.js +7 -2
  64. package/lib/nr-security-agent/lib/core/health-check.js +1 -1
  65. package/lib/nr-security-agent/lib/core/json-file-handler.js +1 -1
  66. package/lib/nr-security-agent/lib/core/jsonValidator.js +1 -1
  67. package/lib/nr-security-agent/lib/core/lambda-delegated-task-service.js +1 -1
  68. package/lib/nr-security-agent/lib/core/logging.js +1 -1
  69. package/lib/nr-security-agent/lib/core/sec-agent-constants.js +1 -1
  70. package/lib/nr-security-agent/lib/core/sec-util.js +1 -1
  71. package/lib/nr-security-agent/lib/core/sha-size-util.js +1 -1
  72. package/lib/nr-security-agent/lib/core/sha_worker.js +1 -1
  73. package/lib/nr-security-agent/lib/core/startup-config.js +1 -1
  74. package/lib/nr-security-agent/lib/core/statusUtils.js +1 -1
  75. package/lib/nr-security-agent/lib/core/timeunit.js +1 -1
  76. package/lib/nr-security-agent/lib/core/websocket-client.js +1 -1
  77. package/lib/nr-security-agent/lib/core/xss-utils.js +1 -1
  78. package/lib/nr-security-agent/lib/models/lambda-delegated-task/constants.js +1 -1
  79. package/lib/nr-security-agent/lib/models/lambda-delegated-task/index.js +1 -1
  80. package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-sha-calculation.js +1 -1
  81. package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-task-base.js +1 -1
  82. package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-task-type.js +1 -1
  83. package/lib/nr-security-agent/resources/config.js +1 -1
  84. package/lib/nr-security-api/index.js +1 -1
  85. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### v1.0.1 (2024-02-07)
2
+ #### Bug fixes
3
+ * Reporting of framework in security event json
4
+ #### Miscellaneous chores
5
+ * Updated software license to New Relic Software License Version 1.0
6
+ * Ability to send critical messages on successful startup of agent
7
+ * Updated Copyright headers
8
+ * Updated license in readme
9
+
1
10
  ### v0.7.0 (2024-01-18)
2
11
  #### Features
3
12
  * 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
@@ -70,6 +70,18 @@ The [Developer docs](http://newrelic.github.io/node-newrelic/) for writing instr
70
70
 
71
71
  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
72
 
73
+ ### Supported Vulnerabilities
74
+ - Remote Code Execution
75
+ - SQL Injection
76
+ - NoSQL Injection
77
+ - Stored XSS
78
+ - Reflected XSS
79
+ - Reverse Shell attack
80
+ - File Access
81
+ - SSRF
82
+ - Application Integrity Violation
83
+ - LDAP Injection
84
+ - XPath Injection
73
85
  ## Testing
74
86
 
75
87
  The module includes a suite of unit and functional tests which should be used to
@@ -99,7 +111,7 @@ If you believe you have found a security vulnerability in this project or any of
99
111
  If you would like to contribute to this project, review [these guidelines](https://github.com/newrelic/csec-node-agent/blob/main/CONTRIBUTING.md).
100
112
 
101
113
  ## License
102
- The New Relic security agent is licensed under the New Relic Pre-Release Software Notice.
114
+ The New Relic security agent is licensed under the New Relic Software License v1.0.
103
115
  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
116
 
105
117
  [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 = {
@@ -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
 
@@ -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');
@@ -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'
@@ -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;
@@ -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
  module.exports = initialize
@@ -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
@@ -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
@@ -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";
@@ -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
 
@@ -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
  const requestManager = require("../../core/request-manager");
@@ -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;
@@ -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
  const requestManager = require('../../core/request-manager');
@@ -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
@@ -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
@@ -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 API = require('../nr-security-api');
@@ -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
  const API = require('../nr-security-api');
6
6
  const NRAgent = API.getNRAgent();
@@ -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 API = require('../../../nr-security-api');
@@ -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
  let containerProperties = undefined;
@@ -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
  let ecsProperties;
@@ -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 { BasicInfo } = require('./event');
@@ -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 API = require('../../../nr-security-api');
@@ -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 LinkingMetaData = require('./LinkingMetadata');
@@ -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
  let podProperties;
@@ -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 API = require('../../../nr-security-api');
@@ -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
  const SecAgentStatus = function () {
6
6
  if (Object.getPrototypeOf(this).constructor !== SecAgentStatus) {
@@ -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 { EventEmitter } = require('events');
@@ -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
  /* eslint-disable prefer-promise-reject-errors */
@@ -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 _ = require('lodash');
@@ -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 axios = require('axios').default;
@@ -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 {
@@ -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
  const { Agent } = require('../../../agent');
6
6
  let pendingRequestIds = new Set();
@@ -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
  let logger;
@@ -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
  let logger;
@@ -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
  /* eslint-disable no-unused-vars */
@@ -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
  let logger;
@@ -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
  let logger;
@@ -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 _ = require('lodash');
@@ -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
  let logger;
@@ -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 StartupConfig = require('../../../startup-config');
@@ -9,6 +9,7 @@ let logger = logs.getLogger();
9
9
  const initLogger = logs.getInitLogger();
10
10
  const LOG_MESSAGES = require('../../../sec-agent-constants').LOG_MESSAGES;
11
11
  const applicationInfoModule = require('../../../applicationinfo');
12
+ const LogMessage = require('../../../LogMessage');
12
13
 
13
14
  module.exports.handler = function handler(json) {
14
15
  try {
@@ -17,6 +18,8 @@ module.exports.handler = function handler(json) {
17
18
 
18
19
  initLogger.info(LOG_MESSAGES.AGENT_INIT_WITH_PROP, JSON.stringify(startupConfig.config));
19
20
  initLogger.info('Security Agent is now ACTIVE for', applicationInfoModule.getInstance().applicationUUID);
21
+ const logMessage = new LogMessage.logMessage("SEVERE", `Security Agent is ACTIVE for ${ applicationInfoModule.getInstance().applicationUUID}`, __filename, null);
22
+ require('../../../commonUtils').addLogEventtoBuffer(logMessage);
20
23
 
21
24
  } catch (error) {
22
25
  logger.error(LOG_MESSAGES.PARSING_EXP_WELCOME_MSG, 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
  const agentStatus = require('../../../agent-status');
@@ -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
  let logger;
@@ -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
  let eventStats = undefined;
@@ -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';
@@ -24,7 +24,12 @@ function BasicInfo() {
24
24
  this.jsonVersion = AGENT_VERSION;
25
25
  this.collectorType = COLLECTOR_TYPE;
26
26
  this.language = LANGUAGE;
27
- this.framework = EMPTY_STR;
27
+ try {
28
+ let framework = NRAgent.environment.get('Framework')[0];
29
+ this.framework = framework ? framework : EMPTY_STR;
30
+ } catch (error) {
31
+ this.framework = EMPTY_STR;
32
+ }
28
33
  this.groupName = commonUtils.getCSECmode();
29
34
  this.policyVersion = (!lodash.isEmpty(policyManager.getInstance().data)) ? policyManager.getInstance().data.version : 'DEFAULT';
30
35
 
@@ -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
  const fs = require('fs');
@@ -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 Validator = require('jsonschema').Validator;
@@ -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 { Agent } = require('./agent');
@@ -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
  '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
  const { workerData, parentPort } = require('worker_threads');
@@ -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
  let startupConfig = undefined;
@@ -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
  /* eslint-disable new-cap */
@@ -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
 
@@ -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
  const _ = require('lodash');
@@ -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 CSEC_CALCULATING_APPLICATION_SHA = 'CSEC_CALCULATING_APPLICATION_SHA';
@@ -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 { LambdaDelegatedTaskType } = require('./lambda-delegated-task-type');
@@ -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 { LambdaDelegatedTaskBase } = require('./lambda-delegated-task-base');
@@ -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
  // eslint-disable-next-line no-unused-vars
@@ -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 SHA_CALCULATION = 'sha_calculation';
@@ -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
  const { platform } = require('os');
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
  let newrelic;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/security-agent",
3
- "version": "0.7.0",
3
+ "version": "1.0.1",
4
4
  "description": "New Relic Security Agent for Node.js",
5
5
  "main": "index.js",
6
6
  "jsonVersion": "1.1.1",
@@ -29,7 +29,7 @@
29
29
  "Node.js Application Security"
30
30
  ],
31
31
  "author": "newrelic",
32
- "license": "New Relic Pre-Release",
32
+ "license": "New Relic Software License v1.0",
33
33
  "repository": {
34
34
  "type": "git",
35
35
  "url": "https://github.com/newrelic/csec-node-agent.git"