File tree Expand file tree Collapse file tree
python/ql/test/library-tests/frameworks/stdlib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717io .open ("filepath" ) # $getAPathArgument="filepath"
1818io .open (file = "filepath" ) # $getAPathArgument="filepath"
19+
20+ from pathlib import Path , PosixPath , WindowsPath
21+
22+ p = Path ("filepath" )
23+ posix = PosixPath ("posix/filepath" )
24+ windows = WindowsPath ("windows/filepath" )
25+
26+ p .chmod (0o777 ) # MISSING: $getAPathArgument=p
27+ posix .chmod (0o777 ) # MISSING: $getAPathArgument=posix
28+ windows .chmod (0o777 ) # MISSING: $getAPathArgument=windows
29+
30+ with p .open () as f : # MISSING: $getAPathArgument=p
31+ f .read ()
32+
33+ p .write_bytes (b"hello" ) # MISSING: $getAPathArgument=p
Original file line number Diff line number Diff line change 33if s .startswith ("tainted" ): # $checks=s branch=true
44 pass
55
6- sw = s .startswith # $ MISSING: checks=s branch=true
7- if sw ("safe" ):
6+ sw = s .startswith
7+ if sw ("safe" ): # $ MISSING: checks=s branch=true
88 pass
You can’t perform that action at this time.
0 commit comments