Skip to content

Commit 7079def

Browse files
committed
Add an S3 source with Session or download_fileobj
1 parent 0707064 commit 7079def

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

python/ql/src/experimental/Security/UnsafeUnpackQuery.qll

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,25 @@ class UnsafeUnpackingConfig extends TaintTracking::Configuration {
2929
.getACall()
3030
)
3131
or
32-
// A source catching an S3 filename download
32+
// A source catching an S3 file download
3333
// see boto3: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.download_file
3434
source =
3535
API::moduleImport("boto3")
3636
.getMember("client")
3737
.getReturn()
38-
.getMember("download_file")
38+
.getMember(["download_file", "download_fileobj"])
39+
.getACall()
40+
.getArg(2)
41+
or
42+
// A source catching an S3 file download
43+
// see boto3: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html
44+
source =
45+
API::moduleImport("boto3")
46+
.getMember("Session")
47+
.getReturn()
48+
.getMember("client")
49+
.getReturn()
50+
.getMember(["download_file", "download_fileobj"])
3951
.getACall()
4052
.getArg(2)
4153
or

0 commit comments

Comments
 (0)