Skip to content

Commit

Permalink
Fix tests to check for the correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
joefarebrother committed Jan 7, 2025
1 parent 8b174ea commit 35961e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/ql/test/library-tests/frameworks/lxml/taint_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ def func(tree_arg: ET.ElementTree):
def func2(x):
return x

def func3(x) -> ET.Element:
def func3(x) -> ET.ElementTree:
return x

ensure_tainted(
func2(tree), # $ tainted
func2(tree).text, # $ MISSING:tainted - type tracking not tracked through flow preserving calls
func3(tree).text, # $ MISSING:tainted - this includes if there is a type hint annotation on the return
func2(tree).getroot().text, # $ MISSING:tainted - type tracking not tracked through flow preserving calls
func3(tree).getroot().text, # $ MISSING:tainted - this includes if there is a type hint annotation on the return
typing.cast(ET.ElementTree, tree), # $ tainted
typing.cast(ET.ElementTree, tree).text, # $ MISSING:tainted - this includes for flow summary models
typing.cast(ET.ElementTree, tree).getroot().text, # $ MISSING:tainted - this includes for flow summary models

)

Expand Down

0 comments on commit 35961e4

Please sign in to comment.