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

Method adjustSecurityScore

cmd/gosqlx/cmd/sql_analyzer.go:362–376  ·  view source on GitHub ↗
(severity IssueSeverity)

Source from the content-addressed store, hash-verified

360}
361
362func (a *SQLAnalyzer) adjustSecurityScore(severity IssueSeverity) {
363 switch severity {
364 case IssueSeverityCritical:
365 a.SecurityScore -= 30
366 case IssueSeverityHigh:
367 a.SecurityScore -= 20
368 case IssueSeverityMedium:
369 a.SecurityScore -= 10
370 case IssueSeverityLow:
371 a.SecurityScore -= 5
372 }
373 if a.SecurityScore < 0 {
374 a.SecurityScore = 0
375 }
376}
377
378func (a *SQLAnalyzer) adjustPerformanceScore(severity IssueSeverity) {
379 switch severity {

Callers 2

addSecurityIssueMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected