cognium-dev 3.28.0 → 3.33.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 +600 -72
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -8990,6 +8990,484 @@ function findChildByTypeGo(node, type) {
|
|
|
8990
8990
|
}
|
|
8991
8991
|
return null;
|
|
8992
8992
|
}
|
|
8993
|
+
// ../circle-ir/dist/core/extractors/runtime-registrations.js
|
|
8994
|
+
var HTTP_VERB_METHODS = new Set([
|
|
8995
|
+
"get",
|
|
8996
|
+
"post",
|
|
8997
|
+
"put",
|
|
8998
|
+
"patch",
|
|
8999
|
+
"delete",
|
|
9000
|
+
"head",
|
|
9001
|
+
"options",
|
|
9002
|
+
"all"
|
|
9003
|
+
]);
|
|
9004
|
+
var MIDDLEWARE_METHODS = new Set(["use"]);
|
|
9005
|
+
var EVENT_LISTENER_METHODS = new Set(["on", "once", "ws"]);
|
|
9006
|
+
var EXPRESS_RECEIVER_NAMES = new Set([
|
|
9007
|
+
"app",
|
|
9008
|
+
"router",
|
|
9009
|
+
"server",
|
|
9010
|
+
"apiRouter",
|
|
9011
|
+
"fastify",
|
|
9012
|
+
"koa",
|
|
9013
|
+
"express"
|
|
9014
|
+
]);
|
|
9015
|
+
var FRAMEWORK_MODULE_PATTERNS = [
|
|
9016
|
+
/^express$/,
|
|
9017
|
+
/^@?fastify(\/.*)?$/,
|
|
9018
|
+
/^koa$/,
|
|
9019
|
+
/^restify$/,
|
|
9020
|
+
/^hapi$/,
|
|
9021
|
+
/^@nestjs\/common$/,
|
|
9022
|
+
/^@nestjs\/core$/
|
|
9023
|
+
];
|
|
9024
|
+
function extractRuntimeRegistrations(tree, cache, language, imports) {
|
|
9025
|
+
if (language === "javascript" || language === "typescript") {
|
|
9026
|
+
return extractJSRuntimeRegistrations(tree, cache, imports);
|
|
9027
|
+
}
|
|
9028
|
+
if (language === "python") {
|
|
9029
|
+
return extractPythonRuntimeRegistrations(tree, cache, imports);
|
|
9030
|
+
}
|
|
9031
|
+
return [];
|
|
9032
|
+
}
|
|
9033
|
+
function buildHandlerIndex(tree, cache, imports) {
|
|
9034
|
+
const decls = new Map;
|
|
9035
|
+
const recordDeclaration = (name2, node) => {
|
|
9036
|
+
if (!decls.has(name2)) {
|
|
9037
|
+
decls.set(name2, {
|
|
9038
|
+
line: node.startPosition.row + 1,
|
|
9039
|
+
column: node.startPosition.column
|
|
9040
|
+
});
|
|
9041
|
+
}
|
|
9042
|
+
};
|
|
9043
|
+
for (const fn of getNodesFromCache(tree.rootNode, "function_declaration", cache)) {
|
|
9044
|
+
const nameNode = fn.childForFieldName("name");
|
|
9045
|
+
if (nameNode)
|
|
9046
|
+
recordDeclaration(getNodeText(nameNode), fn);
|
|
9047
|
+
}
|
|
9048
|
+
const collectVarDeclarators = (parentType) => {
|
|
9049
|
+
for (const decl of getNodesFromCache(tree.rootNode, parentType, cache)) {
|
|
9050
|
+
for (let i2 = 0;i2 < decl.childCount; i2++) {
|
|
9051
|
+
const child = decl.child(i2);
|
|
9052
|
+
if (!child || child.type !== "variable_declarator")
|
|
9053
|
+
continue;
|
|
9054
|
+
const nameNode = child.childForFieldName("name");
|
|
9055
|
+
const valueNode = child.childForFieldName("value");
|
|
9056
|
+
if (!nameNode || !valueNode)
|
|
9057
|
+
continue;
|
|
9058
|
+
if (valueNode.type === "arrow_function" || valueNode.type === "function_expression" || valueNode.type === "function") {
|
|
9059
|
+
recordDeclaration(getNodeText(nameNode), child);
|
|
9060
|
+
}
|
|
9061
|
+
}
|
|
9062
|
+
}
|
|
9063
|
+
};
|
|
9064
|
+
collectVarDeclarators("lexical_declaration");
|
|
9065
|
+
collectVarDeclarators("variable_declaration");
|
|
9066
|
+
let hasFrameworkImport = false;
|
|
9067
|
+
if (imports) {
|
|
9068
|
+
for (const imp of imports) {
|
|
9069
|
+
const mod = imp.from_package ?? "";
|
|
9070
|
+
if (mod && FRAMEWORK_MODULE_PATTERNS.some((re) => re.test(mod))) {
|
|
9071
|
+
hasFrameworkImport = true;
|
|
9072
|
+
break;
|
|
9073
|
+
}
|
|
9074
|
+
}
|
|
9075
|
+
}
|
|
9076
|
+
return { declarations: decls, hasFrameworkImport };
|
|
9077
|
+
}
|
|
9078
|
+
function extractJSRuntimeRegistrations(tree, cache, imports) {
|
|
9079
|
+
const out2 = [];
|
|
9080
|
+
const index = buildHandlerIndex(tree, cache, imports);
|
|
9081
|
+
const callExpressions = getNodesFromCache(tree.rootNode, "call_expression", cache);
|
|
9082
|
+
for (const call of callExpressions) {
|
|
9083
|
+
const fnNode = call.childForFieldName("function");
|
|
9084
|
+
if (!fnNode || fnNode.type !== "member_expression")
|
|
9085
|
+
continue;
|
|
9086
|
+
const objectNode = fnNode.childForFieldName("object");
|
|
9087
|
+
const propertyNode = fnNode.childForFieldName("property");
|
|
9088
|
+
if (!objectNode || !propertyNode)
|
|
9089
|
+
continue;
|
|
9090
|
+
const method = getNodeText(propertyNode);
|
|
9091
|
+
const receiver = getNodeText(objectNode);
|
|
9092
|
+
const kind = classifyMethod(method);
|
|
9093
|
+
if (!kind)
|
|
9094
|
+
continue;
|
|
9095
|
+
if (!isExpressShapedReceiver(receiver) && !index.hasFrameworkImport) {
|
|
9096
|
+
continue;
|
|
9097
|
+
}
|
|
9098
|
+
const argsNode = call.childForFieldName("arguments");
|
|
9099
|
+
if (!argsNode)
|
|
9100
|
+
continue;
|
|
9101
|
+
const argNodes = getRealArgs(argsNode);
|
|
9102
|
+
if (argNodes.length === 0)
|
|
9103
|
+
continue;
|
|
9104
|
+
let path;
|
|
9105
|
+
let handlerStart = 0;
|
|
9106
|
+
const first = argNodes[0];
|
|
9107
|
+
if (first.type === "string") {
|
|
9108
|
+
path = stripQuotes(getNodeText(first));
|
|
9109
|
+
handlerStart = 1;
|
|
9110
|
+
} else if (first.type === "template_string" && !hasTemplateSubstitution(first)) {
|
|
9111
|
+
path = stripBackticks(getNodeText(first));
|
|
9112
|
+
handlerStart = 1;
|
|
9113
|
+
}
|
|
9114
|
+
for (let i2 = handlerStart;i2 < argNodes.length; i2++) {
|
|
9115
|
+
const handlerNode = argNodes[i2];
|
|
9116
|
+
const handler = resolveHandler(handlerNode, index);
|
|
9117
|
+
if (!handler)
|
|
9118
|
+
continue;
|
|
9119
|
+
out2.push({
|
|
9120
|
+
kind,
|
|
9121
|
+
framework: inferFramework(receiver, index.hasFrameworkImport),
|
|
9122
|
+
registrar: {
|
|
9123
|
+
method,
|
|
9124
|
+
receiver,
|
|
9125
|
+
line: call.startPosition.row + 1,
|
|
9126
|
+
column: call.startPosition.column
|
|
9127
|
+
},
|
|
9128
|
+
...path !== undefined ? { path } : {},
|
|
9129
|
+
handler
|
|
9130
|
+
});
|
|
9131
|
+
}
|
|
9132
|
+
}
|
|
9133
|
+
return out2;
|
|
9134
|
+
}
|
|
9135
|
+
function classifyMethod(method) {
|
|
9136
|
+
if (HTTP_VERB_METHODS.has(method))
|
|
9137
|
+
return "http_route";
|
|
9138
|
+
if (MIDDLEWARE_METHODS.has(method))
|
|
9139
|
+
return "middleware";
|
|
9140
|
+
if (EVENT_LISTENER_METHODS.has(method))
|
|
9141
|
+
return "event_listener";
|
|
9142
|
+
return null;
|
|
9143
|
+
}
|
|
9144
|
+
function isExpressShapedReceiver(receiver) {
|
|
9145
|
+
if (EXPRESS_RECEIVER_NAMES.has(receiver))
|
|
9146
|
+
return true;
|
|
9147
|
+
if (/(?:Router|App|Server)$/.test(receiver))
|
|
9148
|
+
return true;
|
|
9149
|
+
return false;
|
|
9150
|
+
}
|
|
9151
|
+
function inferFramework(receiver, hasFrameworkImport) {
|
|
9152
|
+
if (receiver === "fastify")
|
|
9153
|
+
return "fastify";
|
|
9154
|
+
if (receiver === "koa")
|
|
9155
|
+
return "koa";
|
|
9156
|
+
if (receiver === "express")
|
|
9157
|
+
return "express";
|
|
9158
|
+
return hasFrameworkImport ? "express" : "unknown";
|
|
9159
|
+
}
|
|
9160
|
+
function getRealArgs(argsNode) {
|
|
9161
|
+
const out2 = [];
|
|
9162
|
+
for (let i2 = 0;i2 < argsNode.childCount; i2++) {
|
|
9163
|
+
const child = argsNode.child(i2);
|
|
9164
|
+
if (!child)
|
|
9165
|
+
continue;
|
|
9166
|
+
if (child.type === "(" || child.type === ")" || child.type === ",")
|
|
9167
|
+
continue;
|
|
9168
|
+
out2.push(child);
|
|
9169
|
+
}
|
|
9170
|
+
return out2;
|
|
9171
|
+
}
|
|
9172
|
+
function stripQuotes(s) {
|
|
9173
|
+
if (s.length >= 2 && (s[0] === '"' || s[0] === "'") && s[s.length - 1] === s[0]) {
|
|
9174
|
+
return s.slice(1, -1);
|
|
9175
|
+
}
|
|
9176
|
+
return s;
|
|
9177
|
+
}
|
|
9178
|
+
function stripBackticks(s) {
|
|
9179
|
+
if (s.length >= 2 && s[0] === "`" && s[s.length - 1] === "`") {
|
|
9180
|
+
return s.slice(1, -1);
|
|
9181
|
+
}
|
|
9182
|
+
return s;
|
|
9183
|
+
}
|
|
9184
|
+
function hasTemplateSubstitution(node) {
|
|
9185
|
+
for (let i2 = 0;i2 < node.childCount; i2++) {
|
|
9186
|
+
const child = node.child(i2);
|
|
9187
|
+
if (child && child.type === "template_substitution")
|
|
9188
|
+
return true;
|
|
9189
|
+
}
|
|
9190
|
+
return false;
|
|
9191
|
+
}
|
|
9192
|
+
function resolveHandler(node, index) {
|
|
9193
|
+
if (node.type === "arrow_function" || node.type === "function_expression" || node.type === "function") {
|
|
9194
|
+
return {
|
|
9195
|
+
name: null,
|
|
9196
|
+
line: node.startPosition.row + 1,
|
|
9197
|
+
column: node.startPosition.column
|
|
9198
|
+
};
|
|
9199
|
+
}
|
|
9200
|
+
if (node.type === "identifier") {
|
|
9201
|
+
const name2 = getNodeText(node);
|
|
9202
|
+
const decl = index.declarations.get(name2);
|
|
9203
|
+
if (decl) {
|
|
9204
|
+
return { name: name2, line: decl.line, column: decl.column };
|
|
9205
|
+
}
|
|
9206
|
+
return {
|
|
9207
|
+
name: name2,
|
|
9208
|
+
line: node.startPosition.row + 1,
|
|
9209
|
+
column: node.startPosition.column
|
|
9210
|
+
};
|
|
9211
|
+
}
|
|
9212
|
+
if (node.type === "member_expression") {
|
|
9213
|
+
return {
|
|
9214
|
+
name: getNodeText(node),
|
|
9215
|
+
line: node.startPosition.row + 1,
|
|
9216
|
+
column: node.startPosition.column
|
|
9217
|
+
};
|
|
9218
|
+
}
|
|
9219
|
+
return null;
|
|
9220
|
+
}
|
|
9221
|
+
var PY_HTTP_ROUTE_METHODS = new Set([
|
|
9222
|
+
"route",
|
|
9223
|
+
"get",
|
|
9224
|
+
"post",
|
|
9225
|
+
"put",
|
|
9226
|
+
"patch",
|
|
9227
|
+
"delete",
|
|
9228
|
+
"head",
|
|
9229
|
+
"options"
|
|
9230
|
+
]);
|
|
9231
|
+
var PY_MIDDLEWARE_METHODS = new Set([
|
|
9232
|
+
"before_request",
|
|
9233
|
+
"after_request",
|
|
9234
|
+
"teardown_request",
|
|
9235
|
+
"before_first_request",
|
|
9236
|
+
"teardown_appcontext",
|
|
9237
|
+
"middleware"
|
|
9238
|
+
]);
|
|
9239
|
+
var PY_EVENT_METHODS = new Set([
|
|
9240
|
+
"errorhandler",
|
|
9241
|
+
"on_event",
|
|
9242
|
+
"exception_handler"
|
|
9243
|
+
]);
|
|
9244
|
+
var PY_STDLIB_DECORATORS = new Set([
|
|
9245
|
+
"property",
|
|
9246
|
+
"staticmethod",
|
|
9247
|
+
"classmethod",
|
|
9248
|
+
"abstractmethod",
|
|
9249
|
+
"cached_property",
|
|
9250
|
+
"dataclass",
|
|
9251
|
+
"cache",
|
|
9252
|
+
"lru_cache",
|
|
9253
|
+
"singledispatch",
|
|
9254
|
+
"singledispatchmethod",
|
|
9255
|
+
"contextmanager",
|
|
9256
|
+
"asynccontextmanager",
|
|
9257
|
+
"final",
|
|
9258
|
+
"override",
|
|
9259
|
+
"wraps"
|
|
9260
|
+
]);
|
|
9261
|
+
function summarisePythonImports(imports) {
|
|
9262
|
+
const s = {
|
|
9263
|
+
hasFlask: false,
|
|
9264
|
+
hasFastApi: false,
|
|
9265
|
+
hasCelery: false,
|
|
9266
|
+
hasNumba: false,
|
|
9267
|
+
hasClick: false,
|
|
9268
|
+
hasPytest: false
|
|
9269
|
+
};
|
|
9270
|
+
if (!imports)
|
|
9271
|
+
return s;
|
|
9272
|
+
for (const imp of imports) {
|
|
9273
|
+
const mod = imp.from_package ?? "";
|
|
9274
|
+
if (!mod)
|
|
9275
|
+
continue;
|
|
9276
|
+
if (/^flask(\b|\.)/.test(mod))
|
|
9277
|
+
s.hasFlask = true;
|
|
9278
|
+
if (/^fastapi(\b|\.)/.test(mod) || /^starlette(\b|\.)/.test(mod))
|
|
9279
|
+
s.hasFastApi = true;
|
|
9280
|
+
if (/^celery(\b|\.)/.test(mod))
|
|
9281
|
+
s.hasCelery = true;
|
|
9282
|
+
if (/^numba(\b|\.)/.test(mod))
|
|
9283
|
+
s.hasNumba = true;
|
|
9284
|
+
if (/^click(\b|\.)/.test(mod))
|
|
9285
|
+
s.hasClick = true;
|
|
9286
|
+
if (/^pytest(\b|\.)/.test(mod))
|
|
9287
|
+
s.hasPytest = true;
|
|
9288
|
+
}
|
|
9289
|
+
return s;
|
|
9290
|
+
}
|
|
9291
|
+
function extractPythonRuntimeRegistrations(tree, cache, imports) {
|
|
9292
|
+
const out2 = [];
|
|
9293
|
+
const importSummary = summarisePythonImports(imports);
|
|
9294
|
+
const decoratedDefs = getNodesFromCache(tree.rootNode, "decorated_definition", cache);
|
|
9295
|
+
for (const dd of decoratedDefs) {
|
|
9296
|
+
let fnNode = null;
|
|
9297
|
+
const decorators = [];
|
|
9298
|
+
for (let i2 = 0;i2 < dd.childCount; i2++) {
|
|
9299
|
+
const child = dd.child(i2);
|
|
9300
|
+
if (!child)
|
|
9301
|
+
continue;
|
|
9302
|
+
if (child.type === "decorator") {
|
|
9303
|
+
decorators.push(child);
|
|
9304
|
+
} else if (child.type === "function_definition" || child.type === "async_function_definition") {
|
|
9305
|
+
fnNode = child;
|
|
9306
|
+
}
|
|
9307
|
+
}
|
|
9308
|
+
if (!fnNode || decorators.length === 0)
|
|
9309
|
+
continue;
|
|
9310
|
+
const handler = pythonHandlerFromFunctionDef(fnNode);
|
|
9311
|
+
if (!handler)
|
|
9312
|
+
continue;
|
|
9313
|
+
for (const dec of decorators) {
|
|
9314
|
+
const parsed = parsePythonDecorator(dec);
|
|
9315
|
+
if (!parsed)
|
|
9316
|
+
continue;
|
|
9317
|
+
const { receiver, method, path, line, column } = parsed;
|
|
9318
|
+
const { kind, framework } = classifyPythonDecorator(receiver, method, importSummary);
|
|
9319
|
+
out2.push({
|
|
9320
|
+
kind,
|
|
9321
|
+
framework,
|
|
9322
|
+
registrar: { method, receiver, line, column },
|
|
9323
|
+
...path !== undefined ? { path } : {},
|
|
9324
|
+
handler
|
|
9325
|
+
});
|
|
9326
|
+
}
|
|
9327
|
+
}
|
|
9328
|
+
return out2;
|
|
9329
|
+
}
|
|
9330
|
+
function pythonHandlerFromFunctionDef(fn) {
|
|
9331
|
+
const nameNode = fn.childForFieldName("name");
|
|
9332
|
+
if (!nameNode)
|
|
9333
|
+
return null;
|
|
9334
|
+
return {
|
|
9335
|
+
name: getNodeText(nameNode),
|
|
9336
|
+
line: fn.startPosition.row + 1,
|
|
9337
|
+
column: fn.startPosition.column
|
|
9338
|
+
};
|
|
9339
|
+
}
|
|
9340
|
+
function parsePythonDecorator(dec) {
|
|
9341
|
+
let target = null;
|
|
9342
|
+
for (let i2 = 0;i2 < dec.childCount; i2++) {
|
|
9343
|
+
const child = dec.child(i2);
|
|
9344
|
+
if (!child || child.type === "@")
|
|
9345
|
+
continue;
|
|
9346
|
+
target = child;
|
|
9347
|
+
break;
|
|
9348
|
+
}
|
|
9349
|
+
if (!target)
|
|
9350
|
+
return null;
|
|
9351
|
+
const line = dec.startPosition.row + 1;
|
|
9352
|
+
const column = dec.startPosition.column;
|
|
9353
|
+
if (target.type === "identifier") {
|
|
9354
|
+
return { receiver: "", method: getNodeText(target), line, column };
|
|
9355
|
+
}
|
|
9356
|
+
if (target.type === "attribute") {
|
|
9357
|
+
const { receiver, method } = splitDottedAttribute(target);
|
|
9358
|
+
return { receiver, method, line, column };
|
|
9359
|
+
}
|
|
9360
|
+
if (target.type === "call") {
|
|
9361
|
+
const fnNode = target.childForFieldName("function");
|
|
9362
|
+
if (!fnNode)
|
|
9363
|
+
return null;
|
|
9364
|
+
let receiver = "";
|
|
9365
|
+
let method = "";
|
|
9366
|
+
if (fnNode.type === "identifier") {
|
|
9367
|
+
method = getNodeText(fnNode);
|
|
9368
|
+
} else if (fnNode.type === "attribute") {
|
|
9369
|
+
const split = splitDottedAttribute(fnNode);
|
|
9370
|
+
receiver = split.receiver;
|
|
9371
|
+
method = split.method;
|
|
9372
|
+
} else {
|
|
9373
|
+
method = getNodeText(fnNode);
|
|
9374
|
+
}
|
|
9375
|
+
const path = extractFirstStringArg(target);
|
|
9376
|
+
return { receiver, method, path, line, column };
|
|
9377
|
+
}
|
|
9378
|
+
return null;
|
|
9379
|
+
}
|
|
9380
|
+
function splitDottedAttribute(attr) {
|
|
9381
|
+
const objectNode = attr.childForFieldName("object");
|
|
9382
|
+
const attrNode = attr.childForFieldName("attribute");
|
|
9383
|
+
const method = attrNode ? getNodeText(attrNode) : "";
|
|
9384
|
+
const receiver = objectNode ? getNodeText(objectNode) : "";
|
|
9385
|
+
return { receiver, method };
|
|
9386
|
+
}
|
|
9387
|
+
function extractFirstStringArg(call) {
|
|
9388
|
+
const argsNode = call.childForFieldName("arguments");
|
|
9389
|
+
if (!argsNode)
|
|
9390
|
+
return;
|
|
9391
|
+
for (let i2 = 0;i2 < argsNode.childCount; i2++) {
|
|
9392
|
+
const child = argsNode.child(i2);
|
|
9393
|
+
if (!child)
|
|
9394
|
+
continue;
|
|
9395
|
+
if (child.type === "(" || child.type === ")" || child.type === ",")
|
|
9396
|
+
continue;
|
|
9397
|
+
if (child.type === "string") {
|
|
9398
|
+
return stripPythonStringQuotes(getNodeText(child));
|
|
9399
|
+
}
|
|
9400
|
+
return;
|
|
9401
|
+
}
|
|
9402
|
+
return;
|
|
9403
|
+
}
|
|
9404
|
+
function stripPythonStringQuotes(s) {
|
|
9405
|
+
const m = s.match(/^[bBrRuUfF]{0,2}(['"])(.*)\1$/s);
|
|
9406
|
+
if (m)
|
|
9407
|
+
return m[2];
|
|
9408
|
+
if (s.length >= 2 && (s[0] === '"' || s[0] === "'") && s[s.length - 1] === s[0]) {
|
|
9409
|
+
return s.slice(1, -1);
|
|
9410
|
+
}
|
|
9411
|
+
return s;
|
|
9412
|
+
}
|
|
9413
|
+
function classifyPythonDecorator(receiver, method, imp) {
|
|
9414
|
+
if (!receiver && PY_STDLIB_DECORATORS.has(method)) {
|
|
9415
|
+
return { kind: "decorator", framework: "stdlib" };
|
|
9416
|
+
}
|
|
9417
|
+
if (receiver) {
|
|
9418
|
+
const head = receiver.split(".")[0];
|
|
9419
|
+
if (head === "pytest") {
|
|
9420
|
+
return { kind: "decorator", framework: "pytest" };
|
|
9421
|
+
}
|
|
9422
|
+
if (head === "click") {
|
|
9423
|
+
return { kind: "decorator", framework: "click" };
|
|
9424
|
+
}
|
|
9425
|
+
if (head === "numba" || head === "nb") {
|
|
9426
|
+
return { kind: "decorator", framework: "numba" };
|
|
9427
|
+
}
|
|
9428
|
+
if (head === "celery") {
|
|
9429
|
+
return { kind: "decorator", framework: "celery" };
|
|
9430
|
+
}
|
|
9431
|
+
}
|
|
9432
|
+
if (receiver && PY_HTTP_ROUTE_METHODS.has(method)) {
|
|
9433
|
+
const isRoutey = isPyRouterReceiver(receiver);
|
|
9434
|
+
if (isRoutey) {
|
|
9435
|
+
let framework = "unknown";
|
|
9436
|
+
if (imp.hasFlask)
|
|
9437
|
+
framework = "flask";
|
|
9438
|
+
else if (imp.hasFastApi)
|
|
9439
|
+
framework = "fastapi";
|
|
9440
|
+
else if (method === "route")
|
|
9441
|
+
framework = "flask";
|
|
9442
|
+
else
|
|
9443
|
+
framework = "fastapi";
|
|
9444
|
+
return { kind: "http_route", framework };
|
|
9445
|
+
}
|
|
9446
|
+
}
|
|
9447
|
+
if (receiver && PY_MIDDLEWARE_METHODS.has(method)) {
|
|
9448
|
+
return { kind: "middleware", framework: imp.hasFlask ? "flask" : imp.hasFastApi ? "fastapi" : "unknown" };
|
|
9449
|
+
}
|
|
9450
|
+
if (receiver && PY_EVENT_METHODS.has(method)) {
|
|
9451
|
+
return { kind: "event_listener", framework: imp.hasFlask ? "flask" : imp.hasFastApi ? "fastapi" : "unknown" };
|
|
9452
|
+
}
|
|
9453
|
+
if (method === "task" && imp.hasCelery) {
|
|
9454
|
+
return { kind: "decorator", framework: "celery" };
|
|
9455
|
+
}
|
|
9456
|
+
if (!receiver && (method === "login_required" || method === "require_http_methods" || method === "api_view")) {
|
|
9457
|
+
return { kind: "decorator", framework: "django" };
|
|
9458
|
+
}
|
|
9459
|
+
return { kind: "decorator", framework: "unknown" };
|
|
9460
|
+
}
|
|
9461
|
+
function isPyRouterReceiver(receiver) {
|
|
9462
|
+
const head = receiver.split(".")[0];
|
|
9463
|
+
if (!head)
|
|
9464
|
+
return false;
|
|
9465
|
+
if (["app", "router", "blueprint", "bp", "api", "application"].includes(head))
|
|
9466
|
+
return true;
|
|
9467
|
+
if (/_(router|bp|blueprint|app|api)$/.test(head))
|
|
9468
|
+
return true;
|
|
9469
|
+
return false;
|
|
9470
|
+
}
|
|
8993
9471
|
// ../circle-ir/dist/analysis/config-loader.js
|
|
8994
9472
|
var DEFAULT_SOURCES = [
|
|
8995
9473
|
{ method: "getParameter", class: "HttpServletRequest", type: "http_param", severity: "high", return_tainted: true },
|
|
@@ -9010,6 +9488,9 @@ var DEFAULT_SOURCES = [
|
|
|
9010
9488
|
{ method: "getContextPath", class: "HttpServletRequest", type: "http_path", severity: "medium", return_tainted: true },
|
|
9011
9489
|
{ method: "getRemoteHost", class: "HttpServletRequest", type: "http_header", severity: "medium", return_tainted: true },
|
|
9012
9490
|
{ method: "getRemoteAddr", class: "HttpServletRequest", type: "http_header", severity: "medium", return_tainted: true },
|
|
9491
|
+
{ method: "getPathWithinApplication", class: "WebUtils", type: "http_path", severity: "high", return_tainted: true },
|
|
9492
|
+
{ method: "getRequestUri", class: "WebUtils", type: "http_path", severity: "high", return_tainted: true },
|
|
9493
|
+
{ method: "decodeRequestString", class: "WebUtils", type: "http_path", severity: "high", return_tainted: true },
|
|
9013
9494
|
{ method: "getProtocol", class: "HttpServletRequest", type: "http_header", severity: "medium", return_tainted: true },
|
|
9014
9495
|
{ method: "getScheme", class: "HttpServletRequest", type: "http_header", severity: "medium", return_tainted: true },
|
|
9015
9496
|
{ method: "getAuthType", class: "HttpServletRequest", type: "http_header", severity: "medium", return_tainted: true },
|
|
@@ -9122,6 +9603,11 @@ var DEFAULT_SOURCES = [
|
|
|
9122
9603
|
{ method: "getContent", class: "Block", type: "io_input", severity: "high", return_tainted: true },
|
|
9123
9604
|
{ method: "getParameters", class: "Block", type: "io_input", severity: "high", return_tainted: true },
|
|
9124
9605
|
{ method: "getRawContent", type: "io_input", severity: "high", return_tainted: true },
|
|
9606
|
+
{ method: "get", class: "XWikiRequest", type: "http_param", severity: "high", return_tainted: true },
|
|
9607
|
+
{ method: "getParameter", class: "XWikiRequest", type: "http_param", severity: "high", return_tainted: true },
|
|
9608
|
+
{ method: "getParameterValues", class: "XWikiRequest", type: "http_param", severity: "high", return_tainted: true },
|
|
9609
|
+
{ method: "getParameterMap", class: "XWikiRequest", type: "http_param", severity: "high", return_tainted: true },
|
|
9610
|
+
{ method: "getHeader", class: "XWikiRequest", type: "http_header", severity: "high", return_tainted: true },
|
|
9125
9611
|
{ method: "getAttributes", class: "XMLReader", type: "io_input", severity: "high", return_tainted: true },
|
|
9126
9612
|
{ method: "getValue", class: "Attributes", type: "io_input", severity: "high", return_tainted: true },
|
|
9127
9613
|
{ method: "getLocalName", class: "Attributes", type: "io_input", severity: "high", return_tainted: true },
|
|
@@ -9307,7 +9793,6 @@ var DEFAULT_SINKS = [
|
|
|
9307
9793
|
{ method: "start", class: "ProcessBuilder", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [] },
|
|
9308
9794
|
{ method: "ProcessBuilder", class: "constructor", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9309
9795
|
{ method: "command", class: "ProcessBuilder", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9310
|
-
{ method: "execute", class: "Executor", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9311
9796
|
{ method: "execute", class: "DefaultExecutor", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9312
9797
|
{ method: "CommandLine", class: "constructor", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9313
9798
|
{ method: "parse", class: "CommandLine", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
@@ -9360,15 +9845,14 @@ var DEFAULT_SINKS = [
|
|
|
9360
9845
|
{ method: "fork", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9361
9846
|
{ method: "popen", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9362
9847
|
{ method: "system", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9363
|
-
{ method: "
|
|
9364
|
-
{ method: "setCommandline", class: "Executor", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9848
|
+
{ method: "setCommandline", class: "DefaultExecutor", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9365
9849
|
{ method: "parse", class: "CommandLine", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9366
9850
|
{ method: "addArgument", class: "CommandLine", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9367
9851
|
{ method: "waitFor", class: "Process", type: "command_injection", cwe: "CWE-78", severity: "medium", arg_positions: [] },
|
|
9368
9852
|
{ method: "inheritIO", class: "ProcessBuilder", type: "command_injection", cwe: "CWE-78", severity: "medium", arg_positions: [] },
|
|
9369
9853
|
{ method: "redirectOutput", class: "ProcessBuilder", type: "command_injection", cwe: "CWE-78", severity: "medium", arg_positions: [0] },
|
|
9370
9854
|
{ method: "redirectInput", class: "ProcessBuilder", type: "command_injection", cwe: "CWE-78", severity: "medium", arg_positions: [0] },
|
|
9371
|
-
{ method: "File", class: "constructor", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9855
|
+
{ method: "File", class: "constructor", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0, 1] },
|
|
9372
9856
|
{ method: "FileInputStream", class: "constructor", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9373
9857
|
{ method: "FileOutputStream", class: "constructor", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9374
9858
|
{ method: "FileReader", class: "constructor", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
@@ -9621,6 +10105,8 @@ var DEFAULT_SINKS = [
|
|
|
9621
10105
|
{ method: "eval", class: "MVEL", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
9622
10106
|
{ method: "createValueExpression", class: "ExpressionFactory", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [1] },
|
|
9623
10107
|
{ method: "createMethodExpression", class: "ExpressionFactory", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [1] },
|
|
10108
|
+
{ method: "evaluateAttributeExpressions", class: "PropertyValue", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [] },
|
|
10109
|
+
{ method: "evaluateAttributeExpressions", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [] },
|
|
9624
10110
|
{ method: "evaluate", class: "GroovyShell", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
9625
10111
|
{ method: "parse", class: "GroovyShell", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
9626
10112
|
{ method: "parseClass", class: "GroovyClassLoader", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
@@ -9774,6 +10260,21 @@ var DEFAULT_SINKS = [
|
|
|
9774
10260
|
{ method: "cleanAttributes", class: "XHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9775
10261
|
{ method: "printXMLElement", class: "XHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9776
10262
|
{ method: "printXMLStartElement", class: "XHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10263
|
+
{ method: "print", class: "WikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10264
|
+
{ method: "println", class: "WikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10265
|
+
{ method: "print", class: "DefaultWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10266
|
+
{ method: "println", class: "DefaultWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10267
|
+
{ method: "print", class: "XHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10268
|
+
{ method: "println", class: "XHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10269
|
+
{ method: "printXML", class: "XHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10270
|
+
{ method: "printXMLComment", class: "XHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10271
|
+
{ method: "print", class: "AnnotatedXHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10272
|
+
{ method: "println", class: "AnnotatedXHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10273
|
+
{ method: "printXMLElement", class: "AnnotatedXHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10274
|
+
{ method: "printXMLStartElement", class: "AnnotatedXHTMLWikiPrinter", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10275
|
+
{ method: "render", class: "BlockRenderer", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10276
|
+
{ method: "render", class: "AbstractBlockRenderer", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10277
|
+
{ method: "render", class: "DefaultBlockRenderer", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9777
10278
|
{ method: "initialize", class: "HTML5Renderer", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9778
10279
|
{ method: "initialize", class: "XHTMLRenderer", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9779
10280
|
{ method: "beginFormat", class: "HTML5ChainingRenderer", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
@@ -9841,10 +10342,10 @@ var DEFAULT_SINKS = [
|
|
|
9841
10342
|
{ method: "spawn", class: "child_process", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9842
10343
|
{ method: "spawnSync", class: "child_process", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9843
10344
|
{ method: "exec", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0] },
|
|
9844
|
-
{ method: "execSync", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0] },
|
|
9845
|
-
{ method: "spawn", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0] },
|
|
9846
|
-
{ method: "spawnSync", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0] },
|
|
9847
|
-
{ method: "execFile", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0] },
|
|
10345
|
+
{ method: "execSync", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
10346
|
+
{ method: "spawn", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
10347
|
+
{ method: "spawnSync", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
10348
|
+
{ method: "execFile", type: "command_injection", cwe: "CWE-78", severity: "high", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
9848
10349
|
{ method: "readFile", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0] },
|
|
9849
10350
|
{ method: "readFileSync", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0] },
|
|
9850
10351
|
{ method: "writeFile", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0] },
|
|
@@ -9855,17 +10356,17 @@ var DEFAULT_SINKS = [
|
|
|
9855
10356
|
{ method: "rmdir", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0] },
|
|
9856
10357
|
{ method: "createReadStream", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0] },
|
|
9857
10358
|
{ method: "createWriteStream", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0] },
|
|
9858
|
-
{ method: "query", class: "Connection", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
9859
|
-
{ method: "query", class: "Pool", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
9860
|
-
{ method: "query", class: "Client", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
9861
|
-
{ method: "raw", type: "sql_injection", cwe: "CWE-89", severity: "high", arg_positions: [0] },
|
|
10359
|
+
{ method: "query", class: "Connection", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
10360
|
+
{ method: "query", class: "Pool", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
10361
|
+
{ method: "query", class: "Client", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
10362
|
+
{ method: "raw", type: "sql_injection", cwe: "CWE-89", severity: "high", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
9862
10363
|
{ method: "setAttribute", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [1] },
|
|
9863
10364
|
{ method: "send", class: "Response", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9864
10365
|
{ method: "write", class: "Response", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9865
10366
|
{ method: "end", class: "Response", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9866
10367
|
{ method: "html", class: "Response", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9867
10368
|
{ method: "render", class: "Response", type: "xss", cwe: "CWE-79", severity: "medium", arg_positions: [1] },
|
|
9868
|
-
{ method: "eval", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
10369
|
+
{ method: "eval", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
9869
10370
|
{ method: "Function", class: "constructor", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
9870
10371
|
{ method: "runInContext", class: "vm", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
9871
10372
|
{ method: "runInNewContext", class: "vm", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
@@ -9879,7 +10380,7 @@ var DEFAULT_SINKS = [
|
|
|
9879
10380
|
{ method: "get", class: "axios", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
9880
10381
|
{ method: "post", class: "axios", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
9881
10382
|
{ method: "request", class: "axios", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
9882
|
-
{ method: "fetch", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
10383
|
+
{ method: "fetch", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0], languages: ["javascript", "typescript"] },
|
|
9883
10384
|
{ method: "request", class: "http", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
9884
10385
|
{ method: "get", class: "http", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
9885
10386
|
{ method: "request", class: "https", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
@@ -9899,39 +10400,39 @@ var DEFAULT_SINKS = [
|
|
|
9899
10400
|
{ method: "check_output", class: "subprocess", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9900
10401
|
{ method: "check_call", class: "subprocess", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9901
10402
|
{ method: "Popen", class: "subprocess", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9902
|
-
{ method: "eval", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
9903
|
-
{ method: "exec", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0] },
|
|
9904
|
-
{ method: "compile", type: "code_injection", cwe: "CWE-94", severity: "high", arg_positions: [0] },
|
|
9905
|
-
{ method: "__import__", type: "code_injection", cwe: "CWE-94", severity: "high", arg_positions: [0] },
|
|
10403
|
+
{ method: "eval", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0], languages: ["python"] },
|
|
10404
|
+
{ method: "exec", type: "code_injection", cwe: "CWE-94", severity: "critical", arg_positions: [0], languages: ["python"] },
|
|
10405
|
+
{ method: "compile", type: "code_injection", cwe: "CWE-94", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
10406
|
+
{ method: "__import__", type: "code_injection", cwe: "CWE-94", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
9906
10407
|
{ method: "loads", class: "pickle", type: "deserialization", cwe: "CWE-502", severity: "critical", arg_positions: [0] },
|
|
9907
10408
|
{ method: "load", class: "pickle", type: "deserialization", cwe: "CWE-502", severity: "critical", arg_positions: [0] },
|
|
9908
10409
|
{ method: "loads", class: "marshal", type: "deserialization", cwe: "CWE-502", severity: "critical", arg_positions: [0] },
|
|
9909
10410
|
{ method: "load", class: "yaml", type: "deserialization", cwe: "CWE-502", severity: "critical", arg_positions: [0] },
|
|
9910
10411
|
{ method: "loads", class: "yaml", type: "deserialization", cwe: "CWE-502", severity: "critical", arg_positions: [0] },
|
|
9911
|
-
{ method: "execute", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
9912
|
-
{ method: "executemany", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
9913
|
-
{ method: "raw", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
9914
|
-
{ method: "extra", type: "sql_injection", cwe: "CWE-89", severity: "high", arg_positions: [0] },
|
|
9915
|
-
{ method: "open", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10412
|
+
{ method: "execute", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["python"] },
|
|
10413
|
+
{ method: "executemany", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["python"] },
|
|
10414
|
+
{ method: "raw", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["python"] },
|
|
10415
|
+
{ method: "extra", type: "sql_injection", cwe: "CWE-89", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
10416
|
+
{ method: "open", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
9916
10417
|
{ method: "remove", class: "os", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9917
10418
|
{ method: "unlink", class: "os", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9918
10419
|
{ method: "rmdir", class: "os", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9919
10420
|
{ method: "rmtree", class: "shutil", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0] },
|
|
9920
|
-
{ method: "send_file", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
9921
|
-
{ method: "render_template_string", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9922
|
-
{ method: "Markup", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
9923
|
-
{ method: "mark_safe", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0] },
|
|
10421
|
+
{ method: "send_file", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
10422
|
+
{ method: "render_template_string", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
10423
|
+
{ method: "Markup", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
10424
|
+
{ method: "mark_safe", type: "xss", cwe: "CWE-79", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
9924
10425
|
{ method: "get", class: "requests", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
9925
10426
|
{ method: "post", class: "requests", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
9926
10427
|
{ method: "urlopen", class: "urllib.request", type: "ssrf", cwe: "CWE-918", severity: "high", arg_positions: [0] },
|
|
9927
|
-
{ method: "redirect", type: "open_redirect", cwe: "CWE-601", severity: "medium", arg_positions: [0] },
|
|
9928
|
-
{ method: "xpath", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0] },
|
|
10428
|
+
{ method: "redirect", type: "open_redirect", cwe: "CWE-601", severity: "medium", arg_positions: [0], languages: ["python"] },
|
|
10429
|
+
{ method: "xpath", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
9929
10430
|
{ method: "find", class: "etree", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0] },
|
|
9930
10431
|
{ method: "findall", class: "etree", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0] },
|
|
9931
10432
|
{ method: "iterfind", class: "etree", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0] },
|
|
9932
10433
|
{ method: "XPath", class: "lxml", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0] },
|
|
9933
10434
|
{ method: "select", class: "elementpath", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [1] },
|
|
9934
|
-
{ method: "select", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0] },
|
|
10435
|
+
{ method: "select", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0], languages: ["python"] },
|
|
9935
10436
|
{ method: "iter_select", class: "elementpath", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [1] },
|
|
9936
10437
|
{ method: "Selector", class: "elementpath", type: "xpath_injection", cwe: "CWE-643", severity: "high", arg_positions: [0] },
|
|
9937
10438
|
{ method: "parse", class: "etree", type: "xxe", cwe: "CWE-611", severity: "high", arg_positions: [0] },
|
|
@@ -9997,33 +10498,33 @@ var DEFAULT_SINKS = [
|
|
|
9997
10498
|
{ method: "new", class: "Command", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9998
10499
|
{ method: "arg", class: "Command", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
9999
10500
|
{ method: "args", class: "Command", type: "command_injection", cwe: "CWE-78", severity: "critical", arg_positions: [0] },
|
|
10000
|
-
{ method: "query", class: "Client", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10001
|
-
{ method: "execute", class: "Client", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10002
|
-
{ method: "query", class: "Pool", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10003
|
-
{ method: "execute", class: "Pool", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10004
|
-
{ method: "sql_query", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10005
|
-
{ method: "raw_sql", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10006
|
-
{ method: "execute", class: "Connection", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10007
|
-
{ method: "query_row", class: "Connection", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10008
|
-
{ method: "prepare", class: "Connection", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10501
|
+
{ method: "query", class: "Client", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10502
|
+
{ method: "execute", class: "Client", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10503
|
+
{ method: "query", class: "Pool", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10504
|
+
{ method: "execute", class: "Pool", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10505
|
+
{ method: "sql_query", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10506
|
+
{ method: "raw_sql", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10507
|
+
{ method: "execute", class: "Connection", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10508
|
+
{ method: "query_row", class: "Connection", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10509
|
+
{ method: "prepare", class: "Connection", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10009
10510
|
{ method: "query", class: "sqlx", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10010
|
-
{ method: "prepare", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10011
|
-
{ method: "execute", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10012
|
-
{ method: "query_map", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0] },
|
|
10511
|
+
{ method: "prepare", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10512
|
+
{ method: "execute", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10513
|
+
{ method: "query_map", type: "sql_injection", cwe: "CWE-89", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10013
10514
|
{ method: "open", class: "File", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10014
10515
|
{ method: "create", class: "File", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10015
|
-
{ method: "read_dir", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10016
|
-
{ method: "remove_file", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10017
|
-
{ method: "remove_dir", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10018
|
-
{ method: "remove_dir_all", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0] },
|
|
10019
|
-
{ method: "copy", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0, 1] },
|
|
10020
|
-
{ method: "rename", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0, 1] },
|
|
10021
|
-
{ method: "write", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10022
|
-
{ method: "read_to_string", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10023
|
-
{ method: "create_dir", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10024
|
-
{ method: "create_dir_all", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10025
|
-
{ method: "metadata", type: "path_traversal", cwe: "CWE-22", severity: "medium", arg_positions: [0] },
|
|
10026
|
-
{ method: "symlink_metadata", type: "path_traversal", cwe: "CWE-22", severity: "medium", arg_positions: [0] },
|
|
10516
|
+
{ method: "read_dir", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["rust"] },
|
|
10517
|
+
{ method: "remove_file", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["rust"] },
|
|
10518
|
+
{ method: "remove_dir", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["rust"] },
|
|
10519
|
+
{ method: "remove_dir_all", type: "path_traversal", cwe: "CWE-22", severity: "critical", arg_positions: [0], languages: ["rust"] },
|
|
10520
|
+
{ method: "copy", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0, 1], languages: ["rust"] },
|
|
10521
|
+
{ method: "rename", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0, 1], languages: ["rust"] },
|
|
10522
|
+
{ method: "write", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["rust"] },
|
|
10523
|
+
{ method: "read_to_string", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["rust"] },
|
|
10524
|
+
{ method: "create_dir", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["rust"] },
|
|
10525
|
+
{ method: "create_dir_all", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0], languages: ["rust"] },
|
|
10526
|
+
{ method: "metadata", type: "path_traversal", cwe: "CWE-22", severity: "medium", arg_positions: [0], languages: ["rust"] },
|
|
10527
|
+
{ method: "symlink_metadata", type: "path_traversal", cwe: "CWE-22", severity: "medium", arg_positions: [0], languages: ["rust"] },
|
|
10027
10528
|
{ method: "read_to_string", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10028
10529
|
{ method: "write", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
10029
10530
|
{ method: "create_dir_all", class: "fs", type: "path_traversal", cwe: "CWE-22", severity: "high", arg_positions: [0] },
|
|
@@ -10305,9 +10806,9 @@ var PYTHON_TAINTED_PATTERNS = [
|
|
|
10305
10806
|
{ pattern: /\brequest\.query_params\b/, sourceType: "http_param" },
|
|
10306
10807
|
{ pattern: /\brequest\.path_params\b/, sourceType: "http_param" }
|
|
10307
10808
|
];
|
|
10308
|
-
function analyzeTaint(calls, types, config = getDefaultConfig(), typeHierarchy) {
|
|
10809
|
+
function analyzeTaint(calls, types, config = getDefaultConfig(), typeHierarchy, language) {
|
|
10309
10810
|
const sources = findSources(calls, types, config.sources);
|
|
10310
|
-
const sinks = findSinks(calls, config.sinks, typeHierarchy);
|
|
10811
|
+
const sinks = findSinks(calls, config.sinks, typeHierarchy, language);
|
|
10311
10812
|
const sanitizers = findSanitizers(calls, types, config.sanitizers);
|
|
10312
10813
|
return { sources, sinks, sanitizers };
|
|
10313
10814
|
}
|
|
@@ -10554,11 +11055,11 @@ function isParameterizedQueryCall(call, pattern) {
|
|
|
10554
11055
|
}
|
|
10555
11056
|
return false;
|
|
10556
11057
|
}
|
|
10557
|
-
function findSinks(calls, patterns, typeHierarchy) {
|
|
11058
|
+
function findSinks(calls, patterns, typeHierarchy, language) {
|
|
10558
11059
|
const sinkMap = new Map;
|
|
10559
11060
|
for (const call of calls) {
|
|
10560
11061
|
for (const pattern of patterns) {
|
|
10561
|
-
if (matchesSinkPattern(call, pattern, typeHierarchy)) {
|
|
11062
|
+
if (matchesSinkPattern(call, pattern, typeHierarchy, language)) {
|
|
10562
11063
|
if (isParameterizedQueryCall(call, pattern)) {
|
|
10563
11064
|
continue;
|
|
10564
11065
|
}
|
|
@@ -10806,7 +11307,12 @@ function isKnownSafeReceiverForMethod(receiver, method, sinkType) {
|
|
|
10806
11307
|
}
|
|
10807
11308
|
return false;
|
|
10808
11309
|
}
|
|
10809
|
-
function matchesSinkPattern(call, pattern, typeHierarchy) {
|
|
11310
|
+
function matchesSinkPattern(call, pattern, typeHierarchy, language) {
|
|
11311
|
+
if (pattern.languages && pattern.languages.length > 0 && language !== undefined) {
|
|
11312
|
+
if (!pattern.languages.includes(language)) {
|
|
11313
|
+
return false;
|
|
11314
|
+
}
|
|
11315
|
+
}
|
|
10810
11316
|
const callMethodName = call.method_name;
|
|
10811
11317
|
const patternMethod = pattern.method;
|
|
10812
11318
|
let methodMatches = callMethodName === patternMethod;
|
|
@@ -10910,17 +11416,29 @@ function receiverMightBeClass(receiver, className) {
|
|
|
10910
11416
|
}
|
|
10911
11417
|
}
|
|
10912
11418
|
}
|
|
10913
|
-
|
|
11419
|
+
const ambiguousIdentifiers = new Set([
|
|
11420
|
+
"executor",
|
|
11421
|
+
"pool",
|
|
11422
|
+
"connection",
|
|
11423
|
+
"manager",
|
|
11424
|
+
"handler",
|
|
11425
|
+
"controller",
|
|
11426
|
+
"task",
|
|
11427
|
+
"thread",
|
|
11428
|
+
"job"
|
|
11429
|
+
]);
|
|
11430
|
+
const isAmbiguous = ambiguousIdentifiers.has(lowerReceiver);
|
|
11431
|
+
if (!isAmbiguous && lowerReceiver.length >= 3 && lowerClass.includes(lowerReceiver)) {
|
|
10914
11432
|
if (lowerReceiver.length >= 5 || lowerReceiver.length / lowerClass.length >= 0.4) {
|
|
10915
11433
|
return true;
|
|
10916
11434
|
}
|
|
10917
11435
|
}
|
|
10918
|
-
if (lowerReceiver.length >= 2) {
|
|
11436
|
+
if (!isAmbiguous && lowerReceiver.length >= 2) {
|
|
10919
11437
|
if (lowerClass.startsWith(lowerReceiver) || lowerClass.endsWith(lowerReceiver)) {
|
|
10920
11438
|
return true;
|
|
10921
11439
|
}
|
|
10922
11440
|
}
|
|
10923
|
-
if (lowerReceiver.length >= 3) {
|
|
11441
|
+
if (!isAmbiguous && lowerReceiver.length >= 3) {
|
|
10924
11442
|
const words = className.replace(/([a-z])([A-Z])/g, "$1\x00$2").toLowerCase().split("\x00");
|
|
10925
11443
|
for (const word of words) {
|
|
10926
11444
|
if (word.startsWith(lowerReceiver) && lowerReceiver.length / word.length >= 0.4) {
|
|
@@ -11751,6 +12269,9 @@ var ANTI_SANITIZER_METHODS = new Set([
|
|
|
11751
12269
|
"unescapeEcmaScript",
|
|
11752
12270
|
"unescapeJson",
|
|
11753
12271
|
"unescapeJava",
|
|
12272
|
+
"getPathWithinApplication",
|
|
12273
|
+
"getRequestUri",
|
|
12274
|
+
"decodeRequestString",
|
|
11754
12275
|
"unescape",
|
|
11755
12276
|
"decompress"
|
|
11756
12277
|
]);
|
|
@@ -11768,7 +12289,10 @@ var PROPAGATOR_METHODS = new Set([
|
|
|
11768
12289
|
"format",
|
|
11769
12290
|
"join",
|
|
11770
12291
|
"concat",
|
|
11771
|
-
"requireNonNull"
|
|
12292
|
+
"requireNonNull",
|
|
12293
|
+
"getPathWithinApplication",
|
|
12294
|
+
"getRequestUri",
|
|
12295
|
+
"decodeRequestString"
|
|
11772
12296
|
]);
|
|
11773
12297
|
|
|
11774
12298
|
// ../circle-ir/dist/analysis/constant-propagation/propagator.js
|
|
@@ -17856,7 +18380,7 @@ function extractEventHandlers(elementNode, eventHandlers) {
|
|
|
17856
18380
|
const valueNode = findChildByType2(child, "quoted_attribute_value") ?? findChildByType2(child, "attribute_value");
|
|
17857
18381
|
if (!valueNode)
|
|
17858
18382
|
continue;
|
|
17859
|
-
const code =
|
|
18383
|
+
const code = stripQuotes2(valueNode.text);
|
|
17860
18384
|
if (code) {
|
|
17861
18385
|
eventHandlers.push({
|
|
17862
18386
|
code,
|
|
@@ -17889,7 +18413,7 @@ function getAttributeValue(tag, name2) {
|
|
|
17889
18413
|
const nameNode = findChildByType2(child, "attribute_name");
|
|
17890
18414
|
if (nameNode?.text.toLowerCase() === name2) {
|
|
17891
18415
|
const valueNode = findChildByType2(child, "quoted_attribute_value") ?? findChildByType2(child, "attribute_value");
|
|
17892
|
-
return valueNode ?
|
|
18416
|
+
return valueNode ? stripQuotes2(valueNode.text) : "";
|
|
17893
18417
|
}
|
|
17894
18418
|
}
|
|
17895
18419
|
return;
|
|
@@ -17902,7 +18426,7 @@ function findChildByType2(node, type) {
|
|
|
17902
18426
|
}
|
|
17903
18427
|
return null;
|
|
17904
18428
|
}
|
|
17905
|
-
function
|
|
18429
|
+
function stripQuotes2(text) {
|
|
17906
18430
|
if (text.startsWith('"') && text.endsWith('"') || text.startsWith("'") && text.endsWith("'")) {
|
|
17907
18431
|
return text.slice(1, -1);
|
|
17908
18432
|
}
|
|
@@ -18314,7 +18838,7 @@ class TaintMatcherPass {
|
|
|
18314
18838
|
}
|
|
18315
18839
|
const hierarchy = createWithJdkTypes();
|
|
18316
18840
|
hierarchy.addFromIR(graph.ir, graph.ir.meta.file);
|
|
18317
|
-
const taint = analyzeTaint(calls, types, mergedConfig, hierarchy);
|
|
18841
|
+
const taint = analyzeTaint(calls, types, mergedConfig, hierarchy, language);
|
|
18318
18842
|
const sanitizerMethods = [];
|
|
18319
18843
|
for (const type of types) {
|
|
18320
18844
|
for (const method of type.methods) {
|
|
@@ -24218,7 +24742,7 @@ class SecurityHeadersPass {
|
|
|
24218
24742
|
}
|
|
24219
24743
|
function literalOf(arg) {
|
|
24220
24744
|
if (arg.literal !== null && arg.literal !== undefined && arg.literal !== "") {
|
|
24221
|
-
return
|
|
24745
|
+
return stripQuotes3(arg.literal);
|
|
24222
24746
|
}
|
|
24223
24747
|
const expr = arg.expression.trim();
|
|
24224
24748
|
if (expr.startsWith('"') && expr.endsWith('"') || expr.startsWith("'") && expr.endsWith("'") || expr.startsWith("`") && expr.endsWith("`")) {
|
|
@@ -24228,7 +24752,7 @@ function literalOf(arg) {
|
|
|
24228
24752
|
}
|
|
24229
24753
|
return null;
|
|
24230
24754
|
}
|
|
24231
|
-
function
|
|
24755
|
+
function stripQuotes3(s) {
|
|
24232
24756
|
if (s.length < 2)
|
|
24233
24757
|
return s;
|
|
24234
24758
|
const first = s[0];
|
|
@@ -25692,7 +26216,9 @@ function getNodeTypesForLanguage(language) {
|
|
|
25692
26216
|
"import_from_statement",
|
|
25693
26217
|
"assignment",
|
|
25694
26218
|
"attribute",
|
|
25695
|
-
"subscript"
|
|
26219
|
+
"subscript",
|
|
26220
|
+
"decorated_definition",
|
|
26221
|
+
"decorator"
|
|
25696
26222
|
]);
|
|
25697
26223
|
case "javascript":
|
|
25698
26224
|
case "typescript":
|
|
@@ -25784,6 +26310,7 @@ async function analyze(code, filePath, language, options = {}) {
|
|
|
25784
26310
|
const exports = extractExports(types);
|
|
25785
26311
|
const cfg = buildCFG(tree, language);
|
|
25786
26312
|
const dfg = buildDFG(tree, nodeCache, language);
|
|
26313
|
+
const runtimeRegistrations = extractRuntimeRegistrations(tree, nodeCache, language, imports);
|
|
25787
26314
|
const graph = new CodeGraph({
|
|
25788
26315
|
meta,
|
|
25789
26316
|
types,
|
|
@@ -25910,7 +26437,8 @@ async function analyze(code, filePath, language, options = {}) {
|
|
|
25910
26437
|
unresolved,
|
|
25911
26438
|
enriched,
|
|
25912
26439
|
findings: findings.length > 0 ? findings : undefined,
|
|
25913
|
-
metrics: { file: filePath, metrics: metricValues }
|
|
26440
|
+
metrics: { file: filePath, metrics: metricValues },
|
|
26441
|
+
runtime_registrations: runtimeRegistrations.length > 0 ? runtimeRegistrations : undefined
|
|
25914
26442
|
};
|
|
25915
26443
|
} finally {
|
|
25916
26444
|
disposeTree(tree);
|
|
@@ -26059,7 +26587,7 @@ var colors = {
|
|
|
26059
26587
|
};
|
|
26060
26588
|
|
|
26061
26589
|
// src/version.ts
|
|
26062
|
-
var version = "3.
|
|
26590
|
+
var version = "3.33.0";
|
|
26063
26591
|
|
|
26064
26592
|
// src/formatters.ts
|
|
26065
26593
|
var SINK_SEVERITY = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cognium-dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.33.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.33.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/node": "^25.5.0",
|