mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +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) {
|
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*()))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user