Documentation
¶
Index ¶
- Constants
- type ValidationError
- func CheckAffectedProduct(json *string) []ValidationError
- func CheckCNARulesV4_0Basic(json *string) []ValidationError
- func CheckCNARulesV4_0Credits(json *string) []ValidationError
- func CheckCNARulesV4_0Descriptions(json *string) []ValidationError
- func CheckCNARulesV4_0Metrics(json *string) []ValidationError
- func CheckCNARulesV4_0References(json *string) []ValidationError
- func CheckCNARulesV4_0Timeline(json *string) []ValidationError
- func CheckCustomVersionType(json *string) []ValidationError
- func CheckCvssV3BaseSeverity(json *string) []ValidationError
- func CheckInvalidVersion(json *string) []ValidationError
- func CheckLeadingTrailingSpace(json *string) []ValidationError
- func CheckLength(json *string) []ValidationError
- func CheckPurlConsistency(json *string) []ValidationError
- func CheckPurlFormat(json *string) []ValidationError
- func CheckRefProtocol(json *string) []ValidationError
- func CheckSelfReference(json *string) []ValidationError
- func CheckUnicodeEscapeSequences(json *string) []ValidationError
- func CheckValidProduct(json *string) []ValidationError
- func CheckValidVendor(json *string) []ValidationError
- func DuplicateRefs(json *string) []ValidationError
Constants ¶
const ( CveRecordStatePublished = "PUBLISHED" CveRecordStateRejected = "REJECTED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValidationError ¶
func CheckAffectedProduct ¶
func CheckAffectedProduct(json *string) []ValidationError
func CheckCNARulesV4_0Basic ¶ added in v0.5.0
func CheckCNARulesV4_0Basic(json *string) []ValidationError
CheckCNARulesV4_0 validates CVE records against requirements from CNA Rules v4.0. CNA Rules are maintained by the CVE Program and define requirements for CVE Record content. Reference: https://github.com/CVEProject/cvelistV5/blob/main/CVERecord.md and CVE Numbering Authority Operational Rules version 4.0
Key MUST requirements checked: - CVE ID must be in format CVE-YYYY-NNNNN[NNN...] - CNA description must be present for PUBLISHED records - At least one affected product must be present for PUBLISHED records - State must be either PUBLISHED or REJECTED
func CheckCNARulesV4_0Credits ¶ added in v0.5.0
func CheckCNARulesV4_0Credits(json *string) []ValidationError
CheckCNARulesV4_0Credits validates CNA Rules requirements for credits. SHOULD: Credits should be provided when available MUST: If provided, credits should have proper structure
func CheckCNARulesV4_0Descriptions ¶ added in v0.5.0
func CheckCNARulesV4_0Descriptions(json *string) []ValidationError
CheckCNARulesV4_0Descriptions validates CNA Rules requirements for descriptions. MUST: At least one English description present for PUBLISHED records MUST: Description must be at least 10 characters SHOULD: Additional translations may be provided
func CheckCNARulesV4_0Metrics ¶ added in v0.5.0
func CheckCNARulesV4_0Metrics(json *string) []ValidationError
CheckCNARulesV4_0Metrics validates CNA Rules requirements for vulnerability metrics. MUST: If metrics are provided, they must be properly formatted and valid SHOULD: CVSS v3.1 metrics are recommended
func CheckCNARulesV4_0References ¶ added in v0.5.0
func CheckCNARulesV4_0References(json *string) []ValidationError
CheckCNARulesV4_0References validates CNA Rules requirements for references. MUST: At least one reference must be provided SHOULD: Multiple reference types are recommended (e.g., Advisory, Patch, etc.)
func CheckCNARulesV4_0Timeline ¶ added in v0.5.0
func CheckCNARulesV4_0Timeline(json *string) []ValidationError
CheckCNARulesV4_0Timeline validates CNA Rules requirements for timeline entries. SHOULD: Timeline entries should be provided when available MUST: If provided, timeline entries should have event and date fields
func CheckCustomVersionType ¶ added in v0.5.0
func CheckCustomVersionType(json *string) []ValidationError
func CheckCvssV3BaseSeverity ¶
func CheckCvssV3BaseSeverity(json *string) []ValidationError
func CheckInvalidVersion ¶ added in v0.3.0
func CheckInvalidVersion(json *string) []ValidationError
CheckInvalidVersion returns an array of detected version-related ValidationError findings. It checks that the affected.versions sub-fields are used correctly, including: - Generic character validation via validVersionRe - Type-specific version format validation when versionType is declared - Ensuring "*" is only used in lessThan, not lessThanOrEqual
func CheckLeadingTrailingSpace ¶
func CheckLeadingTrailingSpace(json *string) []ValidationError
func CheckLength ¶
func CheckLength(json *string) []ValidationError
func CheckPurlConsistency ¶ added in v0.5.0
func CheckPurlConsistency(json *string) []ValidationError
CheckPurlConsistency validates that PURLs are consistent with vendor/product information. If a PURL is provided, it should align with the vendor and product fields.
func CheckPurlFormat ¶ added in v0.5.0
func CheckPurlFormat(json *string) []ValidationError
CheckPurlFormat validates that PURL (Package URL) strings in the CVE record are valid. This function checks PURL entries in the "components" section which may be added to CVE schema. PURLs should follow the Package URL specification: https://github.com/package-url/packageurl-go
func CheckRefProtocol ¶
func CheckRefProtocol(json *string) []ValidationError
func CheckSelfReference ¶ added in v0.4.0
func CheckSelfReference(json *string) []ValidationError
func CheckUnicodeEscapeSequences ¶ added in v0.5.0
func CheckUnicodeEscapeSequences(json *string) []ValidationError
func CheckValidProduct ¶ added in v0.4.0
func CheckValidProduct(json *string) []ValidationError
func CheckValidVendor ¶ added in v0.4.0
func CheckValidVendor(json *string) []ValidationError
func DuplicateRefs ¶
func DuplicateRefs(json *string) []ValidationError