@contrast/protect 1.68.0 → 1.69.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.
@@ -665,7 +665,6 @@ module.exports = Core.makeComponent({
665
665
  // Detecting probes
666
666
  const rulesMask = sourceContext.policy.getRulesMask();
667
667
  if (rulesMask == 0 || !config.protect.probe_analysis.enable) return;
668
- const probeReports = [];
669
668
  const { resultsMap } = sourceContext;
670
669
  const probesRules = [Rule.CMD_INJECTION, Rule.PATH_TRAVERSAL, Rule.SQL_INJECTION, Rule.XXE];
671
670
  const probes = {};
@@ -734,7 +733,6 @@ module.exports = Core.makeComponent({
734
733
  }) || [];
735
734
  alibResult.forEach(result => {
736
735
  results.push({ value, ...result });
737
- probeReports.push({ value, ...result });
738
736
  valueToResultByRuleId[value] = resultByRuleId;
739
737
  });
740
738
  });
@@ -756,16 +754,7 @@ module.exports = Core.makeComponent({
756
754
  probes[key] = probe;
757
755
  });
758
756
 
759
- Object.values(probes).forEach(probe => {
760
- if (!resultsMap[probe.ruleId]) {
761
- resultsMap[probe.ruleId] = [];
762
- }
763
-
764
- resultsMap[probe.ruleId].push(probe);
765
- probeReports.push(probe);
766
- });
767
-
768
- for (const result of probeReports) {
757
+ for (const result of Object.values(probes)) {
769
758
  core.protect.reportFinding({ result });
770
759
  }
771
760
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/protect",
3
- "version": "1.68.0",
3
+ "version": "1.69.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)",
@@ -22,15 +22,15 @@
22
22
  "dependencies": {
23
23
  "@contrast/agent-lib": "^9.1.0",
24
24
  "@contrast/common": "1.37.0",
25
- "@contrast/config": "1.52.1",
26
- "@contrast/core": "1.57.1",
27
- "@contrast/dep-hooks": "1.26.1",
28
- "@contrast/esm-hooks": "2.32.0",
29
- "@contrast/instrumentation": "1.36.1",
30
- "@contrast/logger": "1.30.1",
31
- "@contrast/patcher": "1.29.1",
32
- "@contrast/rewriter": "1.34.0",
33
- "@contrast/scopes": "1.27.1",
25
+ "@contrast/config": "1.53.0",
26
+ "@contrast/core": "1.58.0",
27
+ "@contrast/dep-hooks": "1.27.0",
28
+ "@contrast/esm-hooks": "2.33.0",
29
+ "@contrast/instrumentation": "1.37.0",
30
+ "@contrast/logger": "1.31.0",
31
+ "@contrast/patcher": "1.30.0",
32
+ "@contrast/rewriter": "1.35.0",
33
+ "@contrast/scopes": "1.28.0",
34
34
  "async-hook-domain": "^4.0.1",
35
35
  "ipaddr.js": "^2.0.1",
36
36
  "on-finished": "^2.4.1",