mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Copying the response data to the archive
This commit is contained in:
@@ -53,6 +53,15 @@ class UnsafeUnpackingConfig extends TaintTracking::Configuration {
|
|||||||
nodeTo = is.(CallCfgNode).getArg(0)
|
nodeTo = is.(CallCfgNode).getArg(0)
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
|
// Copying the response data to the archive
|
||||||
|
exists(Stdlib::FileLikeObject::InstanceSource is, Node f, MethodCallNode mc |
|
||||||
|
is.flowsTo(f) and
|
||||||
|
mc = API::moduleImport("shutil").getMember("copyfileobj").getACall() and
|
||||||
|
f = mc.getArg(1) and
|
||||||
|
nodeFrom = mc.getArg(0) and
|
||||||
|
nodeTo = is.(CallCfgNode).getArg(0)
|
||||||
|
)
|
||||||
|
or
|
||||||
// Reading the response
|
// Reading the response
|
||||||
exists(MethodCallNode mc |
|
exists(MethodCallNode mc |
|
||||||
nodeFrom = mc.getObject() and
|
nodeFrom = mc.getObject() and
|
||||||
@@ -60,8 +69,8 @@ class UnsafeUnpackingConfig extends TaintTracking::Configuration {
|
|||||||
mc.flowsTo(nodeTo)
|
mc.flowsTo(nodeTo)
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
// Accessing the name
|
// Accessing the name or raw content
|
||||||
exists(AttrRead ar | ar.accesses(nodeFrom, "name") and nodeTo = ar)
|
exists(AttrRead ar | ar.accesses(nodeFrom, ["name","raw"]) and nodeTo = ar)
|
||||||
or
|
or
|
||||||
// Considering the use of closing()
|
// Considering the use of closing()
|
||||||
exists(API::Node closing |
|
exists(API::Node closing |
|
||||||
|
|||||||
Reference in New Issue
Block a user