pub struct SecurityConfig {
pub ignore_patterns: Vec<String>,
pub ignore_paths: Vec<String>,
}Expand description
Security configuration for ignore rules.
Loaded from ~/.config/aptu/security.toml with fallback to defaults.
By default, includes sensible ignore paths for common test and vendor directories.
Use SecurityConfig::empty() for a configuration with no ignore rules.
Fields§
§ignore_patterns: Vec<String>Pattern IDs to ignore (e.g., ["hardcoded-secret", "sql-injection"]).
ignore_paths: Vec<String>File path prefixes to ignore (e.g., ["test/", "vendor/"]).
Implementations§
Source§impl SecurityConfig
impl SecurityConfig
Sourcepub fn with_defaults() -> Self
👎Deprecated since 0.6.0: Use SecurityConfig::default() instead
pub fn with_defaults() -> Self
Use SecurityConfig::default() instead
Create configuration with sensible default ignore paths.
This is an alias for Default::default().
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Create an empty configuration with no ignore rules.
Use this when you want to scan all files without any filtering.
Sourcepub fn should_ignore_path(&self, file_path: &str) -> bool
pub fn should_ignore_path(&self, file_path: &str) -> bool
Sourcepub fn load() -> Self
pub fn load() -> Self
Load configuration from ~/.config/aptu/security.toml.
Returns default configuration if file doesn’t exist or parse fails.
§Returns
Loaded configuration or default on error.
Sourcepub fn config_path() -> Option<PathBuf>
pub fn config_path() -> Option<PathBuf>
Get the configuration file path.
Returns ~/.config/aptu/security.toml or None if config directory cannot be determined.
Sourcepub fn should_ignore(&self, finding: &Finding) -> bool
pub fn should_ignore(&self, finding: &Finding) -> bool
Trait Implementations§
Source§impl Clone for SecurityConfig
impl Clone for SecurityConfig
Source§fn clone(&self) -> SecurityConfig
fn clone(&self) -> SecurityConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SecurityConfig
impl Debug for SecurityConfig
Source§impl Default for SecurityConfig
impl Default for SecurityConfig
Source§impl<'de> Deserialize<'de> for SecurityConfig
impl<'de> Deserialize<'de> for SecurityConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SecurityConfig
impl RefUnwindSafe for SecurityConfig
impl Send for SecurityConfig
impl Sync for SecurityConfig
impl Unpin for SecurityConfig
impl UnsafeUnpin for SecurityConfig
impl UnwindSafe for SecurityConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromResponse for Twhere
T: DeserializeOwned,
impl<T> FromResponse for Twhere
T: DeserializeOwned,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more