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

Class TestHasattr837

tests/unit/test_a_sink_rules.py:36–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35# --- HASATTR837 ---
36class TestHasattr837:
37 def test_tainted_silent_disabled(self):
38 # HASATTR837 disabled: hasattr() returns bool — not a security sink,
39 # generates FPs on stdlib code that uses hasattr for duck-typing checks.
40 assert not_fires("attr=request.GET.get('f'); hasattr(obj,attr)", "HASATTR837")
41 def test_constant_safe(self):
42 assert not_fires("hasattr(obj,'is_active')", "HASATTR837")
43
44# --- VARS840 ---
45class TestVars840:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected