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

Class TestRegression

tests/unit/test_group_a_rules.py:247–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245# ============================================================
246
247class TestRegression:
248 def test_getattr828_still_fires(self):
249 code = """
250 attr = request.GET.get('field')
251 getattr(user, attr)
252 """
253 assert fires(code, "GETATTR828"), "GETATTR828 regression"
254
255 def test_py102_still_fires(self):
256 code = """
257 cmd = request.get('command')
258 subprocess.run(cmd)
259 """
260 assert fires(code, "PY102"), "PY102 regression"
261
262 def test_open1149_still_fires(self):
263 code = """
264 path = request.GET.get('file')
265 open(path)
266 """
267 assert fires(code, "OPEN1149"), "OPEN1149 regression"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected