#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vulnerability {
#[prost(string, tag = "1")]
pub package_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub affected_package_version: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub cve_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub cpe_uri: ::prost::alloc::string::String,
#[prost(enumeration = "Severity", tag = "5")]
pub severity: i32,
#[prost(float, tag = "6")]
pub cvss_score: f32,
#[prost(string, tag = "7")]
pub cvss_vector: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub fixed_cpe_uri: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub package_type: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub fixed_package: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub fixed_package_version: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub description: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "13")]
pub related_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "14")]
pub affected_images: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Finding {
#[prost(string, tag = "1")]
pub resource_name: ::prost::alloc::string::String,
#[prost(enumeration = "FindingType", tag = "2")]
pub r#type: i32,
#[prost(enumeration = "finding::State", tag = "3")]
pub state: i32,
#[prost(string, tag = "4")]
pub finding: ::prost::alloc::string::String,
#[prost(enumeration = "Severity", tag = "5")]
pub severity: i32,
#[prost(message, optional, tag = "6")]
pub event_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(oneof = "finding::Details", tags = "7")]
pub details: ::core::option::Option<finding::Details>,
}
pub mod finding {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Active = 1,
Remediated = 2,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Active => "ACTIVE",
State::Remediated => "REMEDIATED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ACTIVE" => Some(Self::Active),
"REMEDIATED" => Some(Self::Remediated),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Details {
#[prost(message, tag = "7")]
Vulnerability(super::Vulnerability),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FindingType {
Unspecified = 0,
Misconfig = 1,
Vulnerability = 2,
}
impl FindingType {
pub fn as_str_name(&self) -> &'static str {
match self {
FindingType::Unspecified => "FINDING_TYPE_UNSPECIFIED",
FindingType::Misconfig => "FINDING_TYPE_MISCONFIG",
FindingType::Vulnerability => "FINDING_TYPE_VULNERABILITY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FINDING_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"FINDING_TYPE_MISCONFIG" => Some(Self::Misconfig),
"FINDING_TYPE_VULNERABILITY" => Some(Self::Vulnerability),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Severity {
Unspecified = 0,
Critical = 1,
High = 2,
Medium = 3,
Low = 4,
}
impl Severity {
pub fn as_str_name(&self) -> &'static str {
match self {
Severity::Unspecified => "SEVERITY_UNSPECIFIED",
Severity::Critical => "SEVERITY_CRITICAL",
Severity::High => "SEVERITY_HIGH",
Severity::Medium => "SEVERITY_MEDIUM",
Severity::Low => "SEVERITY_LOW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
"SEVERITY_CRITICAL" => Some(Self::Critical),
"SEVERITY_HIGH" => Some(Self::High),
"SEVERITY_MEDIUM" => Some(Self::Medium),
"SEVERITY_LOW" => Some(Self::Low),
_ => None,
}
}
}