@contrast/protect 1.72.2 → 1.73.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.
@@ -31,7 +31,7 @@ module.exports = function(core) {
31
31
  hardening,
32
32
  throwSecurityException,
33
33
  },
34
- captureStacktrace,
34
+ stackTraceFactory,
35
35
  } = core;
36
36
 
37
37
  function getResults(sourceContext, ruleId) {
@@ -44,8 +44,7 @@ module.exports = function(core) {
44
44
 
45
45
  function handleFindings(sourceContext, sinkContext, ruleId, result, findings, mode) {
46
46
  const { stacktraceOpts } = sinkContext;
47
-
48
- captureStacktrace(sinkContext, stacktraceOpts);
47
+ sinkContext.stack = stackTraceFactory.create(stacktraceOpts);
49
48
  getResults(sourceContext, ruleId).push(result);
50
49
 
51
50
  let blockInfo;
@@ -35,12 +35,12 @@ module.exports = function(core) {
35
35
  inputTracing,
36
36
  throwSecurityException
37
37
  },
38
- captureStacktrace,
38
+ stackTraceFactory
39
39
  } = core;
40
40
 
41
41
  function handleFindings(sourceContext, sinkContext, ruleId, result, findings) {
42
42
  const { stacktraceOpts } = sinkContext;
43
- captureStacktrace(sinkContext, stacktraceOpts);
43
+ sinkContext.stack = stackTraceFactory.create(stacktraceOpts);
44
44
  result.exploited = true;
45
45
 
46
46
  const mode = sourceContext.policy.getRuleMode(ruleId);
@@ -50,12 +50,12 @@ module.exports = function(core) {
50
50
  semanticAnalysis,
51
51
  throwSecurityException
52
52
  },
53
- captureStacktrace,
53
+ stackTraceFactory,
54
54
  } = core;
55
55
 
56
56
  function handleResult(sourceContext, sinkContext, ruleId, mode, findings) {
57
57
  const { value, stacktraceOpts } = sinkContext;
58
- captureStacktrace(sinkContext, stacktraceOpts);
58
+ sinkContext.stack = stackTraceFactory.create(stacktraceOpts);
59
59
 
60
60
  // shoehorn findings into agent-lib result data model
61
61
  const result = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/protect",
3
- "version": "1.72.2",
3
+ "version": "1.73.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)",
@@ -21,16 +21,17 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@contrast/agent-lib": "^9.1.0",
24
- "@contrast/common": "1.39.1",
25
- "@contrast/config": "1.55.1",
26
- "@contrast/core": "1.60.1",
27
- "@contrast/dep-hooks": "1.29.1",
28
- "@contrast/esm-hooks": "2.35.2",
29
- "@contrast/instrumentation": "1.39.1",
30
- "@contrast/logger": "1.33.1",
31
- "@contrast/patcher": "1.32.1",
32
- "@contrast/rewriter": "1.37.2",
33
- "@contrast/scopes": "1.30.1",
24
+ "@contrast/common": "1.40.0",
25
+ "@contrast/config": "1.56.0",
26
+ "@contrast/core": "1.61.0",
27
+ "@contrast/dep-hooks": "1.30.0",
28
+ "@contrast/esm-hooks": "2.36.0",
29
+ "@contrast/instrumentation": "1.40.0",
30
+ "@contrast/logger": "1.34.0",
31
+ "@contrast/patcher": "1.33.0",
32
+ "@contrast/rewriter": "1.38.0",
33
+ "@contrast/scopes": "1.31.0",
34
+ "@contrast/stack-trace-factory": "1.1.0",
34
35
  "async-hook-domain": "^4.0.1",
35
36
  "ipaddr.js": "^2.0.1",
36
37
  "on-finished": "^2.4.1",