@contrast/protect 1.65.0 → 1.66.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.
@@ -112,7 +112,7 @@ module.exports = function (core) {
112
112
  }
113
113
 
114
114
  function install() {
115
- ['http', 'https', 'spdy', 'http2'].forEach((moduleName) => {
115
+ ['http', 'https', 'http2'].forEach((moduleName) => {
116
116
  instrument({
117
117
  moduleName,
118
118
  patchObjects: [{
@@ -36,7 +36,6 @@ module.exports = function(core) {
36
36
  require('./install/mysql')(core);
37
37
  require('./install/postgres')(core);
38
38
  require('./install/sequelize')(core);
39
- require('./install/spdy')(core);
40
39
  require('./install/sqlite3')(core);
41
40
  require('./install/vm')(core);
42
41
  // TODO: NODE-2360 (oracledb)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/protect",
3
- "version": "1.65.0",
3
+ "version": "1.66.0",
4
4
  "description": "Contrast service providing framework-agnostic Protect support",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -14,23 +14,23 @@
14
14
  "types": "lib/index.d.ts",
15
15
  "engines": {
16
16
  "npm": ">=6.13.7 <7 || >= 8.3.1",
17
- "node": ">= 16.9.1"
17
+ "node": ">= 18.7.0"
18
18
  },
19
19
  "scripts": {
20
20
  "test": "bash ../scripts/test.sh"
21
21
  },
22
22
  "dependencies": {
23
23
  "@contrast/agent-lib": "^9.1.0",
24
- "@contrast/common": "1.35.0",
25
- "@contrast/config": "1.50.0",
26
- "@contrast/core": "1.55.0",
27
- "@contrast/dep-hooks": "1.24.0",
28
- "@contrast/esm-hooks": "2.29.0",
29
- "@contrast/instrumentation": "1.34.0",
30
- "@contrast/logger": "1.28.0",
31
- "@contrast/patcher": "1.27.0",
32
- "@contrast/rewriter": "1.31.0",
33
- "@contrast/scopes": "1.25.0",
24
+ "@contrast/common": "1.36.0",
25
+ "@contrast/config": "1.51.0",
26
+ "@contrast/core": "1.56.0",
27
+ "@contrast/dep-hooks": "1.25.0",
28
+ "@contrast/esm-hooks": "2.30.0",
29
+ "@contrast/instrumentation": "1.35.0",
30
+ "@contrast/logger": "1.29.0",
31
+ "@contrast/patcher": "1.28.0",
32
+ "@contrast/rewriter": "1.32.0",
33
+ "@contrast/scopes": "1.26.0",
34
34
  "async-hook-domain": "^4.0.1",
35
35
  "ipaddr.js": "^2.0.1",
36
36
  "on-finished": "^2.4.1",
@@ -1,63 +0,0 @@
1
- /*
2
- * Copyright: 2025 Contrast Security, Inc
3
- * Contact: support@contrastsecurity.com
4
- * License: Commercial
5
-
6
- * NOTICE: This Software and the patented inventions embodied within may only be
7
- * used as part of Contrast Security’s commercial offerings. Even though it is
8
- * made available through public repositories, use of this Software is subject to
9
- * the applicable End User Licensing Agreement found at
10
- * https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
11
- * between Contrast Security and the End User. The Software may not be reverse
12
- * engineered, modified, repackaged, sold, redistributed or otherwise used in a
13
- * way not consistent with the End User License Agreement.
14
- */
15
-
16
- 'use strict';
17
-
18
- const { patchType } = require('../constants');
19
-
20
- module.exports = function(core) {
21
- const {
22
- scopes: { instrumentation },
23
- patcher,
24
- depHooks,
25
- protect,
26
- protect: { inputTracing }
27
- } = core;
28
-
29
- function install() {
30
- depHooks.resolve({ name: 'spdy', version: '<5' }, spdy => {
31
- const name = 'spdy.response.end';
32
- patcher.patch(spdy.response, 'end', {
33
- name,
34
- patchType,
35
- pre({ args, obj: response, hooked }) {
36
- if (instrumentation.isLocked()) return;
37
-
38
- const sourceContext = protect.getSourceContext();
39
-
40
- if (!sourceContext) return;
41
-
42
- const value = args[0]?.toString();
43
- if (!value) return;
44
-
45
- const sinkContext = {
46
- name,
47
- value,
48
- stacktraceOpts: { constructorOpt: hooked },
49
- };
50
-
51
- response.spdyStream.once('finish', () => response.emit('finish'));
52
- inputTracing.handleReflectedXss(sourceContext, sinkContext);
53
- }
54
- });
55
- });
56
- }
57
-
58
- const spdyInstrumentation = inputTracing.spdyInstrumentation = {
59
- install
60
- };
61
-
62
- return spdyInstrumentation;
63
- };