cognium-dev 3.156.0 → 3.157.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.
Files changed (2) hide show
  1. package/dist/cli.js +34 -6
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -11671,7 +11671,10 @@ var DEFAULT_SANITIZERS = [
11671
11671
  { method: "MustParse", class: "uuid", removes: ["sql_injection", "command_injection", "path_traversal", "code_injection"] },
11672
11672
  { method: "bool", removes: ["sql_injection", "command_injection", "xss", "code_injection"] },
11673
11673
  { method: "UUID", class: "uuid", removes: ["sql_injection", "command_injection", "path_traversal", "code_injection"] },
11674
- { method: "Decimal", class: "decimal", removes: ["sql_injection", "command_injection", "path_traversal", "code_injection"] }
11674
+ { method: "Decimal", class: "decimal", removes: ["sql_injection", "command_injection", "path_traversal", "code_injection"] },
11675
+ { method: "update", class: "Cipher", removes: ["xss", "sql_injection", "command_injection", "path_traversal", "code_injection", "crlf", "log_injection", "ldap_injection", "xpath_injection"] },
11676
+ { method: "final", class: "Cipher", removes: ["xss", "sql_injection", "command_injection", "path_traversal", "code_injection", "crlf", "log_injection", "ldap_injection", "xpath_injection"] },
11677
+ { method: "doFinal", class: "Cipher", removes: ["xss", "sql_injection", "command_injection", "path_traversal", "code_injection", "crlf", "log_injection", "ldap_injection", "xpath_injection"] }
11675
11678
  ];
11676
11679
  var DEFAULT_SINK_SEMANTICS = [
11677
11680
  {
@@ -31836,11 +31839,36 @@ class TaintPropagationPass {
31836
31839
  return true;
31837
31840
  }
31838
31841
  const sansAtSink = sanitizersByLine.get(f.sink_line);
31839
- if (!sansAtSink || sansAtSink.length === 0)
31842
+ if (sansAtSink && sansAtSink.length > 0) {
31843
+ for (const san of sansAtSink) {
31844
+ if (san.sanitizes.includes(f.sink_type)) {
31845
+ return false;
31846
+ }
31847
+ }
31848
+ }
31849
+ const usesAtSink = graph.usesByLine.get(f.sink_line);
31850
+ if (!usesAtSink || usesAtSink.length === 0)
31840
31851
  return true;
31841
- for (const san of sansAtSink) {
31842
- if (san.sanitizes.includes(f.sink_type)) {
31843
- return false;
31852
+ const sinkVar = f.path.length > 0 ? f.path[f.path.length - 1].variable : undefined;
31853
+ if (!sinkVar)
31854
+ return true;
31855
+ for (const use of usesAtSink) {
31856
+ if (use.variable !== sinkVar)
31857
+ continue;
31858
+ if (use.def_id === null || use.def_id === undefined)
31859
+ continue;
31860
+ const walk = walkBackwardDefs(use.def_id, graph.chainsByToDef, graph.defById, { maxHops: 32 });
31861
+ for (const line of walk.lines) {
31862
+ if (line === f.sink_line)
31863
+ continue;
31864
+ const sansAtLine = sanitizersByLine.get(line);
31865
+ if (!sansAtLine || sansAtLine.length === 0)
31866
+ continue;
31867
+ for (const san of sansAtLine) {
31868
+ if (san.sanitizes.includes(f.sink_type)) {
31869
+ return false;
31870
+ }
31871
+ }
31844
31872
  }
31845
31873
  }
31846
31874
  return true;
@@ -43580,7 +43608,7 @@ var colors = {
43580
43608
  };
43581
43609
 
43582
43610
  // src/version.ts
43583
- var version = "3.156.0";
43611
+ var version = "3.157.0";
43584
43612
 
43585
43613
  // src/formatters.ts
43586
43614
  var LIBRARY_API_SURFACE_TAG2 = "library-api-surface:caller-responsibility";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cognium-dev",
3
- "version": "3.156.0",
3
+ "version": "3.157.0",
4
4
  "description": "Static Application Security Testing CLI for detecting security vulnerabilities via taint tracking",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@cognium/project-profile-detect": "^1.1.0",
69
- "circle-ir": "^3.156.0"
69
+ "circle-ir": "^3.157.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/node": "^25.5.0",