(t *testing.T)
| 647 | } |
| 648 | |
| 649 | func TestShouldInclude_UnknownSeverity(t *testing.T) { |
| 650 | scanner := NewScanner() |
| 651 | |
| 652 | // Unknown severity should always be included (fail-safe) |
| 653 | if !scanner.shouldInclude(Severity("UNKNOWN")) { |
| 654 | t.Error("unknown severity should be included (fail-safe behavior)") |
| 655 | } |
| 656 | |
| 657 | // Valid severities should still work correctly |
| 658 | scanner.MinSeverity = SeverityHigh |
| 659 | if scanner.shouldInclude(SeverityLow) { |
| 660 | t.Error("LOW should not be included when MinSeverity is HIGH") |
| 661 | } |
| 662 | if !scanner.shouldInclude(SeverityCritical) { |
| 663 | t.Error("CRITICAL should be included when MinSeverity is HIGH") |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | // Test UNION-based injection detection (Issue #170) |
| 668 | func TestScanSQL_UnionInjection(t *testing.T) { |
nothing calls this directly
no test coverage detected