cognium-dev 3.41.0 → 3.42.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.
- package/dist/cli.js +30 -4
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -10059,6 +10059,17 @@ var DEFAULT_SINKS = [
|
|
|
10059
10059
|
{ method: "queryForObject", type: "sql_injection", cwe: "CWE-89", severity: "high", arg_positions: [0] },
|
|
10060
10060
|
{ method: "queryForList", type: "sql_injection", cwe: "CWE-89", severity: "high", arg_positions: [0] },
|
|
10061
10061
|
{ method: "queryForLong", type: "sql_injection", cwe: "CWE-89", severity: "high", arg_positions: [0] },
|
|
10062
|
+
{ method: "insert", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10063
|
+
{ method: "insertSelective", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10064
|
+
{ method: "update", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10065
|
+
{ method: "updateByPrimaryKey", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10066
|
+
{ method: "updateByPrimaryKeySelective", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10067
|
+
{ method: "delete", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10068
|
+
{ method: "deleteByPrimaryKey", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10069
|
+
{ method: "selectOne", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10070
|
+
{ method: "selectList", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10071
|
+
{ method: "selectByPrimaryKey", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10072
|
+
{ method: "selectByExample", class: "*Mapper", type: "mybatis_mapper_call", cwe: "CWE-89", severity: "medium", arg_positions: [0], languages: ["java"] },
|
|
10062
10073
|
{ method: "exec", class: "Runtime", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0, 1] },
|
|
10063
10074
|
{ method: "start", class: "ProcessBuilder", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [] },
|
|
10064
10075
|
{ method: "ProcessBuilder", class: "constructor", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
@@ -11681,6 +11692,14 @@ function matchesAnnotation(annotations, targetAnnotation) {
|
|
|
11681
11692
|
return false;
|
|
11682
11693
|
}
|
|
11683
11694
|
function receiverMightBeClass(receiver, className) {
|
|
11695
|
+
if (className.startsWith("*") && className.length > 1) {
|
|
11696
|
+
const suffix = className.slice(1).toLowerCase();
|
|
11697
|
+
let simpleReceiver = receiver;
|
|
11698
|
+
if (simpleReceiver.includes(".") && !simpleReceiver.endsWith(")")) {
|
|
11699
|
+
simpleReceiver = simpleReceiver.substring(simpleReceiver.lastIndexOf(".") + 1);
|
|
11700
|
+
}
|
|
11701
|
+
return simpleReceiver.toLowerCase().endsWith(suffix);
|
|
11702
|
+
}
|
|
11684
11703
|
if (receiver === className) {
|
|
11685
11704
|
return true;
|
|
11686
11705
|
}
|
|
@@ -21046,7 +21065,8 @@ var KNOWN_SINK_TYPES = new Set([
|
|
|
21046
21065
|
"log_injection",
|
|
21047
21066
|
"xxe",
|
|
21048
21067
|
"deserialization",
|
|
21049
|
-
"code_injection"
|
|
21068
|
+
"code_injection",
|
|
21069
|
+
"mybatis_mapper_call"
|
|
21050
21070
|
]);
|
|
21051
21071
|
function checkSanitized(_fromLine, toLine, sinkType, sanitizersByLine) {
|
|
21052
21072
|
const sanitizersAtTarget = sanitizersByLine.get(toLine);
|
|
@@ -27632,7 +27652,7 @@ var colors = {
|
|
|
27632
27652
|
};
|
|
27633
27653
|
|
|
27634
27654
|
// src/version.ts
|
|
27635
|
-
var version = "3.
|
|
27655
|
+
var version = "3.42.0";
|
|
27636
27656
|
|
|
27637
27657
|
// src/formatters.ts
|
|
27638
27658
|
var SINK_SEVERITY = {
|
|
@@ -27654,7 +27674,8 @@ var SINK_SEVERITY = {
|
|
|
27654
27674
|
weak_crypto: "low",
|
|
27655
27675
|
insecure_cookie: "low",
|
|
27656
27676
|
trust_boundary: "medium",
|
|
27657
|
-
external_taint_escape: "medium"
|
|
27677
|
+
external_taint_escape: "medium",
|
|
27678
|
+
mybatis_mapper_call: "medium"
|
|
27658
27679
|
};
|
|
27659
27680
|
var SINK_CWE = {
|
|
27660
27681
|
sql_injection: "CWE-89",
|
|
@@ -27675,7 +27696,8 @@ var SINK_CWE = {
|
|
|
27675
27696
|
weak_crypto: "CWE-327",
|
|
27676
27697
|
insecure_cookie: "CWE-614",
|
|
27677
27698
|
trust_boundary: "CWE-501",
|
|
27678
|
-
external_taint_escape: "CWE-20"
|
|
27699
|
+
external_taint_escape: "CWE-20",
|
|
27700
|
+
mybatis_mapper_call: "CWE-89"
|
|
27679
27701
|
};
|
|
27680
27702
|
var VULNERABILITY_HELP = {
|
|
27681
27703
|
sql_injection: {
|
|
@@ -27754,6 +27776,10 @@ var VULNERABILITY_HELP = {
|
|
|
27754
27776
|
description: "External input reaches a sensitive sink without proper validation",
|
|
27755
27777
|
fix: "Validate, sanitize, or escape external input before use in sensitive operations"
|
|
27756
27778
|
},
|
|
27779
|
+
mybatis_mapper_call: {
|
|
27780
|
+
description: "Tainted argument passed to a MyBatis mapper interface method — actual SQL lives in the mapper XML/annotation binding, so exploitability depends on whether ${...} string interpolation is used",
|
|
27781
|
+
fix: "Audit the mapper XML/annotations: use #{...} parameter binding (PreparedStatement-backed) for any user-controlled value. Reject from SQL-injection reports unless ${...} interpolation is confirmed"
|
|
27782
|
+
},
|
|
27757
27783
|
"dead-code": {
|
|
27758
27784
|
description: "Unreachable code block has no execution path from any entry point",
|
|
27759
27785
|
fix: "Remove the unreachable block or fix the control flow that precedes it"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cognium-dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.42.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",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"registry": "https://registry.npmjs.org/"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"circle-ir": "^3.
|
|
68
|
+
"circle-ir": "^3.42.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/node": "^25.5.0",
|