cognium-dev 3.140.0 → 3.141.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 +62 -8
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -5678,19 +5678,48 @@ function resolveReceiverType(receiver, context) {
|
|
|
5678
5678
|
return resolveFqn(simple, context);
|
|
5679
5679
|
}
|
|
5680
5680
|
}
|
|
5681
|
-
const
|
|
5682
|
-
if (
|
|
5683
|
-
const
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
if (varType) {
|
|
5687
|
-
const returnType = JAVA_CHAINED_FACTORY_RETURN_TYPES[stripGenerics(varType)]?.[methodName];
|
|
5681
|
+
const chain = splitChainedReceiver(receiver);
|
|
5682
|
+
if (chain) {
|
|
5683
|
+
const prefixType = resolveReceiverType(chain.prefix, context);
|
|
5684
|
+
if (prefixType.simpleName) {
|
|
5685
|
+
const returnType = JAVA_CHAINED_FACTORY_RETURN_TYPES[prefixType.simpleName]?.[chain.methodName];
|
|
5688
5686
|
if (returnType)
|
|
5689
5687
|
return resolveFqn(returnType, context);
|
|
5690
5688
|
}
|
|
5691
5689
|
}
|
|
5692
5690
|
return { simpleName: null, fqn: null };
|
|
5693
5691
|
}
|
|
5692
|
+
function splitChainedReceiver(receiver) {
|
|
5693
|
+
if (!receiver.endsWith(")"))
|
|
5694
|
+
return null;
|
|
5695
|
+
let depth = 0;
|
|
5696
|
+
let openIdx = -1;
|
|
5697
|
+
for (let i2 = receiver.length - 1;i2 >= 0; i2--) {
|
|
5698
|
+
const c = receiver[i2];
|
|
5699
|
+
if (c === ")")
|
|
5700
|
+
depth++;
|
|
5701
|
+
else if (c === "(") {
|
|
5702
|
+
depth--;
|
|
5703
|
+
if (depth === 0) {
|
|
5704
|
+
openIdx = i2;
|
|
5705
|
+
break;
|
|
5706
|
+
}
|
|
5707
|
+
}
|
|
5708
|
+
}
|
|
5709
|
+
if (openIdx <= 0)
|
|
5710
|
+
return null;
|
|
5711
|
+
const beforeParen = receiver.substring(0, openIdx);
|
|
5712
|
+
const dotIdx = beforeParen.lastIndexOf(".");
|
|
5713
|
+
if (dotIdx <= 0)
|
|
5714
|
+
return null;
|
|
5715
|
+
const methodName = beforeParen.substring(dotIdx + 1).trim();
|
|
5716
|
+
if (!/^[A-Za-z_$][\w$]*$/.test(methodName))
|
|
5717
|
+
return null;
|
|
5718
|
+
const prefix = beforeParen.substring(0, dotIdx).trim();
|
|
5719
|
+
if (!prefix)
|
|
5720
|
+
return null;
|
|
5721
|
+
return { prefix, methodName };
|
|
5722
|
+
}
|
|
5694
5723
|
var JAVA_CHAINED_FACTORY_RETURN_TYPES = {
|
|
5695
5724
|
HttpServletRequest: {
|
|
5696
5725
|
getSession: "HttpSession",
|
|
@@ -5702,6 +5731,31 @@ var JAVA_CHAINED_FACTORY_RETURN_TYPES = {
|
|
|
5702
5731
|
},
|
|
5703
5732
|
ServletContext: {
|
|
5704
5733
|
getRequestDispatcher: "RequestDispatcher"
|
|
5734
|
+
},
|
|
5735
|
+
DocumentBuilderFactory: {
|
|
5736
|
+
newInstance: "DocumentBuilderFactory",
|
|
5737
|
+
newDocumentBuilder: "DocumentBuilder"
|
|
5738
|
+
},
|
|
5739
|
+
SAXParserFactory: {
|
|
5740
|
+
newInstance: "SAXParserFactory",
|
|
5741
|
+
newSAXParser: "SAXParser"
|
|
5742
|
+
},
|
|
5743
|
+
SAXParser: {
|
|
5744
|
+
getXMLReader: "XMLReader"
|
|
5745
|
+
},
|
|
5746
|
+
XPathFactory: {
|
|
5747
|
+
newInstance: "XPathFactory",
|
|
5748
|
+
newXPath: "XPath"
|
|
5749
|
+
},
|
|
5750
|
+
TransformerFactory: {
|
|
5751
|
+
newInstance: "TransformerFactory",
|
|
5752
|
+
newTransformer: "Transformer"
|
|
5753
|
+
},
|
|
5754
|
+
XMLInputFactory: {
|
|
5755
|
+
newInstance: "XMLInputFactory",
|
|
5756
|
+
newFactory: "XMLInputFactory",
|
|
5757
|
+
createXMLStreamReader: "XMLStreamReader",
|
|
5758
|
+
createXMLEventReader: "XMLEventReader"
|
|
5705
5759
|
}
|
|
5706
5760
|
};
|
|
5707
5761
|
function resolveFqn(simpleName, context) {
|
|
@@ -41665,7 +41719,7 @@ var colors = {
|
|
|
41665
41719
|
};
|
|
41666
41720
|
|
|
41667
41721
|
// src/version.ts
|
|
41668
|
-
var version = "3.
|
|
41722
|
+
var version = "3.141.0";
|
|
41669
41723
|
|
|
41670
41724
|
// src/formatters.ts
|
|
41671
41725
|
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.141.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.141.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/node": "^25.5.0",
|