Documentation
¶
Overview ¶
Package vuls provides an adapter to convert Vuls JSON output to CTIS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseToCTIS ¶
ParseToCTIS is a convenience function to parse Vuls JSON to CTIS format.
Types ¶
type Adapter ¶
type Adapter struct{}
Adapter converts Vuls JSON output to CTIS.
func (*Adapter) CanConvert ¶
CanConvert checks if the input can be converted.
func (*Adapter) Convert ¶
func (a *Adapter) Convert(ctx context.Context, input []byte, opts *core.AdapterOptions) (*ctis.Report, error)
Convert transforms Vuls JSON input to CTIS Report.
func (*Adapter) InputFormats ¶
InputFormats returns supported input formats.
func (*Adapter) OutputFormat ¶
OutputFormat returns the output format.
type VulsAffectedPkg ¶
type VulsAffectedPkg struct {
Name string `json:"name"`
FixedIn string `json:"fixedIn"`
NotFixedYet bool `json:"notFixedYet"`
}
VulsAffectedPkg represents a package affected by a CVE.
type VulsConfidence ¶
type VulsConfidence struct {
Score int `json:"score"`
DetectionMethod string `json:"detectionMethod"`
}
VulsConfidence represents detection confidence.
type VulsCveContent ¶
type VulsCveContent struct {
Type string `json:"type"`
CveID string `json:"cveID"`
Title string `json:"title"`
Summary string `json:"summary"`
Cvss3Score float64 `json:"cvss3Score"`
Cvss3Vector string `json:"cvss3Vector"`
Cvss2Score float64 `json:"cvss2Score"`
Cvss2Vector string `json:"cvss2Vector"`
Cvss40Score float64 `json:"cvss40Score"`
Cvss40Vector string `json:"cvss40Vector"`
CweIDs []string `json:"cweIDs"`
References []VulsRef `json:"references"`
Published string `json:"published"`
LastModified string `json:"lastModified"`
SourceLink string `json:"sourceLink"`
Optional map[string]string `json:"optional"`
}
VulsCveContent contains CVE details from a specific source.
type VulsCveContents ¶
type VulsCveContents map[string][]VulsCveContent
VulsCveContents maps source name to CVE content details.
type VulsCveResult ¶
type VulsCveResult struct {
CveID string `json:"cveID"`
Confidences []VulsConfidence `json:"confidences"`
CveContents VulsCveContents `json:"cveContents"`
AffectedPackages []VulsAffectedPkg `json:"affectedPackages"`
}
VulsCveResult represents a CVE finding from Vuls.
type VulsKernel ¶
type VulsKernel struct {
Version string `json:"version"`
Release string `json:"release"`
RebootRequired bool `json:"rebootRequired"`
}
VulsKernel describes the running kernel.
type VulsPackage ¶
type VulsPackage struct {
Name string `json:"name"`
Version string `json:"version"`
Release string `json:"release"`
Arch string `json:"arch"`
Repository string `json:"repository"`
NewVersion string `json:"newVersion"`
NewRelease string `json:"newRelease"`
}
VulsPackage represents a package found on the server.
type VulsPackages ¶
type VulsPackages map[string]VulsPackage
VulsPackages maps package name to package info.
type VulsRef ¶
type VulsRef struct {
Source string `json:"source"`
Link string `json:"link"`
RefID string `json:"refID"`
}
VulsRef is a CVE reference link.
type VulsReport ¶
type VulsReport struct {
JSONVersion int `json:"jsonVersion"`
ServerName string `json:"serverName"`
Family string `json:"family"`
Release string `json:"release"`
RunningKernel VulsKernel `json:"runningKernel"`
ScannedAt string `json:"scannedAt"`
ScannedVia string `json:"scannedVia"`
ScannedIPv4 []string `json:"scannedIpv4Addrs"`
ScannedIPv6 []string `json:"scannedIpv6Addrs"`
Packages VulsPackages `json:"packages"`
ScannedCves []VulsCveResult `json:"scannedCves"`
}
VulsReport is the root Vuls JSON scan result.