Skip to content

Commit 6c108e4

Browse files
committed
Python: address review
1 parent aa91c26 commit 6c108e4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

python/ql/lib/semmle/python/frameworks/Stdlib.qll

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,16 @@ private module StdlibPrivate {
246246
// Functions with non-standard arguments:
247247
// - os.path.join(path, *paths)
248248
// - os.path.relpath(path, start=os.curdir)
249-
// Functions that need summaries:
249+
// these functions need special treatment when computing `getPathArg`.
250+
//
251+
// Functions that excluded because they can act as sanitizers:
250252
// - os.path.commonpath(paths): takes a sequence
251253
// - os.path.commonprefix(list): takes a list argument
252-
// - os.path.splitdrive: retunrs a tuple
253-
// - os.path.splittext: returns a tuple
254+
// unless the user control all arguments, we are comparing with a known value.
254255
private string pathComputation() {
255256
result in [
256257
"abspath", "basename", "commonpath", "dirname", "expanduser", "expandvars", "join",
257-
"normcase", "normpath", "realpath", "relpath", "split"
258+
"normcase", "normpath", "realpath", "relpath", "split", "splitdrive", "splitext"
258259
]
259260
}
260261

0 commit comments

Comments
 (0)