MCPcopy Index your code
hub / github.com/SourceCode-AI/aura / test_taint_log_flask_app

Function test_taint_log_flask_app

tests/test_taint.py:81–109  ·  view source on GitHub ↗
(fixtures, fuzzy_rule_match)

Source from the content-addressed store, hash-verified

79
80
81def test_taint_log_flask_app(fixtures, fuzzy_rule_match):
82 match_log = [
83 {
84 "line_no": 44,
85 "message": "AST node marked as source using semantic rules",
86 "taint_level": "TAINTED"
87 },
88 {
89 "line_no": 44,
90 "message": "Taint propagated via variable subscript",
91 "taint_level": "TAINTED"
92 },
93 {
94 "line_no": 45,
95 "message": "Taint propagated by return/yield statement",
96 "taint_level": "TAINTED"
97 }
98 ]
99
100 output = fixtures.scan_test_file('flask_app.py')
101
102 for h in output['detections']:
103 if h['line_no'] == 45:
104 log = h['extra']['taint_log']
105 break
106 else:
107 raise AssertionError("Taint log hit not found")
108
109 assert fuzzy_rule_match(log, match_log)
110
111
112def test_variable_assignment_propagation():

Callers

nothing calls this directly

Calls 2

fuzzy_rule_matchFunction · 0.85
scan_test_fileMethod · 0.80

Tested by

no test coverage detected