File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
python/ql/test/library-tests/frameworks/stdlib Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 16
16
17
17
io .open ("filepath" ) # $getAPathArgument="filepath"
18
18
io .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 3
3
if s .startswith ("tainted" ): # $checks=s branch=true
4
4
pass
5
5
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
8
8
pass
You can’t perform that action at this time.
0 commit comments