vulnerability

package
v0.0.0-...-8b5d7a1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2018 License: Apache-2.0 Imports: 5 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"`
	// 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"`
	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) 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 {
	// 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"`
	// 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"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

Vulnerability provides metadata about a security vulnerability.

func (*Vulnerability) Descriptor

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

func (*Vulnerability) GetCvssScore

func (m *Vulnerability) GetCvssScore() float32

func (*Vulnerability) GetDetails

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

func (*Vulnerability) GetSeverity

func (m *Vulnerability) GetSeverity() Severity

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 {
	// 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"`
	// The package being described.
	Package string `protobuf:"bytes,2,opt,name=package,proto3" json:"package,omitempty"`
	// 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 {
	// 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"`
	// 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Identifies all occurrences 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) 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

Jump to

Keyboard shortcuts

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