@newrelic/security-agent 0.0.1 → 0.0.4
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/README.md +1 -1
- package/lib/instrumentation-security/hooks/mongodb/constants.js +1 -1
- package/lib/nr-security-agent/index.js +0 -2
- package/lib/nr-security-agent/lib/core/connections/websocket/response/fuzz-request-handler.js +4 -3
- package/lib/nr-security-api/index.js +1 -1
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -95,4 +95,4 @@ If you would like to contribute to this project, review [these guidelines](https
|
|
|
95
95
|
|
|
96
96
|
## License
|
|
97
97
|
The New Relic security agent is licensed under the New Relic Pre-Release Software Notice.
|
|
98
|
-
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.
|
|
98
|
+
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.
|
|
@@ -140,8 +140,6 @@ function initialize() {
|
|
|
140
140
|
// Initialize Agent Status
|
|
141
141
|
const status = agentStatus.getInstance();
|
|
142
142
|
|
|
143
|
-
// Initialize Collector config
|
|
144
|
-
|
|
145
143
|
// Initialize
|
|
146
144
|
Agent.init(applicationInfo, logger, wsClient, status);
|
|
147
145
|
initLogger.info(LOG_MESSAGES.AGENT_INIT_SUCCESSFUL, applicationInfo.pid, applicationInfo.applicationUUID);
|
package/lib/nr-security-agent/lib/core/connections/websocket/response/fuzz-request-handler.js
CHANGED
|
@@ -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 = 'localhost';
|
|
15
15
|
const COLON_SLASH_SLASH = '://';
|
|
16
16
|
const http = require('http');
|
|
17
17
|
const https = require('https');
|
|
@@ -121,9 +121,10 @@ function handleFuzzResponse (request, fuzzDetails) {
|
|
|
121
121
|
* @param {JSON} requestObject
|
|
122
122
|
*/
|
|
123
123
|
function parseAxiosHttpRequestToFuzz (requestObject) {
|
|
124
|
-
|
|
124
|
+
let serverName = requestObject.serverName ? requestObject.serverName : LOCALHOST;
|
|
125
|
+
let host = serverName + COLON + requestObject.serverPort
|
|
125
126
|
return {
|
|
126
|
-
url: requestObject.protocol + COLON_SLASH_SLASH +
|
|
127
|
+
url: requestObject.protocol + COLON_SLASH_SLASH + host + requestObject.url,
|
|
127
128
|
method: requestObject.method,
|
|
128
129
|
data: requestObject.body,
|
|
129
130
|
headers: requestObject.headers,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/security-agent",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Newrelic Security Agent for Node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"collectorVersion": "1.0.1-limited-preview",
|
|
@@ -23,7 +23,13 @@
|
|
|
23
23
|
"posttest": "rm -f newrelic_agent.log && rm -rf nr-security-home && rm -rf .nyc_output",
|
|
24
24
|
"third-party-updates": "oss third-party manifest && oss third-party notices && git add THIRD_PARTY_NOTICES.md third_party_manifest.json"
|
|
25
25
|
},
|
|
26
|
-
"keywords": [
|
|
26
|
+
"keywords": [
|
|
27
|
+
"instrumentation",
|
|
28
|
+
"IAST",
|
|
29
|
+
"RASP",
|
|
30
|
+
"New Relic Security Agent",
|
|
31
|
+
"Node.js Application Security"
|
|
32
|
+
],
|
|
27
33
|
"author": "newrelic",
|
|
28
34
|
"license": "Apache-2.0",
|
|
29
35
|
"repository": {
|