cognium-dev 3.139.0 → 3.140.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 +32 -8
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -5678,8 +5678,32 @@ function resolveReceiverType(receiver, context) {
|
|
|
5678
5678
|
return resolveFqn(simple, context);
|
|
5679
5679
|
}
|
|
5680
5680
|
}
|
|
5681
|
+
const chained = receiver.match(/^([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)\s*\([^()]*\)$/);
|
|
5682
|
+
if (chained) {
|
|
5683
|
+
const varName = chained[1];
|
|
5684
|
+
const methodName = chained[2];
|
|
5685
|
+
const varType = context.localVarTypes.get(varName) ?? context.paramTypes.get(varName) ?? context.fieldTypes.get(varName);
|
|
5686
|
+
if (varType) {
|
|
5687
|
+
const returnType = JAVA_CHAINED_FACTORY_RETURN_TYPES[stripGenerics(varType)]?.[methodName];
|
|
5688
|
+
if (returnType)
|
|
5689
|
+
return resolveFqn(returnType, context);
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5681
5692
|
return { simpleName: null, fqn: null };
|
|
5682
5693
|
}
|
|
5694
|
+
var JAVA_CHAINED_FACTORY_RETURN_TYPES = {
|
|
5695
|
+
HttpServletRequest: {
|
|
5696
|
+
getSession: "HttpSession",
|
|
5697
|
+
getServletContext: "ServletContext",
|
|
5698
|
+
getRequestDispatcher: "RequestDispatcher"
|
|
5699
|
+
},
|
|
5700
|
+
HttpSession: {
|
|
5701
|
+
getServletContext: "ServletContext"
|
|
5702
|
+
},
|
|
5703
|
+
ServletContext: {
|
|
5704
|
+
getRequestDispatcher: "RequestDispatcher"
|
|
5705
|
+
}
|
|
5706
|
+
};
|
|
5683
5707
|
function resolveFqn(simpleName, context) {
|
|
5684
5708
|
if (!simpleName)
|
|
5685
5709
|
return { simpleName: null, fqn: null };
|
|
@@ -13400,19 +13424,19 @@ function formatCallCode(call) {
|
|
|
13400
13424
|
// ../circle-ir/dist/analysis/findings.js
|
|
13401
13425
|
function canSourceReachSink(sourceType, sinkType) {
|
|
13402
13426
|
const sourceToSinkMapping = {
|
|
13403
|
-
http_param: ["sql_injection", "command_injection", "path_traversal", "xss", "xpath_injection", "ldap_injection", "ssrf", "mybatis_mapper_call", "code_injection", "crlf", "mass_assignment", "open_redirect"],
|
|
13404
|
-
http_body: ["sql_injection", "command_injection", "deserialization", "xxe", "xss", "code_injection", "mybatis_mapper_call", "crlf", "mass_assignment", "open_redirect"],
|
|
13405
|
-
http_header: ["sql_injection", "xss", "ssrf", "mybatis_mapper_call", "code_injection", "crlf", "open_redirect"],
|
|
13406
|
-
http_cookie: ["sql_injection", "xss", "mybatis_mapper_call", "code_injection", "crlf", "open_redirect"],
|
|
13407
|
-
http_path: ["path_traversal", "sql_injection", "ssrf", "mybatis_mapper_call", "open_redirect"],
|
|
13408
|
-
http_query: ["sql_injection", "command_injection", "xss", "ssrf", "mybatis_mapper_call", "code_injection", "crlf", "mass_assignment", "open_redirect"],
|
|
13427
|
+
http_param: ["sql_injection", "command_injection", "path_traversal", "xss", "xpath_injection", "ldap_injection", "ssrf", "mybatis_mapper_call", "code_injection", "crlf", "mass_assignment", "open_redirect", "trust_boundary"],
|
|
13428
|
+
http_body: ["sql_injection", "command_injection", "deserialization", "xxe", "xss", "code_injection", "mybatis_mapper_call", "crlf", "mass_assignment", "open_redirect", "trust_boundary"],
|
|
13429
|
+
http_header: ["sql_injection", "xss", "ssrf", "mybatis_mapper_call", "code_injection", "crlf", "open_redirect", "trust_boundary"],
|
|
13430
|
+
http_cookie: ["sql_injection", "xss", "mybatis_mapper_call", "code_injection", "crlf", "open_redirect", "trust_boundary"],
|
|
13431
|
+
http_path: ["path_traversal", "sql_injection", "ssrf", "mybatis_mapper_call", "open_redirect", "trust_boundary"],
|
|
13432
|
+
http_query: ["sql_injection", "command_injection", "xss", "ssrf", "mybatis_mapper_call", "code_injection", "crlf", "mass_assignment", "open_redirect", "trust_boundary"],
|
|
13409
13433
|
io_input: ["command_injection", "path_traversal", "deserialization", "xxe", "code_injection", "xss", "ssrf"],
|
|
13410
13434
|
env_input: ["command_injection", "path_traversal"],
|
|
13411
13435
|
db_input: ["xss", "sql_injection"],
|
|
13412
13436
|
file_input: ["deserialization", "xxe", "path_traversal", "command_injection", "code_injection"],
|
|
13413
13437
|
network_input: ["sql_injection", "command_injection", "xss", "ssrf"],
|
|
13414
13438
|
config_param: ["sql_injection", "command_injection", "path_traversal", "xss", "ssrf"],
|
|
13415
|
-
interprocedural_param: ["sql_injection", "command_injection", "path_traversal", "xss", "xpath_injection", "ldap_injection", "ssrf", "code_injection", "mybatis_mapper_call", "crlf", "mass_assignment", "open_redirect"],
|
|
13439
|
+
interprocedural_param: ["sql_injection", "command_injection", "path_traversal", "xss", "xpath_injection", "ldap_injection", "ssrf", "code_injection", "mybatis_mapper_call", "crlf", "mass_assignment", "open_redirect", "trust_boundary"],
|
|
13416
13440
|
plugin_param: ["sql_injection", "command_injection", "path_traversal", "xss", "code_injection"]
|
|
13417
13441
|
};
|
|
13418
13442
|
const validSinks = sourceToSinkMapping[sourceType];
|
|
@@ -41641,7 +41665,7 @@ var colors = {
|
|
|
41641
41665
|
};
|
|
41642
41666
|
|
|
41643
41667
|
// src/version.ts
|
|
41644
|
-
var version = "3.
|
|
41668
|
+
var version = "3.140.0";
|
|
41645
41669
|
|
|
41646
41670
|
// src/formatters.ts
|
|
41647
41671
|
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.
|
|
3
|
+
"version": "3.140.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.
|
|
69
|
+
"circle-ir": "^3.140.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/node": "^25.5.0",
|