Skip to content

Commit 30053da

Browse files
committed
Python: extra modelling of stdlib
as a reaction to the latest QA run
1 parent 5b2eb88 commit 30053da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/ql/lib/semmle/python/frameworks/Stdlib.model.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ extensions:
6565
- ["getopt", "Member[getopt]", "Argument[1,shortopts:,2,longopts:]", "ReturnValue.TupleElement[0].ListElement.TupleElement[0]", "taint"]
6666
# See https://docs.python.org/3/library/gettext.html#gettext.gettext
6767
- ["gettext", "Member[gettext]", "Argument[0,message:]", "ReturnValue", "taint"]
68+
# See
69+
# - https://docs.python.org/3/library/glob.html#glob.glob
70+
# - https://docs.python.org/3/library/glob.html#glob.iglob
71+
- ["glob", "Member[glob,iglob]", "Argument[0,pathname:]", "ReturnValue", "taint"]
6872
# See https://docs.python.org/3/library/gzip.html#gzip.GzipFile
6973
- ["gzip.GzipFile!", "Subclass.Call", "Argument[0,filename:]", "ReturnValue", "taint"]
7074
# See
@@ -88,6 +92,8 @@ extensions:
8892
- ["nturl2path", "Member[url2pathname]", "Argument[0,url:]", "ReturnValue", "taint"]
8993
# See https://docs.python.org/3/library/optparse.html#optparse.OptionParser.parse_args
9094
- ["optparse.OptionParser", "Member[parse_args]", "Argument[0,args:,1,values:]", "ReturnValue.TupleElement[0,1]", "taint"]
95+
# See https://docs.python.org/3/library/os.html#os.walk
96+
- ["os", "Member[walk]", "Argument[0,top:]", "ReturnValue", "taint"]
9197
# See https://github.com/python/cpython/blob/3.10/Lib/pathlib.py#L972-L973
9298
- ["pathlib.Path", ".Member[__enter__]", "Argument[self]", "ReturnValue", "taint"]
9399
# See https://docs.python.org/3/library/os.html#os.PathLike.__fspath__

0 commit comments

Comments
 (0)