Documentation
¶
Overview ¶
Package cwe embeds the MITRE CWE catalogue and looks up entries by ID.
Each entry carries the weakness name, its short description, and its View-1400 ("Comprehensive Categorization for Software Assurance Trends") category label. Deprecated weaknesses are excluded. The embedded catalogue is regenerated from https://cwe.mitre.org/data/xml/cwec_latest.xml.zip via go generate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Categories ¶
func Categories() []string
Categories returns the View-1400 category labels in alphabetical order.
func CategorizedIDs ¶
func CategorizedIDs() []string
CategorizedIDs returns every CWE-ID that has a View-1400 category, sorted.
func CategoryID ¶
CategoryID returns the CWE-ID for a View-1400 category label, e.g. "Injection" -> "CWE-1409". Returns "" for an unknown label.
func CategoryOf ¶
CategoryOf returns the View-1400 category CWE-ID for a weakness ID, e.g. "CWE-352" -> "CWE-1411". Returns "" when the weakness is unknown or not mapped to a View-1400 bucket.
func InCategory ¶
InCategory returns the CWE-IDs that belong to a View-1400 category, sorted, or nil for an unknown category.