Python: Use dataflow instead of taint-tracking

This commit is contained in:
Rasmus Wriedt Larsen
2024-02-14 14:52:37 +01:00
parent ba7dd38fc9
commit 69c8ef9898
2 changed files with 3 additions and 3 deletions

View File

@@ -73,8 +73,8 @@ module ZipFile {
* ``` * ```
*/ */
predicate zipFileDecompressionBombSanitizer(API::Node n) { predicate zipFileDecompressionBombSanitizer(API::Node n) {
TaintTracking::localExprTaint(n.getReturn().getMember("read").getParameter(0).asSink().asExpr(), DataFlow::localFlow(n.getReturn().getMember("read").getParameter(0).asSink(),
any(Compare i).getASubExpression*()) DataFlow::exprNode(any(Compare i).getASubExpression*()))
} }
/** /**

View File

@@ -37,7 +37,7 @@ module FileAndFormRemoteFlowSource {
exists(For f, Attribute attr | exists(For f, Attribute attr |
fastApiParam.getAValueReachableFromSource().asExpr() = f.getIter().getASubExpression*() fastApiParam.getAValueReachableFromSource().asExpr() = f.getIter().getASubExpression*()
| |
TaintTracking::localExprTaint(f.getIter(), attr.getObject()) and DataFlow::localFlow(DataFlow::exprNode(f.getIter()), DataFlow::exprNode(attr.getObject())) and
attr.getName() = ["filename", "content_type", "headers", "file", "read"] and attr.getName() = ["filename", "content_type", "headers", "file", "read"] and
this.asExpr() = attr this.asExpr() = attr
) )