(
rule_id: str = "TM1",
confidence: float = 0.8,
severity: str = "HIGH",
context: str | None = "import subprocess\nsubprocess.run(cmd, shell=True)",
matched_text: str = "subprocess.run(cmd, shell=True)",
file: str = "tool.py",
)
| 28 | |
| 29 | |
| 30 | def _finding( |
| 31 | rule_id: str = "TM1", |
| 32 | confidence: float = 0.8, |
| 33 | severity: str = "HIGH", |
| 34 | context: str | None = "import subprocess\nsubprocess.run(cmd, shell=True)", |
| 35 | matched_text: str = "subprocess.run(cmd, shell=True)", |
| 36 | file: str = "tool.py", |
| 37 | ) -> Finding: |
| 38 | return Finding( |
| 39 | rule_id=rule_id, |
| 40 | message=f"Test {rule_id}", |
| 41 | severity=severity, |
| 42 | confidence=confidence, |
| 43 | file=file, |
| 44 | start_line=1, |
| 45 | context=context, |
| 46 | matched_text=matched_text, |
| 47 | ) |
| 48 | |
| 49 | |
| 50 | class TestConfidenceThreshold: |
no test coverage detected