Documentation
¶
Overview ¶
Package util holds small helpers shared across packages so a single implementation is imported everywhere rather than duplicated.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
Fingerprint returns a stable hex identifier for a finding, derived from the cluster, scanner, and rule separated by null bytes. The rule names the check rather than its wording, so a finding keeps its fingerprint when a count in its title changes. Acknowledgements key on the same value, so a finding can be matched to its ack and tracked across scans by fingerprint.
func SanitizeName ¶ added in v0.10.0
SanitizeName returns a DNS-1123-safe rendering of name suitable for use as a Kubernetes metadata.name value. It lowercases, replaces runs of invalid characters with a dash, collapses adjacent dashes, caps the result at 253 characters, and trims dashes and dots from both ends so the name starts and ends alphanumeric. Pass any fixed prefix as part of name so the cap covers it.
func SeverityAtLeast ¶ added in v0.10.0
SeverityAtLeast reports whether got meets the want threshold. An empty want always passes.
func SeverityRank ¶ added in v0.10.0
SeverityRank assigns a numeric weight to a severity string for comparison. Unknown values rank 0.
Types ¶
This section is empty.