Copying the response data to the archive

This commit is contained in:
ALJI Mohamed
2022-12-10 08:15:42 +01:00
parent 545aab0e07
commit eff132512c

View File

@@ -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 |