mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Use dataflow instead of taint-tracking
This commit is contained in:
@@ -73,8 +73,8 @@ module ZipFile {
|
||||
* ```
|
||||
*/
|
||||
predicate zipFileDecompressionBombSanitizer(API::Node n) {
|
||||
TaintTracking::localExprTaint(n.getReturn().getMember("read").getParameter(0).asSink().asExpr(),
|
||||
any(Compare i).getASubExpression*())
|
||||
DataFlow::localFlow(n.getReturn().getMember("read").getParameter(0).asSink(),
|
||||
DataFlow::exprNode(any(Compare i).getASubExpression*()))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ module FileAndFormRemoteFlowSource {
|
||||
exists(For f, Attribute attr |
|
||||
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
|
||||
this.asExpr() = attr
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user