Handle the download of a tarball using wget pkg.

This commit is contained in:
Sim4n6
2023-01-26 00:02:20 +01:00
parent 22af6f5182
commit 9b5b0c60b8
2 changed files with 28 additions and 3 deletions

View File

@@ -46,8 +46,14 @@ class UnsafeUnpackingConfig extends TaintTracking::Configuration {
)
or
// A source download a file using wget
exists(MethodCallNode mcn |
mcn = API::moduleImport("wget").getMember("download").getACall() and source = mcn.getArg(1)
// see wget: https://pypi.org/project/wget/
exists(API::CallNode mcn |
mcn = API::moduleImport("wget").getMember("download").getACall() and
(
source = mcn.getArg(1)
or
source = mcn.getReturn().asSource() and not exists(Node arg | arg = mcn.getArg(1))
)
)
or
// catch the uploaded files as a source