pub struct DetectionFinding {Show 22 fields
pub class_uid: u16,
pub category_uid: u8,
pub type_uid: u32,
pub activity_id: u8,
pub activity_name: Option<String>,
pub time: i64,
pub severity_id: u8,
pub severity: Option<String>,
pub status_id: u8,
pub status: Option<String>,
pub action_id: u8,
pub disposition_id: u8,
pub disposition: Option<String>,
pub message: Option<String>,
pub metadata: Metadata,
pub finding_info: FindingInfo,
pub actor: Option<Actor>,
pub resources: Option<Vec<ResourceDetail>>,
pub observables: Option<Vec<Observable>>,
pub evidence: Option<Evidence>,
pub attacks: Option<Vec<Attack>>,
pub unmapped: Option<Value>,
}Expand description
OCSF Detection Finding event (class_uid = 2004).
Fields§
§class_uid: u16Always 2004.
category_uid: u8Always 2 (Findings).
type_uid: u32class_uid * 100 + activity_id.
activity_id: u8Activity ID (1=Create, 2=Update, 3=Close).
activity_name: Option<String>Human-readable activity name.
time: i64Event time as epoch milliseconds.
severity_id: u8Severity ID (0-6, 99).
severity: Option<String>Human-readable severity label.
status_id: u8Status ID (0=Unknown, 1=Success, 2=Failure).
status: Option<String>Human-readable status label.
action_id: u8Action ID (1=Allowed, 2=Denied).
disposition_id: u8Disposition ID (1=Allowed, 2=Blocked, 17=Logged).
disposition: Option<String>Human-readable disposition label.
message: Option<String>Human-readable event message.
metadata: MetadataMetadata (required).
finding_info: FindingInfoFinding information (required for Detection Finding).
actor: Option<Actor>Actor who triggered the finding.
resources: Option<Vec<ResourceDetail>>Affected resources.
observables: Option<Vec<Observable>>Observables associated with the finding.
evidence: Option<Evidence>Evidence supporting the finding.
attacks: Option<Vec<Attack>>MITRE ATT&CK mapping.
unmapped: Option<Value>Vendor-specific unmapped data.
Implementations§
Source§impl DetectionFinding
impl DetectionFinding
Sourcepub fn new(
activity: DetectionFindingActivity,
time: i64,
severity_id: u8,
status_id: u8,
action_id: u8,
disposition_id: u8,
metadata: Metadata,
finding_info: FindingInfo,
) -> Self
pub fn new( activity: DetectionFindingActivity, time: i64, severity_id: u8, status_id: u8, action_id: u8, disposition_id: u8, metadata: Metadata, finding_info: FindingInfo, ) -> Self
Create a new Detection Finding with required fields.
Sourcepub fn with_severity_label(self, label: &str) -> Self
pub fn with_severity_label(self, label: &str) -> Self
Set the human-readable severity label.
Sourcepub fn with_message(self, msg: impl Into<String>) -> Self
pub fn with_message(self, msg: impl Into<String>) -> Self
Set the event message.
Sourcepub fn with_actor(self, actor: Actor) -> Self
pub fn with_actor(self, actor: Actor) -> Self
Set the actor.
Sourcepub fn with_resources(self, resources: Vec<ResourceDetail>) -> Self
pub fn with_resources(self, resources: Vec<ResourceDetail>) -> Self
Set resources.
Sourcepub fn with_observables(self, observables: Vec<Observable>) -> Self
pub fn with_observables(self, observables: Vec<Observable>) -> Self
Set observables.
Sourcepub fn with_evidence(self, evidence: Evidence) -> Self
pub fn with_evidence(self, evidence: Evidence) -> Self
Set evidence.
Sourcepub fn with_attacks(self, attacks: Vec<Attack>) -> Self
pub fn with_attacks(self, attacks: Vec<Attack>) -> Self
Set MITRE ATT&CK mappings.
Sourcepub fn with_unmapped(self, unmapped: Value) -> Self
pub fn with_unmapped(self, unmapped: Value) -> Self
Set unmapped vendor data.
Trait Implementations§
Source§impl Clone for DetectionFinding
impl Clone for DetectionFinding
Source§fn clone(&self) -> DetectionFinding
fn clone(&self) -> DetectionFinding
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more