MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / TestKeywordArgSinks

Class TestKeywordArgSinks

tests/unit/test_taint_engine_extension.py:217–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215# ===========================================================================
216
217class TestKeywordArgSinks:
218
219 def test_getattr_with_keyword_name_arg(self):
220 """Phase 3: getattr(obj, name=attr) with tainted attr must fire."""
221 code = """
222 attr = request.GET.get('field')
223 value = getattr(user, attr)
224 """
225 # Both positional and keyword should fire
226 assert findings_for(code, "GETATTR828"), \
227 "GETATTR828 must fire for positional getattr(obj, tainted)"
228
229
230# ===========================================================================

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected