File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ def accept(event: str, args: tuple) -> None:
2323
2424
2525def reject (event : str , args : tuple ) -> None :
26- print (args )
27- if any (arg in args_allow_list for arg in args ):
28- return
2926 msg = f'codeflash has detected: { event } { args } ".'
3027 raise SideEffectDetectedError (msg )
3128
@@ -71,6 +68,13 @@ def check_subprocess(event: str, args: tuple) -> None:
7168 if not inside_module (modules_with_allowed_popen ()):
7269 reject (event , args )
7370
71+ def handle_os_remove (event : str , args : tuple ) -> None :
72+ print ("os.remove" , args )
73+ if any (arg in args_allow_list for arg in args ):
74+ accept (event , args )
75+ else :
76+ reject (event , args )
77+
7478
7579def check_sqlite_connect (event : str , args : tuple ) -> None :
7680 if any ("codeflash_" in arg for arg in args ):
@@ -85,6 +89,7 @@ def check_sqlite_connect(event: str, args: tuple) -> None:
8589 "msvcrt.open_osfhandle" : check_msvcrt_open ,
8690 "sqlite3.connect" : check_sqlite_connect ,
8791 "sqlite3.connect/handle" : check_sqlite_connect ,
92+ "os.remove" : handle_os_remove ,
8893}
8994
9095
You can’t perform that action at this time.
0 commit comments