shouldInclude checks if a finding meets the minimum severity threshold. Unknown severities are treated as highest priority (always included) for security.
(severity Severity)
| 1113 | // shouldInclude checks if a finding meets the minimum severity threshold. |
| 1114 | // Unknown severities are treated as highest priority (always included) for security. |
| 1115 | func (s *Scanner) shouldInclude(severity Severity) bool { |
| 1116 | findingSeverity, findingExists := severityOrder[severity] |
| 1117 | minSeverity, minExists := severityOrder[s.MinSeverity] |
| 1118 | |
| 1119 | // Unknown severities are always included (fail-safe: don't hide potential issues) |
| 1120 | if !findingExists { |
| 1121 | return true |
| 1122 | } |
| 1123 | |
| 1124 | // If minimum severity is unknown, default to showing all |
| 1125 | if !minExists { |
| 1126 | return true |
| 1127 | } |
| 1128 | |
| 1129 | return findingSeverity >= minSeverity |
| 1130 | } |
| 1131 | |
| 1132 | // updateCounts updates the count fields in the result. |
| 1133 | func (s *Scanner) updateCounts(result *ScanResult) { |
no outgoing calls