cognium-dev 3.46.0 → 3.48.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 +310 -74
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -3391,11 +3391,14 @@ function disposeTree(tree) {
|
|
|
3391
3391
|
} catch {}
|
|
3392
3392
|
}
|
|
3393
3393
|
function walkTree(node, visitor) {
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
const
|
|
3397
|
-
|
|
3398
|
-
|
|
3394
|
+
const stack = [node];
|
|
3395
|
+
while (stack.length > 0) {
|
|
3396
|
+
const current = stack.pop();
|
|
3397
|
+
visitor(current);
|
|
3398
|
+
for (let i2 = current.childCount - 1;i2 >= 0; i2--) {
|
|
3399
|
+
const child = current.child(i2);
|
|
3400
|
+
if (child)
|
|
3401
|
+
stack.push(child);
|
|
3399
3402
|
}
|
|
3400
3403
|
}
|
|
3401
3404
|
}
|
|
@@ -13202,9 +13205,11 @@ class ConstantPropagator {
|
|
|
13202
13205
|
return findAssignments(methodBody);
|
|
13203
13206
|
}
|
|
13204
13207
|
collectClassFields(root) {
|
|
13205
|
-
const
|
|
13208
|
+
const stack = [root];
|
|
13209
|
+
while (stack.length > 0) {
|
|
13210
|
+
const n = stack.pop();
|
|
13206
13211
|
if (!n)
|
|
13207
|
-
|
|
13212
|
+
continue;
|
|
13208
13213
|
if (n.type === "class_body") {
|
|
13209
13214
|
for (const child of n.children) {
|
|
13210
13215
|
if (child.type === "field_declaration") {
|
|
@@ -13218,34 +13223,30 @@ class ConstantPropagator {
|
|
|
13218
13223
|
}
|
|
13219
13224
|
}
|
|
13220
13225
|
}
|
|
13221
|
-
|
|
13222
|
-
traverse(child, true, true);
|
|
13223
|
-
} else {
|
|
13224
|
-
traverse(child, true, false);
|
|
13225
|
-
}
|
|
13226
|
+
stack.push(child);
|
|
13226
13227
|
}
|
|
13227
|
-
|
|
13228
|
+
continue;
|
|
13228
13229
|
}
|
|
13229
13230
|
for (const child of n.children) {
|
|
13230
|
-
|
|
13231
|
+
stack.push(child);
|
|
13231
13232
|
}
|
|
13232
|
-
}
|
|
13233
|
-
traverse(root, false, false);
|
|
13233
|
+
}
|
|
13234
13234
|
}
|
|
13235
13235
|
findAllMethods(node) {
|
|
13236
13236
|
const methods = [];
|
|
13237
|
-
const
|
|
13237
|
+
const stack = [node];
|
|
13238
|
+
while (stack.length > 0) {
|
|
13239
|
+
const n = stack.pop();
|
|
13238
13240
|
if (!n)
|
|
13239
|
-
|
|
13241
|
+
continue;
|
|
13240
13242
|
if (n.type === "method_declaration" || n.type === "function_declaration") {
|
|
13241
13243
|
methods.push(n);
|
|
13242
13244
|
}
|
|
13243
13245
|
for (const child of n.children) {
|
|
13244
13246
|
if (child)
|
|
13245
|
-
|
|
13247
|
+
stack.push(child);
|
|
13246
13248
|
}
|
|
13247
|
-
}
|
|
13248
|
-
traverse(node);
|
|
13249
|
+
}
|
|
13249
13250
|
return methods;
|
|
13250
13251
|
}
|
|
13251
13252
|
getMethodName(method) {
|
|
@@ -13290,9 +13291,20 @@ class ConstantPropagator {
|
|
|
13290
13291
|
}
|
|
13291
13292
|
}
|
|
13292
13293
|
visit(node) {
|
|
13294
|
+
const stack = [node];
|
|
13295
|
+
while (stack.length > 0) {
|
|
13296
|
+
const current = stack.pop();
|
|
13297
|
+
if (this.visitOne(current))
|
|
13298
|
+
continue;
|
|
13299
|
+
for (let i2 = current.children.length - 1;i2 >= 0; i2--) {
|
|
13300
|
+
stack.push(current.children[i2]);
|
|
13301
|
+
}
|
|
13302
|
+
}
|
|
13303
|
+
}
|
|
13304
|
+
visitOne(node) {
|
|
13293
13305
|
const line = getNodeLine(node);
|
|
13294
13306
|
if (this.unreachableLines.has(line)) {
|
|
13295
|
-
return;
|
|
13307
|
+
return true;
|
|
13296
13308
|
}
|
|
13297
13309
|
if (this.conditionStack.length > 0 && !this.lineConditions.has(line)) {
|
|
13298
13310
|
this.lineConditions.set(line, this.conditionStack[this.conditionStack.length - 1]);
|
|
@@ -13301,42 +13313,40 @@ class ConstantPropagator {
|
|
|
13301
13313
|
case "method_declaration":
|
|
13302
13314
|
case "constructor_declaration":
|
|
13303
13315
|
this.handleMethodDeclaration(node);
|
|
13304
|
-
return;
|
|
13316
|
+
return true;
|
|
13305
13317
|
case "local_variable_declaration":
|
|
13306
13318
|
this.handleVariableDeclaration(node);
|
|
13307
|
-
|
|
13319
|
+
return false;
|
|
13308
13320
|
case "assignment_expression":
|
|
13309
13321
|
this.handleAssignment(node);
|
|
13310
|
-
|
|
13322
|
+
return false;
|
|
13311
13323
|
case "update_expression":
|
|
13312
13324
|
this.handleUpdateExpression(node);
|
|
13313
|
-
|
|
13325
|
+
return false;
|
|
13314
13326
|
case "if_statement":
|
|
13315
13327
|
this.handleIfStatement(node);
|
|
13316
|
-
return;
|
|
13328
|
+
return true;
|
|
13317
13329
|
case "switch_expression":
|
|
13318
13330
|
case "switch_statement":
|
|
13319
13331
|
this.handleSwitch(node);
|
|
13320
|
-
return;
|
|
13332
|
+
return true;
|
|
13321
13333
|
case "ternary_expression":
|
|
13322
13334
|
this.handleTernary(node);
|
|
13323
|
-
|
|
13335
|
+
return false;
|
|
13324
13336
|
case "expression_statement":
|
|
13325
13337
|
this.handleExpressionStatement(node);
|
|
13326
|
-
|
|
13338
|
+
return false;
|
|
13327
13339
|
case "for_statement":
|
|
13328
13340
|
case "enhanced_for_statement":
|
|
13329
13341
|
case "while_statement":
|
|
13330
13342
|
case "do_statement":
|
|
13331
13343
|
this.handleLoopStatement(node);
|
|
13332
|
-
return;
|
|
13344
|
+
return true;
|
|
13333
13345
|
case "synchronized_statement":
|
|
13334
13346
|
this.handleSynchronizedStatement(node);
|
|
13335
|
-
return;
|
|
13347
|
+
return true;
|
|
13336
13348
|
default:
|
|
13337
|
-
|
|
13338
|
-
this.visit(child);
|
|
13339
|
-
}
|
|
13349
|
+
return false;
|
|
13340
13350
|
}
|
|
13341
13351
|
}
|
|
13342
13352
|
handleMethodDeclaration(node) {
|
|
@@ -14038,6 +14048,21 @@ class ConstantPropagator {
|
|
|
14038
14048
|
return null;
|
|
14039
14049
|
}
|
|
14040
14050
|
isTaintedExpression(node) {
|
|
14051
|
+
const stack = [node];
|
|
14052
|
+
while (stack.length > 0) {
|
|
14053
|
+
const current = stack.pop();
|
|
14054
|
+
const result = this.isTaintedExpressionStep(current);
|
|
14055
|
+
if (result === true)
|
|
14056
|
+
return true;
|
|
14057
|
+
if (result === false)
|
|
14058
|
+
continue;
|
|
14059
|
+
for (let i2 = current.children.length - 1;i2 >= 0; i2--) {
|
|
14060
|
+
stack.push(current.children[i2]);
|
|
14061
|
+
}
|
|
14062
|
+
}
|
|
14063
|
+
return false;
|
|
14064
|
+
}
|
|
14065
|
+
isTaintedExpressionStep(node) {
|
|
14041
14066
|
const text = getNodeText2(node, this.source);
|
|
14042
14067
|
if (node.type === "method_invocation") {
|
|
14043
14068
|
const nameNode = node.childForFieldName("name");
|
|
@@ -14290,12 +14315,7 @@ class ConstantPropagator {
|
|
|
14290
14315
|
}
|
|
14291
14316
|
return isTainted;
|
|
14292
14317
|
}
|
|
14293
|
-
|
|
14294
|
-
if (this.isTaintedExpression(child)) {
|
|
14295
|
-
return true;
|
|
14296
|
-
}
|
|
14297
|
-
}
|
|
14298
|
-
return false;
|
|
14318
|
+
return;
|
|
14299
14319
|
}
|
|
14300
14320
|
checkCollectionTaint(node) {
|
|
14301
14321
|
const objectNode = node.childForFieldName("object");
|
|
@@ -14597,19 +14617,18 @@ class BaseLanguagePlugin {
|
|
|
14597
14617
|
}
|
|
14598
14618
|
findNodes(root, type) {
|
|
14599
14619
|
const nodes = [];
|
|
14600
|
-
const
|
|
14601
|
-
|
|
14602
|
-
|
|
14603
|
-
|
|
14620
|
+
const stack = [root];
|
|
14621
|
+
while (stack.length > 0) {
|
|
14622
|
+
const node = stack.pop();
|
|
14623
|
+
if (node.type === type) {
|
|
14624
|
+
nodes.push(node);
|
|
14604
14625
|
}
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
|
|
14609
|
-
cursor.gotoParent();
|
|
14626
|
+
for (let i2 = node.childCount - 1;i2 >= 0; i2--) {
|
|
14627
|
+
const child = node.child(i2);
|
|
14628
|
+
if (child)
|
|
14629
|
+
stack.push(child);
|
|
14610
14630
|
}
|
|
14611
|
-
}
|
|
14612
|
-
visit();
|
|
14631
|
+
}
|
|
14613
14632
|
return nodes;
|
|
14614
14633
|
}
|
|
14615
14634
|
findChildByType(node, type) {
|
|
@@ -14930,17 +14949,18 @@ class JavaPlugin extends BaseLanguagePlugin {
|
|
|
14930
14949
|
}
|
|
14931
14950
|
}
|
|
14932
14951
|
};
|
|
14933
|
-
const
|
|
14952
|
+
const stack = [tree.rootNode];
|
|
14953
|
+
while (stack.length > 0) {
|
|
14954
|
+
const node = stack.pop();
|
|
14934
14955
|
if (node.type === "field_declaration" || node.type === "local_variable_declaration") {
|
|
14935
14956
|
collectDecl(node);
|
|
14936
14957
|
}
|
|
14937
14958
|
for (let i2 = 0;i2 < node.childCount; i2++) {
|
|
14938
14959
|
const child = node.child(i2);
|
|
14939
14960
|
if (child)
|
|
14940
|
-
|
|
14961
|
+
stack.push(child);
|
|
14941
14962
|
}
|
|
14942
|
-
}
|
|
14943
|
-
walk(tree.rootNode);
|
|
14963
|
+
}
|
|
14944
14964
|
this._typeMapCache.set(tree, map);
|
|
14945
14965
|
return map;
|
|
14946
14966
|
}
|
|
@@ -19455,16 +19475,19 @@ function extractHtmlContent(rootNode) {
|
|
|
19455
19475
|
return { scriptBlocks, eventHandlers };
|
|
19456
19476
|
}
|
|
19457
19477
|
function walkNode(node, scriptBlocks, eventHandlers) {
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
19467
|
-
|
|
19478
|
+
const stack = [node];
|
|
19479
|
+
while (stack.length > 0) {
|
|
19480
|
+
const current = stack.pop();
|
|
19481
|
+
if (current.type === "script_element") {
|
|
19482
|
+
extractScriptBlock(current, scriptBlocks);
|
|
19483
|
+
}
|
|
19484
|
+
if (current.type === "element" || current.type === "self_closing_tag") {
|
|
19485
|
+
extractEventHandlers(current, eventHandlers);
|
|
19486
|
+
}
|
|
19487
|
+
for (let i2 = current.childCount - 1;i2 >= 0; i2--) {
|
|
19488
|
+
const child = current.child(i2);
|
|
19489
|
+
if (child)
|
|
19490
|
+
stack.push(child);
|
|
19468
19491
|
}
|
|
19469
19492
|
}
|
|
19470
19493
|
}
|
|
@@ -19569,13 +19592,16 @@ function runHtmlAttributeSecurityChecks(rootNode, filePath) {
|
|
|
19569
19592
|
return findings;
|
|
19570
19593
|
}
|
|
19571
19594
|
function walkForSecurityChecks(node, filePath, findings) {
|
|
19572
|
-
|
|
19573
|
-
|
|
19574
|
-
|
|
19575
|
-
|
|
19576
|
-
|
|
19577
|
-
|
|
19578
|
-
|
|
19595
|
+
const stack = [node];
|
|
19596
|
+
while (stack.length > 0) {
|
|
19597
|
+
const current = stack.pop();
|
|
19598
|
+
if (current.type === "element" || current.type === "self_closing_tag" || current.type === "script_element" || current.type === "style_element") {
|
|
19599
|
+
checkElement(current, filePath, findings);
|
|
19600
|
+
}
|
|
19601
|
+
for (let i2 = current.childCount - 1;i2 >= 0; i2--) {
|
|
19602
|
+
const child = current.child(i2);
|
|
19603
|
+
if (child)
|
|
19604
|
+
stack.push(child);
|
|
19579
19605
|
}
|
|
19580
19606
|
}
|
|
19581
19607
|
}
|
|
@@ -26547,6 +26573,214 @@ class ScanSecretsPass {
|
|
|
26547
26573
|
}
|
|
26548
26574
|
}
|
|
26549
26575
|
|
|
26576
|
+
// ../circle-ir/dist/analysis/passes/spring4shell-pass.js
|
|
26577
|
+
var CONTROLLER_ANNOTATIONS = new Set([
|
|
26578
|
+
"Controller",
|
|
26579
|
+
"RestController",
|
|
26580
|
+
"ControllerAdvice",
|
|
26581
|
+
"RestControllerAdvice"
|
|
26582
|
+
]);
|
|
26583
|
+
var ROUTE_ANNOTATIONS = new Set([
|
|
26584
|
+
"RequestMapping",
|
|
26585
|
+
"GetMapping",
|
|
26586
|
+
"PostMapping",
|
|
26587
|
+
"PutMapping",
|
|
26588
|
+
"DeleteMapping",
|
|
26589
|
+
"PatchMapping"
|
|
26590
|
+
]);
|
|
26591
|
+
var BINDING_ANNOTATIONS = new Set([
|
|
26592
|
+
"RequestBody",
|
|
26593
|
+
"RequestParam",
|
|
26594
|
+
"PathVariable",
|
|
26595
|
+
"RequestHeader",
|
|
26596
|
+
"CookieValue",
|
|
26597
|
+
"MatrixVariable",
|
|
26598
|
+
"ModelAttribute",
|
|
26599
|
+
"Valid",
|
|
26600
|
+
"Validated",
|
|
26601
|
+
"RequestPart",
|
|
26602
|
+
"SessionAttribute",
|
|
26603
|
+
"RequestAttribute"
|
|
26604
|
+
]);
|
|
26605
|
+
var FRAMEWORK_PARAM_TYPES = new Set([
|
|
26606
|
+
"HttpServletRequest",
|
|
26607
|
+
"HttpServletResponse",
|
|
26608
|
+
"ServletRequest",
|
|
26609
|
+
"ServletResponse",
|
|
26610
|
+
"HttpSession",
|
|
26611
|
+
"ServletContext",
|
|
26612
|
+
"Cookie",
|
|
26613
|
+
"Model",
|
|
26614
|
+
"ModelMap",
|
|
26615
|
+
"ModelAndView",
|
|
26616
|
+
"Map",
|
|
26617
|
+
"BindingResult",
|
|
26618
|
+
"Errors",
|
|
26619
|
+
"RedirectAttributes",
|
|
26620
|
+
"SessionStatus",
|
|
26621
|
+
"WebRequest",
|
|
26622
|
+
"NativeWebRequest",
|
|
26623
|
+
"ServletWebRequest",
|
|
26624
|
+
"UriComponentsBuilder",
|
|
26625
|
+
"UriBuilder",
|
|
26626
|
+
"HttpEntity",
|
|
26627
|
+
"RequestEntity",
|
|
26628
|
+
"ResponseEntity",
|
|
26629
|
+
"HttpHeaders",
|
|
26630
|
+
"InputStream",
|
|
26631
|
+
"OutputStream",
|
|
26632
|
+
"Reader",
|
|
26633
|
+
"Writer",
|
|
26634
|
+
"ServerHttpRequest",
|
|
26635
|
+
"ServerHttpResponse",
|
|
26636
|
+
"ServerWebExchange",
|
|
26637
|
+
"Principal",
|
|
26638
|
+
"Authentication",
|
|
26639
|
+
"Locale",
|
|
26640
|
+
"TimeZone",
|
|
26641
|
+
"ZoneId",
|
|
26642
|
+
"MultipartFile",
|
|
26643
|
+
"Part",
|
|
26644
|
+
"TimeZone"
|
|
26645
|
+
]);
|
|
26646
|
+
var SIMPLE_JAVA_TYPES = new Set([
|
|
26647
|
+
"boolean",
|
|
26648
|
+
"byte",
|
|
26649
|
+
"char",
|
|
26650
|
+
"short",
|
|
26651
|
+
"int",
|
|
26652
|
+
"long",
|
|
26653
|
+
"float",
|
|
26654
|
+
"double",
|
|
26655
|
+
"void",
|
|
26656
|
+
"Boolean",
|
|
26657
|
+
"Byte",
|
|
26658
|
+
"Character",
|
|
26659
|
+
"Short",
|
|
26660
|
+
"Integer",
|
|
26661
|
+
"Long",
|
|
26662
|
+
"Float",
|
|
26663
|
+
"Double",
|
|
26664
|
+
"String",
|
|
26665
|
+
"CharSequence",
|
|
26666
|
+
"BigInteger",
|
|
26667
|
+
"BigDecimal",
|
|
26668
|
+
"UUID",
|
|
26669
|
+
"Date",
|
|
26670
|
+
"Calendar",
|
|
26671
|
+
"Instant",
|
|
26672
|
+
"LocalDate",
|
|
26673
|
+
"LocalTime",
|
|
26674
|
+
"LocalDateTime",
|
|
26675
|
+
"OffsetDateTime",
|
|
26676
|
+
"OffsetTime",
|
|
26677
|
+
"ZonedDateTime",
|
|
26678
|
+
"Duration",
|
|
26679
|
+
"Period",
|
|
26680
|
+
"List",
|
|
26681
|
+
"Set",
|
|
26682
|
+
"Collection",
|
|
26683
|
+
"Iterable",
|
|
26684
|
+
"Optional"
|
|
26685
|
+
]);
|
|
26686
|
+
|
|
26687
|
+
class Spring4ShellPass {
|
|
26688
|
+
name = "spring4shell";
|
|
26689
|
+
category = "security";
|
|
26690
|
+
run(ctx) {
|
|
26691
|
+
const { graph, language } = ctx;
|
|
26692
|
+
if (language !== "java") {
|
|
26693
|
+
return { controllerMethodsScanned: 0, findingsEmitted: 0 };
|
|
26694
|
+
}
|
|
26695
|
+
const file = graph.ir.meta.file;
|
|
26696
|
+
let scanned = 0;
|
|
26697
|
+
let emitted = 0;
|
|
26698
|
+
for (const type of graph.ir.types) {
|
|
26699
|
+
if (!isController(type))
|
|
26700
|
+
continue;
|
|
26701
|
+
for (const method of type.methods) {
|
|
26702
|
+
if (!isRouteHandler(method))
|
|
26703
|
+
continue;
|
|
26704
|
+
scanned++;
|
|
26705
|
+
for (const param of method.parameters) {
|
|
26706
|
+
if (!isVulnerableParameter(param))
|
|
26707
|
+
continue;
|
|
26708
|
+
ctx.addFinding({
|
|
26709
|
+
id: `${this.name}-${file}-${method.start_line}-${param.name}`,
|
|
26710
|
+
pass: this.name,
|
|
26711
|
+
category: this.category,
|
|
26712
|
+
rule_id: this.name,
|
|
26713
|
+
cwe: "CWE-94",
|
|
26714
|
+
severity: "high",
|
|
26715
|
+
level: "error",
|
|
26716
|
+
message: `Spring MVC controller method '${type.name}.${method.name}' binds parameter '${param.name}' of type '${param.type ?? "?"}' via implicit form-data binding (no @RequestBody / @RequestParam / @ModelAttribute) — vulnerable to Spring4Shell (CVE-2022-22965) class-graph RCE on Spring < 5.3.18 / 5.2.20`,
|
|
26717
|
+
file,
|
|
26718
|
+
line: param.line ?? method.start_line,
|
|
26719
|
+
fix: "Annotate the parameter with @RequestBody (JSON) or @ModelAttribute + @InitBinder/setAllowedFields whitelisting, upgrade Spring to ≥ 5.3.18 / 5.2.20, and ensure JDK is patched.",
|
|
26720
|
+
evidence: {
|
|
26721
|
+
controller_class: type.name,
|
|
26722
|
+
controller_annotations: type.annotations,
|
|
26723
|
+
method: method.name,
|
|
26724
|
+
method_annotations: method.annotations,
|
|
26725
|
+
parameter_name: param.name,
|
|
26726
|
+
parameter_type: param.type
|
|
26727
|
+
}
|
|
26728
|
+
});
|
|
26729
|
+
emitted++;
|
|
26730
|
+
}
|
|
26731
|
+
}
|
|
26732
|
+
}
|
|
26733
|
+
return { controllerMethodsScanned: scanned, findingsEmitted: emitted };
|
|
26734
|
+
}
|
|
26735
|
+
}
|
|
26736
|
+
function annotationHead(annotation) {
|
|
26737
|
+
const parenIdx = annotation.indexOf("(");
|
|
26738
|
+
return parenIdx >= 0 ? annotation.slice(0, parenIdx) : annotation;
|
|
26739
|
+
}
|
|
26740
|
+
function hasAnnotation(annotations, names) {
|
|
26741
|
+
for (const a of annotations) {
|
|
26742
|
+
if (names.has(annotationHead(a)))
|
|
26743
|
+
return true;
|
|
26744
|
+
}
|
|
26745
|
+
return false;
|
|
26746
|
+
}
|
|
26747
|
+
function isController(type) {
|
|
26748
|
+
return hasAnnotation(type.annotations, CONTROLLER_ANNOTATIONS);
|
|
26749
|
+
}
|
|
26750
|
+
function isRouteHandler(method) {
|
|
26751
|
+
return hasAnnotation(method.annotations, ROUTE_ANNOTATIONS);
|
|
26752
|
+
}
|
|
26753
|
+
function isVulnerableParameter(param) {
|
|
26754
|
+
if (hasAnnotation(param.annotations, BINDING_ANNOTATIONS))
|
|
26755
|
+
return false;
|
|
26756
|
+
if (!param.type)
|
|
26757
|
+
return false;
|
|
26758
|
+
const type = stripGenerics2(param.type).trim();
|
|
26759
|
+
if (!type)
|
|
26760
|
+
return false;
|
|
26761
|
+
if (type.endsWith("[]")) {
|
|
26762
|
+
const elem = type.slice(0, -2).trim();
|
|
26763
|
+
return !SIMPLE_JAVA_TYPES.has(elem) && isPotentialPojo(elem);
|
|
26764
|
+
}
|
|
26765
|
+
if (SIMPLE_JAVA_TYPES.has(type))
|
|
26766
|
+
return false;
|
|
26767
|
+
if (FRAMEWORK_PARAM_TYPES.has(type))
|
|
26768
|
+
return false;
|
|
26769
|
+
if (!isPotentialPojo(type))
|
|
26770
|
+
return false;
|
|
26771
|
+
return true;
|
|
26772
|
+
}
|
|
26773
|
+
function stripGenerics2(type) {
|
|
26774
|
+
const ltIdx = type.indexOf("<");
|
|
26775
|
+
return ltIdx >= 0 ? type.slice(0, ltIdx) : type;
|
|
26776
|
+
}
|
|
26777
|
+
function isPotentialPojo(type) {
|
|
26778
|
+
if (type.length === 0)
|
|
26779
|
+
return false;
|
|
26780
|
+
const first = type.charCodeAt(0);
|
|
26781
|
+
return first >= 65 && first <= 90;
|
|
26782
|
+
}
|
|
26783
|
+
|
|
26550
26784
|
// ../circle-ir/dist/graph/import-graph.js
|
|
26551
26785
|
function dirname(filePath) {
|
|
26552
26786
|
const idx = filePath.lastIndexOf("/");
|
|
@@ -27655,6 +27889,8 @@ async function analyze(code, filePath, language, options = {}) {
|
|
|
27655
27889
|
pipeline.add(new NamingConventionPass(passOpts.namingConvention));
|
|
27656
27890
|
if (!disabledPasses.has("security-headers"))
|
|
27657
27891
|
pipeline.add(new SecurityHeadersPass(passOpts.securityHeaders));
|
|
27892
|
+
if (!disabledPasses.has("spring4shell"))
|
|
27893
|
+
pipeline.add(new Spring4ShellPass);
|
|
27658
27894
|
const { results, findings } = pipeline.run(graph, code, language, config);
|
|
27659
27895
|
const sinkFilter = results.get("sink-filter");
|
|
27660
27896
|
const interProc = results.get("interprocedural");
|
|
@@ -27848,7 +28084,7 @@ var colors = {
|
|
|
27848
28084
|
};
|
|
27849
28085
|
|
|
27850
28086
|
// src/version.ts
|
|
27851
|
-
var version = "3.
|
|
28087
|
+
var version = "3.48.0";
|
|
27852
28088
|
|
|
27853
28089
|
// src/formatters.ts
|
|
27854
28090
|
var SINK_SEVERITY = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cognium-dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.48.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.48.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/node": "^25.5.0",
|