vulnerability

package
v0.0.0-...-e165f0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Severity_name = map[int32]string{
	0: "SEVERITY_UNSPECIFIED",
	1: "MINIMAL",
	2: "LOW",
	3: "MEDIUM",
	4: "HIGH",
	5: "CRITICAL",
}
View Source
var Severity_value = map[string]int32{
	"SEVERITY_UNSPECIFIED": 0,
	"MINIMAL":              1,
	"LOW":                  2,
	"MEDIUM":               3,
	"HIGH":                 4,
	"CRITICAL":             5,
}

Functions

This section is empty.

Types

type Details

type Details struct {
	// The type of package; whether native or non native(ruby gems, node.js
	// packages etc)
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Output only. The note provider assigned Severity of the vulnerability.
	Severity Severity `protobuf:"varint,2,opt,name=severity,proto3,enum=grafeas.v1beta1.vulnerability.Severity" json:"severity,omitempty"`
	// Output only. The CVSS score of this vulnerability. CVSS score is on a
	// scale of 0-10 where 0 indicates low severity and 10 indicates high
	// severity.
	CvssScore float32 `protobuf:"fixed32,3,opt,name=cvss_score,json=cvssScore,proto3" json:"cvss_score,omitempty"`
	// Required. The set of affected locations and their fixes (if available)
	// within the associated resource.
	PackageIssue []*PackageIssue `protobuf:"bytes,4,rep,name=package_issue,json=packageIssue,proto3" json:"package_issue,omitempty"`
	// Output only. A one sentence description of this vulnerability.
	ShortDescription string `protobuf:"bytes,5,opt,name=short_description,json=shortDescription,proto3" json:"short_description,omitempty"`
	// Output only. A detailed description of this vulnerability.
	LongDescription string `protobuf:"bytes,6,opt,name=long_description,json=longDescription,proto3" json:"long_description,omitempty"`
	// Output only. URLs related to this vulnerability.
	RelatedUrls []*common.RelatedUrl `protobuf:"bytes,7,rep,name=related_urls,json=relatedUrls,proto3" json:"related_urls,omitempty"`
	// The distro assigned severity for this vulnerability when it is
	// available, and note provider assigned severity when distro has not yet
	// assigned a severity for this vulnerability.
	EffectiveSeverity    Severity `` /* 157-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Details of a vulnerability Occurrence.

func (*Details) Descriptor

func (*Details) Descriptor() ([]byte, []int)

func (*Details) GetCvssScore

func (m *Details) GetCvssScore() float32

func (*Details) GetEffectiveSeverity

func (m *Details) GetEffectiveSeverity() Severity

func (*Details) GetLongDescription

func (m *Details) GetLongDescription() string

func (*Details) GetPackageIssue

func (m *Details) GetPackageIssue() []*PackageIssue

func (*Details) GetRelatedUrls

func (m *Details) GetRelatedUrls() []*common.RelatedUrl

func (*Details) GetSeverity

func (m *Details) GetSeverity() Severity

func (*Details) GetShortDescription

func (m *Details) GetShortDescription() string

func (*Details) GetType

func (m *Details) GetType() string

func (*Details) ProtoMessage

func (*Details) ProtoMessage()

func (*Details) Reset

func (m *Details) Reset()

func (*Details) String

func (m *Details) String() string

func (*Details) XXX_DiscardUnknown

func (m *Details) XXX_DiscardUnknown()

func (*Details) XXX_Marshal

func (m *Details) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Details) XXX_Merge

func (m *Details) XXX_Merge(src proto.Message)

func (*Details) XXX_Size

func (m *Details) XXX_Size() int

func (*Details) XXX_Unmarshal

func (m *Details) XXX_Unmarshal(b []byte) error

type PackageIssue

type PackageIssue struct {
	// Required. The location of the vulnerability.
	AffectedLocation *VulnerabilityLocation `protobuf:"bytes,1,opt,name=affected_location,json=affectedLocation,proto3" json:"affected_location,omitempty"`
	// The location of the available fix for vulnerability.
	FixedLocation *VulnerabilityLocation `protobuf:"bytes,2,opt,name=fixed_location,json=fixedLocation,proto3" json:"fixed_location,omitempty"`
	// Deprecated, use Details.effective_severity instead
	// The severity (e.g., distro assigned severity) for this vulnerability.
	SeverityName         string   `protobuf:"bytes,3,opt,name=severity_name,json=severityName,proto3" json:"severity_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

This message wraps a location affected by a vulnerability and its associated fix (if one is available).

func (*PackageIssue) Descriptor

func (*PackageIssue) Descriptor() ([]byte, []int)

func (*PackageIssue) GetAffectedLocation

func (m *PackageIssue) GetAffectedLocation() *VulnerabilityLocation

func (*PackageIssue) GetFixedLocation

func (m *PackageIssue) GetFixedLocation() *VulnerabilityLocation

func (*PackageIssue) GetSeverityName

func (m *PackageIssue) GetSeverityName() string

func (*PackageIssue) ProtoMessage

func (*PackageIssue) ProtoMessage()

func (*PackageIssue) Reset

func (m *PackageIssue) Reset()

func (*PackageIssue) String

func (m *PackageIssue) String() string

func (*PackageIssue) XXX_DiscardUnknown

func (m *PackageIssue) XXX_DiscardUnknown()

func (*PackageIssue) XXX_Marshal

func (m *PackageIssue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PackageIssue) XXX_Merge

func (m *PackageIssue) XXX_Merge(src proto.Message)

func (*PackageIssue) XXX_Size

func (m *PackageIssue) XXX_Size() int

func (*PackageIssue) XXX_Unmarshal

func (m *PackageIssue) XXX_Unmarshal(b []byte) error

type Severity

type Severity int32

Note provider-assigned severity/impact ranking.

const (
	// Unknown.
	Severity_SEVERITY_UNSPECIFIED Severity = 0
	// Minimal severity.
	Severity_MINIMAL Severity = 1
	// Low severity.
	Severity_LOW Severity = 2
	// Medium severity.
	Severity_MEDIUM Severity = 3
	// High severity.
	Severity_HIGH Severity = 4
	// Critical severity.
	Severity_CRITICAL Severity = 5
)

func (Severity) EnumDescriptor

func (Severity) EnumDescriptor() ([]byte, []int)

func (Severity) String

func (x Severity) String() string

type Vulnerability

type Vulnerability struct {
	// The CVSS score for this vulnerability.
	CvssScore float32 `protobuf:"fixed32,1,opt,name=cvss_score,json=cvssScore,proto3" json:"cvss_score,omitempty"`
	// Note provider assigned impact of the vulnerability.
	Severity Severity `protobuf:"varint,2,opt,name=severity,proto3,enum=grafeas.v1beta1.vulnerability.Severity" json:"severity,omitempty"`
	// All information about the package to specifically identify this
	// vulnerability. One entry per (version range and cpe_uri) the package
	// vulnerability has manifested in.
	Details []*Vulnerability_Detail `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"`
	// The full description of the CVSSv3.
	CvssV3 *cvss.CVSSv3 `protobuf:"bytes,4,opt,name=cvss_v3,json=cvssV3,proto3" json:"cvss_v3,omitempty"`
	// Windows details get their own format because the information format and
	// model don't match a normal detail. Specifically Windows updates are done as
	// patches, thus Windows vulnerabilities really are a missing package, rather
	// than a package being at an incorrect version.
	WindowsDetails []*Vulnerability_WindowsDetail `protobuf:"bytes,5,rep,name=windows_details,json=windowsDetails,proto3" json:"windows_details,omitempty"`
	// The time this information was last changed at the source. This is an
	// upstream timestamp from the underlying information source - e.g. Ubuntu
	// security tracker.
	SourceUpdateTime     *timestamp.Timestamp `protobuf:"bytes,6,opt,name=source_update_time,json=sourceUpdateTime,proto3" json:"source_update_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Vulnerability provides metadata about a security vulnerability in a Note.

func (*Vulnerability) Descriptor

func (*Vulnerability) Descriptor() ([]byte, []int)

func (*Vulnerability) GetCvssScore

func (m *Vulnerability) GetCvssScore() float32

func (*Vulnerability) GetCvssV3

func (m *Vulnerability) GetCvssV3() *cvss.CVSSv3

func (*Vulnerability) GetDetails

func (m *Vulnerability) GetDetails() []*Vulnerability_Detail

func (*Vulnerability) GetSeverity

func (m *Vulnerability) GetSeverity() Severity

func (*Vulnerability) GetSourceUpdateTime

func (m *Vulnerability) GetSourceUpdateTime() *timestamp.Timestamp

func (*Vulnerability) GetWindowsDetails

func (m *Vulnerability) GetWindowsDetails() []*Vulnerability_WindowsDetail

func (*Vulnerability) ProtoMessage

func (*Vulnerability) ProtoMessage()

func (*Vulnerability) Reset

func (m *Vulnerability) Reset()

func (*Vulnerability) String

func (m *Vulnerability) String() string

func (*Vulnerability) XXX_DiscardUnknown

func (m *Vulnerability) XXX_DiscardUnknown()

func (*Vulnerability) XXX_Marshal

func (m *Vulnerability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vulnerability) XXX_Merge

func (m *Vulnerability) XXX_Merge(src proto.Message)

func (*Vulnerability) XXX_Size

func (m *Vulnerability) XXX_Size() int

func (*Vulnerability) XXX_Unmarshal

func (m *Vulnerability) XXX_Unmarshal(b []byte) error

type VulnerabilityLocation

type VulnerabilityLocation struct {
	// Required. The CPE URI in [cpe format](https://cpe.mitre.org/specification/)
	// format. Examples include distro or storage location for vulnerable jar.
	CpeUri string `protobuf:"bytes,1,opt,name=cpe_uri,json=cpeUri,proto3" json:"cpe_uri,omitempty"`
	// Required. The package being described.
	Package string `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
	// Required. The version of the package being described.
	Version              *_package.Version `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

The location of the vulnerability.

func (*VulnerabilityLocation) Descriptor

func (*VulnerabilityLocation) Descriptor() ([]byte, []int)

func (*VulnerabilityLocation) GetCpeUri

func (m *VulnerabilityLocation) GetCpeUri() string

func (*VulnerabilityLocation) GetPackage

func (m *VulnerabilityLocation) GetPackage() string

func (*VulnerabilityLocation) GetVersion

func (m *VulnerabilityLocation) GetVersion() *_package.Version

func (*VulnerabilityLocation) ProtoMessage

func (*VulnerabilityLocation) ProtoMessage()

func (*VulnerabilityLocation) Reset

func (m *VulnerabilityLocation) Reset()

func (*VulnerabilityLocation) String

func (m *VulnerabilityLocation) String() string

func (*VulnerabilityLocation) XXX_DiscardUnknown

func (m *VulnerabilityLocation) XXX_DiscardUnknown()

func (*VulnerabilityLocation) XXX_Marshal

func (m *VulnerabilityLocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VulnerabilityLocation) XXX_Merge

func (m *VulnerabilityLocation) XXX_Merge(src proto.Message)

func (*VulnerabilityLocation) XXX_Size

func (m *VulnerabilityLocation) XXX_Size() int

func (*VulnerabilityLocation) XXX_Unmarshal

func (m *VulnerabilityLocation) XXX_Unmarshal(b []byte) error

type Vulnerability_Detail

type Vulnerability_Detail struct {
	// Required. The CPE URI in
	// [cpe format](https://cpe.mitre.org/specification/) in which the
	// vulnerability manifests. Examples include distro or storage location for
	// vulnerable jar.
	CpeUri string `protobuf:"bytes,1,opt,name=cpe_uri,json=cpeUri,proto3" json:"cpe_uri,omitempty"`
	// Required. The name of the package where the vulnerability was found.
	Package string `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
	// The min version of the package in which the vulnerability exists.
	MinAffectedVersion *_package.Version `protobuf:"bytes,3,opt,name=min_affected_version,json=minAffectedVersion,proto3" json:"min_affected_version,omitempty"`
	// The max version of the package in which the vulnerability exists.
	MaxAffectedVersion *_package.Version `protobuf:"bytes,4,opt,name=max_affected_version,json=maxAffectedVersion,proto3" json:"max_affected_version,omitempty"`
	// The severity (eg: distro assigned severity) for this vulnerability.
	SeverityName string `protobuf:"bytes,5,opt,name=severity_name,json=severityName,proto3" json:"severity_name,omitempty"`
	// A vendor-specific description of this note.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// The fix for this specific package version.
	FixedLocation *VulnerabilityLocation `protobuf:"bytes,7,opt,name=fixed_location,json=fixedLocation,proto3" json:"fixed_location,omitempty"`
	// The type of package; whether native or non native(ruby gems, node.js
	// packages etc).
	PackageType string `protobuf:"bytes,8,opt,name=package_type,json=packageType,proto3" json:"package_type,omitempty"`
	// Whether this detail is obsolete. Occurrences are expected not to point to
	// obsolete details.
	IsObsolete bool `protobuf:"varint,9,opt,name=is_obsolete,json=isObsolete,proto3" json:"is_obsolete,omitempty"`
	// The time this information was last changed at the source. This is an
	// upstream timestamp from the underlying information source - e.g. Ubuntu
	// security tracker.
	SourceUpdateTime     *timestamp.Timestamp `protobuf:"bytes,10,opt,name=source_update_time,json=sourceUpdateTime,proto3" json:"source_update_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

Identifies all appearances of this vulnerability in the package for a specific distro/location. For example: glibc in cpe:/o:debian:debian_linux:8 for versions 2.1 - 2.2

func (*Vulnerability_Detail) Descriptor

func (*Vulnerability_Detail) Descriptor() ([]byte, []int)

func (*Vulnerability_Detail) GetCpeUri

func (m *Vulnerability_Detail) GetCpeUri() string

func (*Vulnerability_Detail) GetDescription

func (m *Vulnerability_Detail) GetDescription() string

func (*Vulnerability_Detail) GetFixedLocation

func (m *Vulnerability_Detail) GetFixedLocation() *VulnerabilityLocation

func (*Vulnerability_Detail) GetIsObsolete

func (m *Vulnerability_Detail) GetIsObsolete() bool

func (*Vulnerability_Detail) GetMaxAffectedVersion

func (m *Vulnerability_Detail) GetMaxAffectedVersion() *_package.Version

func (*Vulnerability_Detail) GetMinAffectedVersion

func (m *Vulnerability_Detail) GetMinAffectedVersion() *_package.Version

func (*Vulnerability_Detail) GetPackage

func (m *Vulnerability_Detail) GetPackage() string

func (*Vulnerability_Detail) GetPackageType

func (m *Vulnerability_Detail) GetPackageType() string

func (*Vulnerability_Detail) GetSeverityName

func (m *Vulnerability_Detail) GetSeverityName() string

func (*Vulnerability_Detail) GetSourceUpdateTime

func (m *Vulnerability_Detail) GetSourceUpdateTime() *timestamp.Timestamp

func (*Vulnerability_Detail) ProtoMessage

func (*Vulnerability_Detail) ProtoMessage()

func (*Vulnerability_Detail) Reset

func (m *Vulnerability_Detail) Reset()

func (*Vulnerability_Detail) String

func (m *Vulnerability_Detail) String() string

func (*Vulnerability_Detail) XXX_DiscardUnknown

func (m *Vulnerability_Detail) XXX_DiscardUnknown()

func (*Vulnerability_Detail) XXX_Marshal

func (m *Vulnerability_Detail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vulnerability_Detail) XXX_Merge

func (m *Vulnerability_Detail) XXX_Merge(src proto.Message)

func (*Vulnerability_Detail) XXX_Size

func (m *Vulnerability_Detail) XXX_Size() int

func (*Vulnerability_Detail) XXX_Unmarshal

func (m *Vulnerability_Detail) XXX_Unmarshal(b []byte) error

type Vulnerability_WindowsDetail

type Vulnerability_WindowsDetail struct {
	// Required. The CPE URI in
	// [cpe format](https://cpe.mitre.org/specification/) in which the
	// vulnerability manifests. Examples include distro or storage location for
	// vulnerable jar.
	CpeUri string `protobuf:"bytes,1,opt,name=cpe_uri,json=cpeUri,proto3" json:"cpe_uri,omitempty"`
	// Required. The name of the vulnerability.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The description of the vulnerability.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Required. The names of the KBs which have hotfixes to mitigate this
	// vulnerability. Note that there may be multiple hotfixes (and thus
	// multiple KBs) that mitigate a given vulnerability. Currently any listed
	// kb's presence is considered a fix.
	FixingKbs            []*Vulnerability_WindowsDetail_KnowledgeBase `protobuf:"bytes,4,rep,name=fixing_kbs,json=fixingKbs,proto3" json:"fixing_kbs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                                     `json:"-"`
	XXX_unrecognized     []byte                                       `json:"-"`
	XXX_sizecache        int32                                        `json:"-"`
}

func (*Vulnerability_WindowsDetail) Descriptor

func (*Vulnerability_WindowsDetail) Descriptor() ([]byte, []int)

func (*Vulnerability_WindowsDetail) GetCpeUri

func (m *Vulnerability_WindowsDetail) GetCpeUri() string

func (*Vulnerability_WindowsDetail) GetDescription

func (m *Vulnerability_WindowsDetail) GetDescription() string

func (*Vulnerability_WindowsDetail) GetFixingKbs

func (*Vulnerability_WindowsDetail) GetName

func (m *Vulnerability_WindowsDetail) GetName() string

func (*Vulnerability_WindowsDetail) ProtoMessage

func (*Vulnerability_WindowsDetail) ProtoMessage()

func (*Vulnerability_WindowsDetail) Reset

func (m *Vulnerability_WindowsDetail) Reset()

func (*Vulnerability_WindowsDetail) String

func (m *Vulnerability_WindowsDetail) String() string

func (*Vulnerability_WindowsDetail) XXX_DiscardUnknown

func (m *Vulnerability_WindowsDetail) XXX_DiscardUnknown()

func (*Vulnerability_WindowsDetail) XXX_Marshal

func (m *Vulnerability_WindowsDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vulnerability_WindowsDetail) XXX_Merge

func (m *Vulnerability_WindowsDetail) XXX_Merge(src proto.Message)

func (*Vulnerability_WindowsDetail) XXX_Size

func (m *Vulnerability_WindowsDetail) XXX_Size() int

func (*Vulnerability_WindowsDetail) XXX_Unmarshal

func (m *Vulnerability_WindowsDetail) XXX_Unmarshal(b []byte) error

type Vulnerability_WindowsDetail_KnowledgeBase

type Vulnerability_WindowsDetail_KnowledgeBase struct {
	// The KB name (generally of the form KB[0-9]+ i.e. KB123456).
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A link to the KB in the Windows update catalog -
	// https://www.catalog.update.microsoft.com/
	Url                  string   `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Vulnerability_WindowsDetail_KnowledgeBase) Descriptor

func (*Vulnerability_WindowsDetail_KnowledgeBase) Descriptor() ([]byte, []int)

func (*Vulnerability_WindowsDetail_KnowledgeBase) GetName

func (*Vulnerability_WindowsDetail_KnowledgeBase) GetUrl

func (*Vulnerability_WindowsDetail_KnowledgeBase) ProtoMessage

func (*Vulnerability_WindowsDetail_KnowledgeBase) Reset

func (*Vulnerability_WindowsDetail_KnowledgeBase) String

func (*Vulnerability_WindowsDetail_KnowledgeBase) XXX_DiscardUnknown

func (m *Vulnerability_WindowsDetail_KnowledgeBase) XXX_DiscardUnknown()

func (*Vulnerability_WindowsDetail_KnowledgeBase) XXX_Marshal

func (m *Vulnerability_WindowsDetail_KnowledgeBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vulnerability_WindowsDetail_KnowledgeBase) XXX_Merge

func (*Vulnerability_WindowsDetail_KnowledgeBase) XXX_Size

func (*Vulnerability_WindowsDetail_KnowledgeBase) XXX_Unmarshal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL