@newrelic/security-agent 0.0.5 → 0.0.7
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 +8 -0
- package/README.md +2 -4
- package/index.js +1 -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/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 +2 -2
- package/lib/nr-security-agent/lib/core/commonUtils.js +2 -2
- 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/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 +2 -2
- 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 +1 -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.js +1 -1
- 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 +2 -2
- package/lib/nr-security-agent/lib/core/worker-entities.js +1 -1
- package/lib/nr-security-agent/lib/core/worker.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 +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
### v0.0.7
|
|
2
|
+
* Updated copyright header in source files
|
|
3
|
+
* ReadMe update
|
|
4
|
+
* Minor logging update
|
|
5
|
+
### v0.0.6
|
|
6
|
+
* Updated default fuzz host to 0.0.0.0
|
|
7
|
+
* Handling to get custom certificate path from config instead of environment variable
|
|
8
|
+
|
|
1
9
|
### v0.0.5
|
|
2
10
|
* Updated README file
|
|
3
11
|
* Init logging update
|
package/README.md
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<a href="https://opensource.newrelic.com/oss-category/#community-plus"><picture><source media="(prefers-color-scheme: dark)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Community_Plus.png"><source media="(prefers-color-scheme: light)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"><img alt="New Relic Open Source community plus project banner." src="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"></picture></a>
|
|
2
|
-
|
|
3
1
|
# New Relic Node.js security agent
|
|
4
2
|
[![npm status badge][1]][2] [![Security Agent CI][3]][4]
|
|
5
3
|
|
|
@@ -44,7 +42,7 @@ The `@newrelic/security-agent` must be explicitly enabled in order to perform IA
|
|
|
44
42
|
The [Developer docs](http://newrelic.github.io/node-newrelic/) for writing instrumentation will be of help. We particularly recommend the [tutorials](https://newrelic.github.io/node-newrelic/tutorial-Instrumentation-Basics.html) and the [shim API](https://newrelic.github.io/node-newrelic/Shim.html) documentation.
|
|
45
43
|
|
|
46
44
|
### Supported Node.js Versions
|
|
47
|
-
- Node version 14.x and
|
|
45
|
+
- Node version 14.x, 16.x and 18.x
|
|
48
46
|
|
|
49
47
|
### Supported Modules
|
|
50
48
|
|
|
@@ -106,4 +104,4 @@ The `@newrelic/security-agent` also uses source code from third-party libraries.
|
|
|
106
104
|
[1]: https://img.shields.io/npm/v/@newrelic/security-agent.svg
|
|
107
105
|
[2]: https://www.npmjs.com/package/@newrelic/security-agent
|
|
108
106
|
[3]: https://github.com/newrelic/csec-node-agent/workflows/CSEC%20Node%20Agent%20CI/badge.svg
|
|
109
|
-
[4]: https://github.com/newrelic/csec-node-agent/actions?query=workflow%3A%22CSEC+Node+Agent+CI%22
|
|
107
|
+
[4]: https://github.com/newrelic/csec-node-agent/actions?query=workflow%3A%22CSEC+Node+Agent+CI%22
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright 2023 New Relic Corporation. All rights reserved.
|
|
3
|
-
* SPDX-License-Identifier:
|
|
3
|
+
* SPDX-License-Identifier: New Relic Pre-Release
|
|
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:
|
|
3
|
+
* SPDX-License-Identifier: New Relic Pre-Release
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
@@ -425,7 +425,7 @@ function getProcStartTime () {
|
|
|
425
425
|
function setBuildDetails (agentDir, applicationInfo) {
|
|
426
426
|
const jsonFileHandler = new JsonHandler(PACKAGE_JSON_FILE, agentDir);
|
|
427
427
|
const pkg = jsonFileHandler.getJSON();
|
|
428
|
-
applicationInfo.collectorVersion = pkg.
|
|
428
|
+
applicationInfo.collectorVersion = pkg.collectorVersion;
|
|
429
429
|
applicationInfo.jsonVersion = pkg.jsonVersion;
|
|
430
430
|
applicationInfo.buildNumber = pkg.version;
|
|
431
431
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright 2023 New Relic Corporation. All rights reserved.
|
|
3
|
-
* SPDX-License-Identifier:
|
|
3
|
+
* SPDX-License-Identifier: New Relic Pre-Release
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* eslint-disable prefer-promise-reject-errors */
|
|
@@ -384,7 +384,7 @@ function getCSECmode(){
|
|
|
384
384
|
* @returns
|
|
385
385
|
*/
|
|
386
386
|
function getPathOfCACert(){
|
|
387
|
-
const certPath =
|
|
387
|
+
const certPath = NRAgent && NRAgent.config.security.ca_bundle_path ? NRAgent.config.security.ca_bundle_path : path.resolve(__dirname, '../../resources/cert.pem');
|
|
388
388
|
return certPath
|
|
389
389
|
}
|
|
390
390
|
|
package/lib/nr-security-agent/lib/core/connections/websocket/response/fuzz-request-handler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright 2023 New Relic Corporation. All rights reserved.
|
|
3
|
-
* SPDX-License-Identifier:
|
|
3
|
+
* SPDX-License-Identifier: New Relic Pre-Release
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/* eslint-disable no-unused-vars */
|
|
@@ -11,7 +11,7 @@ const { Agent } = require('../../../agent');
|
|
|
11
11
|
const { FuzzFailEvent } = require('../../../FuzzFailEvent');
|
|
12
12
|
const { hasWorker: isWorkerSupported } = require('../../../commonUtils');
|
|
13
13
|
const { CSEC_HOME_TMP, COLON, NR_CSEC_FUZZ_REQUEST_ID } = require('../../../sec-agent-constants');
|
|
14
|
-
const LOCALHOST = '
|
|
14
|
+
const LOCALHOST = '0.0.0.0';
|
|
15
15
|
const COLON_SLASH_SLASH = '://';
|
|
16
16
|
const http = require('http');
|
|
17
17
|
const https = require('https');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright 2023 New Relic Corporation. All rights reserved.
|
|
3
|
-
* SPDX-License-Identifier:
|
|
3
|
+
* SPDX-License-Identifier: New Relic Pre-Release
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
@@ -92,7 +92,7 @@ const initialize = function () {
|
|
|
92
92
|
}, 30000);
|
|
93
93
|
|
|
94
94
|
setInterval(commonUtils.logRollOver, 30000);
|
|
95
|
-
initLogger.info("[STEP-5] => Security Agent
|
|
95
|
+
initLogger.info("[STEP-5] => Security Agent components started");
|
|
96
96
|
};
|
|
97
97
|
|
|
98
98
|
/**
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/security-agent",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"description": "New Relic Security Agent for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"collectorVersion": "1.0.
|
|
6
|
+
"collectorVersion": "1.0.3-limited-preview",
|
|
7
7
|
"jsonVersion": "1.0.1",
|
|
8
8
|
"contributors": [
|
|
9
9
|
{
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"Node.js Application Security"
|
|
31
31
|
],
|
|
32
32
|
"author": "newrelic",
|
|
33
|
-
"license": "
|
|
33
|
+
"license": "New Relic Pre-Release",
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|
|
36
36
|
"url": "https://github.com/newrelic/csec-node-agent.git"
|