@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.
- package/CHANGELOG.md +9 -0
- package/LICENSE +20 -25
- package/README.md +13 -1
- package/lib/instrumentation-security/core/constants.js +1 -1
- package/lib/instrumentation-security/core/event-constants.js +1 -1
- package/lib/instrumentation-security/core/request-manager.js +1 -1
- package/lib/instrumentation-security/core/route-manager.js +1 -1
- package/lib/instrumentation-security/core/sec-trace.js +1 -1
- package/lib/instrumentation-security/core/sec-utils.js +1 -1
- package/lib/instrumentation-security/core/security-metadata.js +1 -1
- package/lib/instrumentation-security/core/stack-trace.js +1 -1
- package/lib/instrumentation-security/hooks/@nestjs/nr-nestjs-core.js +1 -1
- package/lib/instrumentation-security/hooks/director/nr-director.js +1 -1
- package/lib/instrumentation-security/hooks/express/nr-express.js +1 -1
- package/lib/instrumentation-security/hooks/fastify/nr-fastify.js +1 -1
- package/lib/instrumentation-security/hooks/fs/nr-fs.js +1 -1
- package/lib/instrumentation-security/hooks/hapi/nr-hapi.js +1 -1
- package/lib/instrumentation-security/hooks/http/nr-http.js +1 -1
- package/lib/instrumentation-security/hooks/koa/@koa/nr-@koa-router.js +1 -1
- package/lib/instrumentation-security/hooks/ldap/nr-ldap.js +1 -1
- package/lib/instrumentation-security/hooks/mongodb/common.js +1 -1
- package/lib/instrumentation-security/hooks/mongodb/constants.js +1 -1
- package/lib/instrumentation-security/hooks/mongodb/nr-mongodb.js +1 -1
- package/lib/instrumentation-security/hooks/mongodb/v2-mongo.js +1 -1
- package/lib/instrumentation-security/hooks/mongodb/v3-mongo.js +1 -1
- package/lib/instrumentation-security/hooks/mongodb/v4-mongo.js +1 -1
- package/lib/instrumentation-security/hooks/mysql/nr-mysql.js +1 -1
- package/lib/instrumentation-security/hooks/native/nr-childProcess.js +1 -1
- package/lib/instrumentation-security/hooks/postgres/nr-postgres.js +1 -1
- package/lib/instrumentation-security/hooks/require/nr-require.js +1 -1
- package/lib/instrumentation-security/hooks/restify/nr-restify.js +1 -1
- package/lib/instrumentation-security/hooks/xpath/nr-xpath.js +1 -1
- package/lib/instrumentation-security/index.js +1 -1
- package/lib/nr-security-agent/index.js +1 -1
- package/lib/nr-security-agent/lib/core/Auth-headers.js +1 -1
- package/lib/nr-security-agent/lib/core/ContainerProperties.js +1 -1
- package/lib/nr-security-agent/lib/core/ECSProperties.js +1 -1
- package/lib/nr-security-agent/lib/core/FuzzFailEvent.js +1 -1
- package/lib/nr-security-agent/lib/core/LinkingMetadata.js +1 -1
- package/lib/nr-security-agent/lib/core/LogMessage.js +1 -1
- package/lib/nr-security-agent/lib/core/PodProperties.js +1 -1
- package/lib/nr-security-agent/lib/core/Policy.js +1 -1
- package/lib/nr-security-agent/lib/core/agent-status.js +1 -1
- package/lib/nr-security-agent/lib/core/agent.js +1 -1
- package/lib/nr-security-agent/lib/core/applicationinfo.js +1 -1
- package/lib/nr-security-agent/lib/core/commonUtils.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/aws-lambda-client.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/restclient.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/index.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/IASTUtils.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/collecotor-policy-error-handler.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/collector-policy-handler.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/fuzz-request-handler.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/iast-cool-down.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/iast-record-deletion.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/index.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/no-op-handler.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/startup-handshake-handler.js +4 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/unsupported-agent-handler.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/response/ws-reconnect.js +1 -1
- package/lib/nr-security-agent/lib/core/connections/websocket/websocket.js +1 -1
- package/lib/nr-security-agent/lib/core/event-stats.js +1 -1
- package/lib/nr-security-agent/lib/core/event.js +7 -2
- package/lib/nr-security-agent/lib/core/health-check.js +1 -1
- package/lib/nr-security-agent/lib/core/json-file-handler.js +1 -1
- package/lib/nr-security-agent/lib/core/jsonValidator.js +1 -1
- package/lib/nr-security-agent/lib/core/lambda-delegated-task-service.js +1 -1
- package/lib/nr-security-agent/lib/core/logging.js +1 -1
- package/lib/nr-security-agent/lib/core/sec-agent-constants.js +1 -1
- package/lib/nr-security-agent/lib/core/sec-util.js +1 -1
- package/lib/nr-security-agent/lib/core/sha-size-util.js +1 -1
- package/lib/nr-security-agent/lib/core/sha_worker.js +1 -1
- package/lib/nr-security-agent/lib/core/startup-config.js +1 -1
- package/lib/nr-security-agent/lib/core/statusUtils.js +1 -1
- package/lib/nr-security-agent/lib/core/timeunit.js +1 -1
- package/lib/nr-security-agent/lib/core/websocket-client.js +1 -1
- package/lib/nr-security-agent/lib/core/xss-utils.js +1 -1
- package/lib/nr-security-agent/lib/models/lambda-delegated-task/constants.js +1 -1
- package/lib/nr-security-agent/lib/models/lambda-delegated-task/index.js +1 -1
- package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-sha-calculation.js +1 -1
- package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-task-base.js +1 -1
- package/lib/nr-security-agent/lib/models/lambda-delegated-task/lambda-delegated-task-type.js +1 -1
- package/lib/nr-security-agent/resources/config.js +1 -1
- package/lib/nr-security-api/index.js +1 -1
- 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
|
|
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
|
|
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
|
-
|
|
7
|
+
### License
|
|
9
8
|
|
|
10
|
-
|
|
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
|
-
###
|
|
11
|
+
### Permitted Purposes
|
|
17
12
|
|
|
18
|
-
|
|
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
|
|
23
|
-
2. You cannot modify the
|
|
24
|
-
3. You cannot reverse engineer or decompile the
|
|
25
|
-
4. You cannot use the
|
|
26
|
-
5. You cannot remove or obscure any proprietary notices in the
|
|
27
|
-
6. You can only copy the Software to the extent needed to use the
|
|
28
|
-
7. You can only use the New Relic Services and the
|
|
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
|
|
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
|
|
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
|
|
41
|
-
2.
|
|
42
|
-
3.
|
|
43
|
-
|
|
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
|
|
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,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright 2023 New Relic Corporation. All rights reserved.
|
|
3
|
-
* SPDX-License-Identifier: New Relic
|
|
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) {
|
package/lib/nr-security-agent/lib/core/connections/websocket/response/startup-handshake-handler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright 2023 New Relic Corporation. All rights reserved.
|
|
3
|
-
* SPDX-License-Identifier: New Relic
|
|
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
|
|
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
|
-
|
|
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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/security-agent",
|
|
3
|
-
"version": "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
|
|
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"
|