MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / process_taint

Function process_taint

tests/test_taint.py:14–25  ·  view source on GitHub ↗
(src: str, pattern: str, cache_mock, taint: str="tainted")

Source from the content-addressed store, hash-verified

12
13@patch("aura.cache.ASTPatternCache.proxy")
14def process_taint(src: str, pattern: str, cache_mock, taint: str="tainted"):
15 tree = collect(dedent(src), minimal=True)
16 loc = ScanLocation(location="<unknown>")
17 p = ASTPattern({
18 "pattern": pattern,
19 "taint": taint
20 })
21
22 cache_mock.return_value = [p]
23
24 v = Visitor.run_stages(location=loc, ast_tree=tree)
25 return v.tree[-1]
26
27
28

Calls 4

collectFunction · 0.90
ScanLocationClass · 0.90
ASTPatternClass · 0.90
run_stagesMethod · 0.80

Tested by

no test coverage detected