severity

package
v0.11.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Order defines the order of severities from highest to lowest.
	Order = []string{"critical", "high", "medium", "low", "unknown"}
)

Functions

func CountBySeverity

func CountBySeverity(severities []string) map[string]int

CountBySeverity counts vulnerabilities by their severity.

func FormatTitleCase

func FormatTitleCase(sev string) string

FormatTitleCase formats a severity string in title case without styling.

func IndexOf

func IndexOf(arr []string, s string) int

IndexOf returns the index of a string in a slice, or the length of the slice if not found.

func InitializeCounts

func InitializeCounts() map[string]int

InitializeCounts creates a new map with all severity counts initialized to 0.

func Normalize

func Normalize(sev string) string

Normalize normalizes a severity string to lowercase and validates it.

func NormalizeAuth

func NormalizeAuth(auth string) string

NormalizeAuth normalizes an authentication type string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL