krz/octosentry

macOS menu bar app to monitor GitHub security alerts github macos menubar security

Commit 5720242dee

5720242dee0f02c0bc5bb991372d602ab3320cc4

parent: f10c91b1a7

Unsigned

cmc <hello@cleberg.net> · 2026-08-08 20:32 UTC

Simplify secretScanning severity mapping to ternary

Layout: unified · split

octosentry/SeverityMapping.swift +1 −4
@@ -44,9 +44,6 @@ nonisolated enum SeverityMapping {
44 /// Secret scanning has no native severity field. Per spec: validated/active 44 /// Secret scanning has no native severity field. Per spec: validated/active
45 /// secrets are treated as critical, unvalidated ones as high. 45 /// secrets are treated as critical, unvalidated ones as high.
46 static func secretScanning(validity: String?) -> SecurityEventSeverity { 46 static func secretScanning(validity: String?) -> SecurityEventSeverity {
47 switch validity?.lowercased() { 47 validity?.lowercased() == "active" ? .critical : .high
48 case "active": .critical
49 default: .high
50 }
51 } 48 }
52} 49}