diff --git a/eksup/src/finding.rs b/eksup/src/finding.rs index cb35ed9..faa6f1d 100644 --- a/eksup/src/finding.rs +++ b/eksup/src/finding.rs @@ -65,16 +65,13 @@ pub(crate) trait _Deprecation { /// Codes that represent the finding variants /// /// This is useful for a few reasons: -/// 1. It would allow users to add codes to a 'ignore list' in the future, to ignore any -/// reported findings of that code type (another level of granularity of what data is -/// is most relevant to them) -/// 2. It provides a "marker" that can be used to link to documentation for the finding, -/// keeping the direct output concise while still providing the means for a full explanation -/// and reasoning behind the finding in one location -/// 3. It provides a strongly typed link between code and finding data allowing the code -/// to uniquely represent a finding even if the finding data is generic (i.e. - as is the case -/// in reporting available IPs as subnet findings, the data shape is generic by the finding -/// is unique to different scenarios) +/// 1. It would allow users to add codes to a 'ignore list' in the future, to ignore any reported findings of that code +/// type (another level of granularity of what data is is most relevant to them) +/// 2. It provides a "marker" that can be used to link to documentation for the finding, keeping the direct output +/// concise while still providing the means for a full explanation and reasoning behind the finding in one location +/// 3. It provides a strongly typed link between code and finding data allowing the code to uniquely represent a finding +/// even if the finding data is generic (i.e. - as is the case in reporting available IPs as subnet findings, the +/// data shape is generic by the finding is unique to different scenarios) #[derive(Clone, Debug, Serialize, Deserialize)] pub enum Code { /// AWS finding codes not specific to EKS diff --git a/eksup/src/k8s/resources.rs b/eksup/src/k8s/resources.rs index b06870f..79078c6 100644 --- a/eksup/src/k8s/resources.rs +++ b/eksup/src/k8s/resources.rs @@ -4,7 +4,6 @@ use anyhow::{Context, Result}; use k8s_openapi::api::{ apps, batch, core::{self, v1::PodTemplateSpec}, - policy, }; use kube::{api::Api, Client, CustomResource}; use schemars::JsonSchema; diff --git a/eksup/src/lib.rs b/eksup/src/lib.rs index da880ff..a87a0bb 100644 --- a/eksup/src/lib.rs +++ b/eksup/src/lib.rs @@ -161,12 +161,9 @@ async fn get_config(region: &Option, profile: &Option) -> Result let mut creds = DefaultCredentialsChain::builder().region(region.clone()); - match profile { - Some(profile) => { - creds = creds.profile_name(profile); - } - None => {} - } + if let Some(profile) = profile { + creds = creds.profile_name(profile); + }; let config = aws_config::from_env() .credentials_provider(creds.build().await)