pub struct InjectionNeutralizationConfig {
pub sql_action: SqlAction,
pub command_action: CommandAction,
pub path_action: PathAction,
pub prompt_action: PromptAction,
}Expand description
Injection neutralization configuration
Controls how various injection attacks are neutralized. Each injection type requires specific handling to maintain functionality while ensuring security.
Fields§
§sql_action: SqlActionSQL injection action
Default: Parameterize (most secure) Security: SQL injection can lead to data breaches and corruption.
Block: Rejects query entirely (safest but may break functionality)Escape: Escapes dangerous characters (good but not foolproof)Parameterize: Converts to prepared statements (recommended)
command_action: CommandActionCommand injection action
Default: Escape (balanced approach) Security: Command injection enables arbitrary code execution.
Block: Rejects command entirely (safest)Escape: Escapes shell metacharacters (recommended)Sandbox: Runs in restricted environment (complex but safe)
path_action: PathActionPath traversal action
Default: Normalize (maintains functionality) Security: Path traversal accesses unauthorized files.
Block: Rejects paths with traversal patternsNormalize: Resolves to canonical safe path (recommended)
prompt_action: PromptActionPrompt injection action
Default: Wrap (adds safety context) Security: Prompt injection manipulates AI behavior.
Block: Rejects suspicious promptsEscape: Escapes control sequencesWrap: Adds safety boundaries (recommended for LLMs)
Trait Implementations§
Source§impl Clone for InjectionNeutralizationConfig
impl Clone for InjectionNeutralizationConfig
Source§fn clone(&self) -> InjectionNeutralizationConfig
fn clone(&self) -> InjectionNeutralizationConfig
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<'de> Deserialize<'de> for InjectionNeutralizationConfig
impl<'de> Deserialize<'de> for InjectionNeutralizationConfig
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 InjectionNeutralizationConfig
impl RefUnwindSafe for InjectionNeutralizationConfig
impl Send for InjectionNeutralizationConfig
impl Sync for InjectionNeutralizationConfig
impl Unpin for InjectionNeutralizationConfig
impl UnwindSafe for InjectionNeutralizationConfig
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