diff --git a/python/ql/lib/ext/StdLib.model.yml b/python/ql/lib/ext/StdLib.model.yml index 16f62bd7748..df4feaf0424 100644 --- a/python/ql/lib/ext/StdLib.model.yml +++ b/python/ql/lib/ext/StdLib.model.yml @@ -30,8 +30,6 @@ extensions: # See https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urljoin - ["urllib", "Member[parse].Member[urljoin]", "Argument[0,base:]", "ReturnValue", "taint"] - ["urllib", "Member[parse].Member[urljoin]", "Argument[1,url:]", "ReturnValue", "taint"] - # See https://docs.python.org/3/library/re.html#re.compile - - ["re", "Member[compile]", "Argument[0,pattern:]", "ReturnValue", "taint"] - addsTo: pack: codeql/python-all extensible: neutralModel diff --git a/python/ql/lib/semmle/python/frameworks/Stdlib.qll b/python/ql/lib/semmle/python/frameworks/Stdlib.qll index 3c23b392991..7a373a523e4 100644 --- a/python/ql/lib/semmle/python/frameworks/Stdlib.qll +++ b/python/ql/lib/semmle/python/frameworks/Stdlib.qll @@ -3251,8 +3251,13 @@ module StdlibPrivate { override predicate propagatesFlow(string input, string output, boolean preservesValue) { input in ["Argument[0]", "Argument[pattern:]"] and - output = "ReturnValue.Attribute[pattern]" and - preservesValue = true + ( + output = "ReturnValue.Attribute[pattern]" and + preservesValue = true + or + output = "ReturnValue" and + preservesValue = false + ) } }