@newrelic/security-agent 3.0.5 → 4.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ### v4.0.0 (2026-11-03)
2
+ ### ⚠ BREAKING CHANGES
3
+ * Dropped support for Node.js v20.x
4
+
5
+ #### Features
6
+ * Added Node 26.x support and removed 20.x, updated CI matrix and fs callback hooks (#379)
7
+
8
+ #### Miscellaneous chores
9
+ * Updated Readme (#381)
10
+
1
11
  ### v3.0.5 (2026-10-29)
2
12
  #### Bug fixes
3
13
  * Subscribe to agent mongodb channels instead of wrapping prototypes (#375)
package/README.md CHANGED
@@ -42,7 +42,7 @@ The `@newrelic/security-agent` must be explicitly enabled in order to perform IA
42
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.
43
43
 
44
44
  ### Supported Node.js Versions
45
- - Node version 20.x, 22.x and 24.x
45
+ - Node version 22.x, 24.x and 26.x
46
46
 
47
47
  ### Supported Modules
48
48
 
@@ -57,6 +57,13 @@ let functionProbableToFI = [
57
57
  "mkdir",
58
58
  ];
59
59
 
60
+ // Node 26+ callback readFile/writeFile/appendFile no longer go through binding.open,
61
+ // so the open hook misses them. Older versions still do; wrapping there would double-report.
62
+ if (semver.satisfies(process.version, '>=26.0.0')) {
63
+ functionsProbableToFA.push("readFile");
64
+ functionProbableToFI.push("writeFile", "appendFile");
65
+ }
66
+
60
67
  const promiseFunctionsProbableToFA = [
61
68
  "open",
62
69
  "readdir",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/security-agent",
3
- "version": "3.0.5",
3
+ "version": "4.0.0",
4
4
  "description": "New Relic Security Agent for Node.js",
5
5
  "main": "index.js",
6
6
  "jsonVersion": "1.2.9",
@@ -29,7 +29,7 @@
29
29
  "Node.js Application Security"
30
30
  ],
31
31
  "engines": {
32
- "node": ">=20",
32
+ "node": ">=22.16.0",
33
33
  "npm": ">=6.0.0"
34
34
  },
35
35
  "author": "newrelic",