Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OSVAffected ¶
type OSVAffected struct {
Package OSVPackage `json:"package"`
Ranges []OSVRange `json:"ranges"`
DatabaseSpecific map[string]interface{} `json:"database_specific,omitempty"`
EcosystemSpecific map[string]interface{} `json:"ecosystem_specific,omitempty"`
}
OSVAffected represents affected package information
type OSVClient ¶
type OSVClient struct {
// contains filtered or unexported fields
}
OSVClient interacts with the Open Source Vulnerabilities (OSV) API
func (*OSVClient) GetVulnerabilities ¶
func (c *OSVClient) GetVulnerabilities(groupID, artifactID, version string) ([]*models.Vulnerability, error)
GetVulnerabilities queries OSV for vulnerabilities in a package
func (*OSVClient) GetVulnerabilitiesForDependencies ¶
func (c *OSVClient) GetVulnerabilitiesForDependencies(dependencies []*models.Dependency) (map[string][]*models.Vulnerability, error)
GetVulnerabilitiesForDependencies gets vulnerabilities for all dependencies
type OSVEvent ¶
type OSVEvent struct {
Introduced string `json:"introduced,omitempty"`
Fixed string `json:"fixed,omitempty"`
}
OSVEvent represents a version event
type OSVPackage ¶
OSVPackage represents a package in OSV format
type OSVQuery ¶
type OSVQuery struct {
Package OSVPackage `json:"package"`
Version string `json:"version,omitempty"`
}
OSVQuery represents a query to the OSV API
type OSVResponse ¶
type OSVResponse struct {
Vulns []OSVVulnerability `json:"vulns"`
}
OSVResponse represents the response from OSV API
type OSVSeverity ¶
OSVSeverity represents severity information
type OSVVulnerability ¶
type OSVVulnerability struct {
ID string `json:"id"`
Summary string `json:"summary"`
Details string `json:"details"`
Severity []OSVSeverity `json:"severity,omitempty"`
Affected []OSVAffected `json:"affected"`
}
OSVVulnerability represents a vulnerability from OSV
Click to show internal directories.
Click to hide internal directories.