Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from grafeas.grafeas_v1.proto import vulnerability_pb2
_shared_modules = [
any_pb2,
empty_pb2,
field_mask_pb2,
timestamp_pb2,
status_pb2,
]
_local_modules = [
attestation_pb2,
build_pb2,
common_pb2,
cvss_pb2,
deployment_pb2,
discovery_pb2,
grafeas_pb2,
image_pb2,
package_pb2,
provenance_pb2,
vulnerability_pb2,
]
names = []
for module in _shared_modules: # pragma: NO COVER
for name, message in get_messages(module).items():
setattr(sys.modules[__name__], name, message)
names.append(name)
for module in _local_modules:
_VULNERABILITYNOTE_DETAIL.fields_by_name[
"fixed_version"
].message_type = grafeas__v1_dot_proto_dot_package__pb2._VERSION
_VULNERABILITYNOTE_DETAIL.containing_type = _VULNERABILITYNOTE
_VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE.containing_type = (
_VULNERABILITYNOTE_WINDOWSDETAIL
)
_VULNERABILITYNOTE_WINDOWSDETAIL.fields_by_name[
"fixing_kbs"
].message_type = _VULNERABILITYNOTE_WINDOWSDETAIL_KNOWLEDGEBASE
_VULNERABILITYNOTE_WINDOWSDETAIL.containing_type = _VULNERABILITYNOTE
_VULNERABILITYNOTE.fields_by_name["severity"].enum_type = _SEVERITY
_VULNERABILITYNOTE.fields_by_name["details"].message_type = _VULNERABILITYNOTE_DETAIL
_VULNERABILITYNOTE.fields_by_name[
"cvss_v3"
].message_type = grafeas__v1_dot_proto_dot_cvss__pb2._CVSSV3
_VULNERABILITYNOTE.fields_by_name[
"windows_details"
].message_type = _VULNERABILITYNOTE_WINDOWSDETAIL
_VULNERABILITYOCCURRENCE_PACKAGEISSUE.fields_by_name[
"affected_version"
].message_type = grafeas__v1_dot_proto_dot_package__pb2._VERSION
_VULNERABILITYOCCURRENCE_PACKAGEISSUE.fields_by_name[
"fixed_version"
].message_type = grafeas__v1_dot_proto_dot_package__pb2._VERSION
_VULNERABILITYOCCURRENCE_PACKAGEISSUE.containing_type = _VULNERABILITYOCCURRENCE
_VULNERABILITYOCCURRENCE.fields_by_name["severity"].enum_type = _SEVERITY
_VULNERABILITYOCCURRENCE.fields_by_name[
"package_issue"
].message_type = _VULNERABILITYOCCURRENCE_PACKAGEISSUE
_VULNERABILITYOCCURRENCE.fields_by_name[
"related_urls"
)
DESCRIPTOR = _descriptor.FileDescriptor(
name="grafeas_v1/proto/vulnerability.proto",
package="grafeas.v1",
syntax="proto3",
serialized_options=_b(
"\n\rio.grafeas.v1P\001Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\242\002\003GRA"
),
serialized_pb=_b(
'\n$grafeas_v1/proto/vulnerability.proto\x12\ngrafeas.v1\x1a\x1dgrafeas_v1/proto/common.proto\x1a\x1bgrafeas_v1/proto/cvss.proto\x1a\x1egrafeas_v1/proto/package.proto"\x8a\x06\n\x11VulnerabilityNote\x12\x12\n\ncvss_score\x18\x01 \x01(\x02\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x35\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32$.grafeas.v1.VulnerabilityNote.Detail\x12#\n\x07\x63vss_v3\x18\x04 \x01(\x0b\x32\x12.grafeas.v1.CVSSv3\x12\x44\n\x0fwindows_details\x18\x05 \x03(\x0b\x32+.grafeas.v1.VulnerabilityNote.WindowsDetail\x1a\xd5\x02\n\x06\x44\x65tail\x12\x15\n\rseverity_name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x14\n\x0cpackage_type\x18\x03 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_cpe_uri\x18\x04 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_package\x18\x05 \x01(\t\x12\x33\n\x16\x61\x66\x66\x65\x63ted_version_start\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x31\n\x14\x61\x66\x66\x65\x63ted_version_end\x18\x07 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfixed_cpe_uri\x18\x08 \x01(\t\x12\x15\n\rfixed_package\x18\t \x01(\t\x12*\n\rfixed_version\x18\n \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x13\n\x0bis_obsolete\x18\x0b \x01(\x08\x1a\xbe\x01\n\rWindowsDetail\x12\x0f\n\x07\x63pe_uri\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12M\n\nfixing_kbs\x18\x04 \x03(\x0b\x32\x39.grafeas.v1.VulnerabilityNote.WindowsDetail.KnowledgeBase\x1a*\n\rKnowledgeBase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t"\xbd\x04\n\x17VulnerabilityOccurrence\x12\x0c\n\x04type\x18\x01 \x01(\t\x12&\n\x08severity\x18\x02 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x12\n\ncvss_score\x18\x03 \x01(\x02\x12G\n\rpackage_issue\x18\x04 \x03(\x0b\x32\x30.grafeas.v1.VulnerabilityOccurrence.PackageIssue\x12\x19\n\x11short_description\x18\x05 \x01(\t\x12\x18\n\x10long_description\x18\x06 \x01(\t\x12,\n\x0crelated_urls\x18\x07 \x03(\x0b\x32\x16.grafeas.v1.RelatedUrl\x12\x30\n\x12\x65\x66\x66\x65\x63tive_severity\x18\x08 \x01(\x0e\x32\x14.grafeas.v1.Severity\x12\x15\n\rfix_available\x18\t \x01(\x08\x1a\xe2\x01\n\x0cPackageIssue\x12\x18\n\x10\x61\x66\x66\x65\x63ted_cpe_uri\x18\x01 \x01(\t\x12\x18\n\x10\x61\x66\x66\x65\x63ted_package\x18\x02 \x01(\t\x12-\n\x10\x61\x66\x66\x65\x63ted_version\x18\x03 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfixed_cpe_uri\x18\x04 \x01(\t\x12\x15\n\rfixed_package\x18\x05 \x01(\t\x12*\n\rfixed_version\x18\x06 \x01(\x0b\x32\x13.grafeas.v1.Version\x12\x15\n\rfix_available\x18\x07 \x01(\x08*^\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07MINIMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\x12\x0c\n\x08\x43RITICAL\x10\x05\x42Q\n\rio.grafeas.v1P\x01Z8google.golang.org/genproto/googleapis/grafeas/v1;grafeas\xa2\x02\x03GRAb\x06proto3'
),
dependencies=[
grafeas__v1_dot_proto_dot_common__pb2.DESCRIPTOR,
grafeas__v1_dot_proto_dot_cvss__pb2.DESCRIPTOR,
grafeas__v1_dot_proto_dot_package__pb2.DESCRIPTOR,
],
)
_SEVERITY = _descriptor.EnumDescriptor(
name="Severity",
full_name="grafeas.v1.Severity",
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name="SEVERITY_UNSPECIFIED",
index=0,
number=0,
serialized_options=None,
type=None,