MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / updateCounts

Method updateCounts

pkg/sql/security/scanner.go:1133–1147  ·  view source on GitHub ↗

updateCounts updates the count fields in the result.

(result *ScanResult)

Source from the content-addressed store, hash-verified

1131
1132// updateCounts updates the count fields in the result.
1133func (s *Scanner) updateCounts(result *ScanResult) {
1134 result.TotalCount = len(result.Findings)
1135 for _, f := range result.Findings {
1136 switch f.Severity {
1137 case SeverityCritical:
1138 result.CriticalCount++
1139 case SeverityHigh:
1140 result.HighCount++
1141 case SeverityMedium:
1142 result.MediumCount++
1143 case SeverityLow:
1144 result.LowCount++
1145 }
1146 }
1147}
1148
1149// HasCritical returns true if any CRITICAL severity findings exist.
1150// Use this to quickly check for definite security vulnerabilities that

Callers 2

ScanMethod · 0.95
ScanSQLMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected