Documentation
¶
Overview ¶
Package cveschema5 contains the schema for a CVE Record in CVE JSON 5.0 format. The package implements a subset of the schema needed to publish reports for the vulnerability database.
https://github.com/CVEProject/cve-schema/blob/master/schema/v5.0/CVE_JSON_5.0_schema.json contains the full JSON schema and documentation for each field.
Index ¶
- Constants
- func IsCVE(s string) bool
- type Affected
- type CNAPublishedContainer
- type CVERecord
- type Containers
- type Credit
- type Description
- type Metadata
- type ProblemType
- type ProblemTypeDescription
- type ProgramRoutine
- type ProviderMetadata
- type Reference
- type State
- type Version
- type VersionRange
- type VersionStatus
Constants ¶
View Source
const Regex = `CVE-\d{4}-\d{4,}`
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Affected ¶
type Affected struct { Vendor string `json:"vendor,omitempty"` Product string `json:"product,omitempty"` CollectionURL string `json:"collectionURL,omitempty"` PackageName string `json:"packageName,omitempty"` Versions []VersionRange `json:"versions,omitempty"` Platforms []string `json:"platforms,omitempty"` ProgramRoutines []ProgramRoutine `json:"programRoutines,omitempty"` DefaultStatus VersionStatus `json:"defaultStatus,omitempty"` }
type CNAPublishedContainer ¶
type CNAPublishedContainer struct { ProviderMetadata ProviderMetadata `json:"providerMetadata"` Title string `json:"title,omitempty"` Descriptions []Description `json:"descriptions"` Affected []Affected `json:"affected"` ProblemTypes []ProblemType `json:"problemTypes,omitempty"` References []Reference `json:"references"` Credits []Credit `json:"credits,omitempty"` }
type CVERecord ¶
type CVERecord struct { DataType string `json:"dataType"` DataVersion string `json:"dataVersion"` Metadata Metadata `json:"cveMetadata"` Containers Containers `json:"containers"` }
type Containers ¶
type Containers struct {
CNAContainer CNAPublishedContainer `json:"cna"`
}
func ReadForPublish ¶
func ReadForPublish(filename string) (cveID string, toPublish *Containers, err error)
ReadForPublish reads the portion of a CVE record that can be published via the CVE Services API from filename.
type Description ¶
type ProblemType ¶
type ProblemType struct {
Descriptions []ProblemTypeDescription `json:"descriptions"`
}
type ProblemTypeDescription ¶
type ProgramRoutine ¶
type ProgramRoutine struct {
Name string `json:"name"`
}
type ProviderMetadata ¶
type ProviderMetadata struct {
OrgID string `json:"orgId"`
}
type VersionRange ¶
type VersionRange struct { Introduced Version `json:"version"` Fixed Version `json:"lessThan"` Status VersionStatus `json:"status"` VersionType string `json:"versionType"` }
type VersionStatus ¶
type VersionStatus string
const ( StatusAffected VersionStatus = "affected" StatusUnaffected VersionStatus = "unaffected" StatusUnknown VersionStatus = "unknown" )
Click to show internal directories.
Click to hide internal directories.