@@ -15,7 +15,7 @@ async def bomb(file_path):
15
15
a = myfile .readline ()
16
16
17
17
with zipfile .ZipFile (file_path ) as myzip :
18
- with myzip .open ('ZZ' , mode = "w" ) as myfile : # $result=OK
18
+ with myzip .open ('ZZ' , mode = "w" ) as myfile : # $ SPURIOUS: result=BAD
19
19
myfile .write (b"tmpppp" )
20
20
21
21
zipfile .ZipFile (file_path ).read ("aFileNameInTheZipFile" ) # $ result=BAD
@@ -26,9 +26,9 @@ async def bomb(file_path):
26
26
tarfile .TarFile .gzopen (file_path ).extractall () # $ result=BAD
27
27
tarfile .TarFile .open (file_path ).extractfile ("file1.txt" ) # $ result=BAD
28
28
29
- tarfile .open (file_path , mode = "w" ) # $result=OK
30
- tarfile .TarFile .gzopen (file_path , mode = "w" ) # $result=OK
31
- tarfile .TarFile .open (file_path , mode = "r:" ) # $ result=BAD
29
+ tarfile .open (file_path , mode = "w" ) # ok, writing
30
+ tarfile .TarFile .gzopen (file_path , mode = "w" ) # ok, writing
31
+ tarfile .TarFile .open (file_path , mode = "r:" ) # potential problem, depending on usage
32
32
import shutil
33
33
34
34
shutil .unpack_archive (file_path ) # $ result=BAD
@@ -63,14 +63,14 @@ async def bomb(file_path):
63
63
pandas .read_xml (path_or_buffer = file_path , compression = 'gzip' ) # $ result=BAD
64
64
65
65
# no compression no DOS
66
- pandas .read_table (file_path , compression = 'tar' ) # $result=OK
67
- pandas .read_xml (file_path , compression = 'tar' ) # $result=OK
68
-
69
- pandas .read_csv (filepath_or_buffer = file_path , compression = 'tar' ) # $result=OK
70
- pandas .read_json (file_path , compression = 'tar' ) # $result=OK
71
- pandas .read_sas (file_path , compression = 'tar' ) # $result=OK
72
- pandas .read_stata (filepath_or_buffer = file_path , compression = 'tar' ) # $result=OK
73
- pandas .read_table (file_path , compression = 'tar' ) # $result=OK
74
- pandas .read_xml (path_or_buffer = file_path , compression = 'tar' ) # $result=OK
66
+ pandas .read_table (file_path , compression = 'tar' )
67
+ pandas .read_xml (file_path , compression = 'tar' )
68
+
69
+ pandas .read_csv (filepath_or_buffer = file_path , compression = 'tar' )
70
+ pandas .read_json (file_path , compression = 'tar' )
71
+ pandas .read_sas (file_path , compression = 'tar' )
72
+ pandas .read_stata (filepath_or_buffer = file_path , compression = 'tar' )
73
+ pandas .read_table (file_path , compression = 'tar' )
74
+ pandas .read_xml (path_or_buffer = file_path , compression = 'tar' )
75
75
76
76
return {"message" : "bomb" }
0 commit comments