pub struct SecurityTestConfig {
pub enabled: bool,
pub categories: HashSet<SecurityCategory>,
pub target_fields: Vec<String>,
pub custom_payloads_file: Option<String>,
pub include_high_risk: bool,
}Expand description
Configuration for security testing
Fields§
§enabled: boolWhether security testing is enabled
categories: HashSet<SecurityCategory>Categories to test
target_fields: Vec<String>Specific fields to target for injection
custom_payloads_file: Option<String>Path to custom payloads file (extends built-in)
include_high_risk: boolWhether to include high-risk payloads
Implementations§
Source§impl SecurityTestConfig
impl SecurityTestConfig
Sourcepub fn with_categories(self, categories: HashSet<SecurityCategory>) -> Self
pub fn with_categories(self, categories: HashSet<SecurityCategory>) -> Self
Set categories to test
Sourcepub fn with_target_fields(self, fields: Vec<String>) -> Self
pub fn with_target_fields(self, fields: Vec<String>) -> Self
Set target fields
Sourcepub fn with_custom_payloads(self, path: String) -> Self
pub fn with_custom_payloads(self, path: String) -> Self
Set custom payloads file
Sourcepub fn with_high_risk(self) -> Self
pub fn with_high_risk(self) -> Self
Enable high-risk payloads
Sourcepub fn parse_categories(s: &str) -> Result<HashSet<SecurityCategory>, String>
pub fn parse_categories(s: &str) -> Result<HashSet<SecurityCategory>, String>
Parse categories from a comma-separated string
Trait Implementations§
Source§impl Clone for SecurityTestConfig
impl Clone for SecurityTestConfig
Source§fn clone(&self) -> SecurityTestConfig
fn clone(&self) -> SecurityTestConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecurityTestConfig
impl Debug for SecurityTestConfig
Source§impl Default for SecurityTestConfig
impl Default for SecurityTestConfig
Source§impl<'de> Deserialize<'de> for SecurityTestConfig
impl<'de> Deserialize<'de> for SecurityTestConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SecurityTestConfig
impl RefUnwindSafe for SecurityTestConfig
impl Send for SecurityTestConfig
impl Sync for SecurityTestConfig
impl Unpin for SecurityTestConfig
impl UnwindSafe for SecurityTestConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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