cognium-dev 4.3.1 → 4.4.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 +31 -1
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -5310,6 +5310,35 @@ function extractCSharpCalls(tree, cache) {
5310
5310
  is_constructor: true
5311
5311
  });
5312
5312
  }
5313
+ const assignments = getNodesFromCache(tree.rootNode, "assignment_expression", cache);
5314
+ for (const asn of assignments) {
5315
+ const left = asn.childForFieldName("left");
5316
+ if (left?.type !== "member_access_expression")
5317
+ continue;
5318
+ const nameNode = left.childForFieldName("name");
5319
+ if (!nameNode || getNodeText(nameNode) !== "CommandText")
5320
+ continue;
5321
+ const right = asn.childForFieldName("right");
5322
+ if (!right)
5323
+ continue;
5324
+ const rhsText = getNodeText(right);
5325
+ const exprNode = left.childForFieldName("expression");
5326
+ calls.push({
5327
+ method_name: "CommandText",
5328
+ receiver: exprNode ? getNodeText(exprNode) : null,
5329
+ receiver_type: null,
5330
+ receiver_type_fqn: null,
5331
+ arguments: [{
5332
+ position: 0,
5333
+ expression: rhsText,
5334
+ variable: right.type === "identifier" ? rhsText : null,
5335
+ literal: right.type === "string_literal" ? rhsText : null,
5336
+ value: null
5337
+ }],
5338
+ location: { line: asn.startPosition.row + 1, column: asn.startPosition.column },
5339
+ in_method: findEnclosingMethod(asn)
5340
+ });
5341
+ }
5313
5342
  return calls;
5314
5343
  }
5315
5344
  function extractCSharpArguments(argsNode) {
@@ -12284,6 +12313,7 @@ var DEFAULT_SINKS = [
12284
12313
  { method: "ExecuteSqlRawAsync", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["csharp"] },
12285
12314
  { method: "FromSqlRaw", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["csharp"] },
12286
12315
  { method: "FromSqlRawAsync", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["csharp"] },
12316
+ { method: "CommandText", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["csharp"] },
12287
12317
  { method: "Start", class: "Process", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0], languages: ["csharp"] },
12288
12318
  { method: "ProcessStartInfo", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0, 1], languages: ["csharp"] },
12289
12319
  { method: "ReadAllText", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["csharp"] },
@@ -47778,7 +47808,7 @@ var colors = {
47778
47808
  };
47779
47809
 
47780
47810
  // src/version.ts
47781
- var version = "4.3.1";
47811
+ var version = "4.4.0";
47782
47812
 
47783
47813
  // src/formatters.ts
47784
47814
  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": "4.3.1",
3
+ "version": "4.4.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": "^4.3.1"
69
+ "circle-ir": "^4.4.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@types/node": "^25.5.0",