pub struct AttackPattern {
pub id: String,
pub signature: [u8; 32],
pub category: AttackCategory,
pub threat_level: ThreatLevel,
pub action_type: ActionType,
pub target_patterns: Vec<String>,
pub keywords: Vec<String>,
pub timing_signature: Option<TimingSignature>,
pub triggered_rule: String,
pub first_seen: u64,
pub occurrence_count: u64,
pub confidence: f64,
}Expand description
Extracted attack pattern from DenialProof
Fields§
§id: StringUnique pattern ID
signature: [u8; 32]Pattern signature (hash of attack characteristics)
category: AttackCategoryAttack category
threat_level: ThreatLevelThreat level
action_type: ActionTypeAction type that was blocked
target_patterns: Vec<String>Target patterns (file paths, commands, etc.)
keywords: Vec<String>Keyword triggers found
timing_signature: Option<TimingSignature>Timing characteristics (for timing attack detection)
triggered_rule: StringRule that caught this attack
first_seen: u64First seen timestamp
occurrence_count: u64Number of times seen
confidence: f64Confidence score (0.0 - 1.0)
Implementations§
Source§impl AttackPattern
impl AttackPattern
Sourcepub fn from_denial(
denial: &DenialProof,
_additional_context: Option<&str>,
) -> Self
pub fn from_denial( denial: &DenialProof, _additional_context: Option<&str>, ) -> Self
Create new attack pattern from denial proof
Sourcepub fn matches(&self, other: &AttackPattern) -> bool
pub fn matches(&self, other: &AttackPattern) -> bool
Check if this pattern matches another (for deduplication)
Trait Implementations§
Source§impl Clone for AttackPattern
impl Clone for AttackPattern
Source§fn clone(&self) -> AttackPattern
fn clone(&self) -> AttackPattern
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 AttackPattern
impl Debug for AttackPattern
Source§impl<'de> Deserialize<'de> for AttackPattern
impl<'de> Deserialize<'de> for AttackPattern
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 AttackPattern
impl RefUnwindSafe for AttackPattern
impl Send for AttackPattern
impl Sync for AttackPattern
impl Unpin for AttackPattern
impl UnwindSafe for AttackPattern
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