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

Function _make_issue

tests/unit/reporting_test.py:9–28  ·  view source on GitHub ↗
(
    rule_id="PY001",
    description="Use of 'eval()' is highly dangerous.",
    file_path="path/to/file.py",
    line_number=1,
    code='eval("a=5 print(a)")',
    severity="High",
    remediation="Avoid 'eval()'. Use safer alternatives like 'ast.literal_eval' for data parsing.",
    cwe="CWE-95",
)

Source from the content-addressed store, hash-verified

7
8
9def _make_issue(
10 rule_id="PY001",
11 description="Use of 'eval()' is highly dangerous.",
12 file_path="path/to/file.py",
13 line_number=1,
14 code='eval("a=5 print(a)")',
15 severity="High",
16 remediation="Avoid 'eval()'. Use safer alternatives like 'ast.literal_eval' for data parsing.",
17 cwe="CWE-95",
18):
19 return SimpleNamespace(
20 rule_id=rule_id,
21 description=description,
22 file_path=file_path,
23 line_number=line_number,
24 code=code,
25 severity=severity,
26 remediation=remediation,
27 cwe=cwe,
28 )
29
30
31class TestReporter(unittest.TestCase):

Calls

no outgoing calls

Tested by

no test coverage detected