Skip to main content

DetectionFinding

Struct DetectionFinding 

Source
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: u16

Always 2004.

§category_uid: u8

Always 2 (Findings).

§type_uid: u32

class_uid * 100 + activity_id.

§activity_id: u8

Activity ID (1=Create, 2=Update, 3=Close).

§activity_name: Option<String>

Human-readable activity name.

§time: i64

Event time as epoch milliseconds.

§severity_id: u8

Severity ID (0-6, 99).

§severity: Option<String>

Human-readable severity label.

§status_id: u8

Status ID (0=Unknown, 1=Success, 2=Failure).

§status: Option<String>

Human-readable status label.

§action_id: u8

Action ID (1=Allowed, 2=Denied).

§disposition_id: u8

Disposition ID (1=Allowed, 2=Blocked, 17=Logged).

§disposition: Option<String>

Human-readable disposition label.

§message: Option<String>

Human-readable event message.

§metadata: Metadata

Metadata (required).

§finding_info: FindingInfo

Finding 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

Source

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.

Source

pub fn with_severity_label(self, label: &str) -> Self

Set the human-readable severity label.

Source

pub fn with_message(self, msg: impl Into<String>) -> Self

Set the event message.

Source

pub fn with_actor(self, actor: Actor) -> Self

Set the actor.

Source

pub fn with_resources(self, resources: Vec<ResourceDetail>) -> Self

Set resources.

Source

pub fn with_observables(self, observables: Vec<Observable>) -> Self

Set observables.

Source

pub fn with_evidence(self, evidence: Evidence) -> Self

Set evidence.

Source

pub fn with_attacks(self, attacks: Vec<Attack>) -> Self

Set MITRE ATT&CK mappings.

Source

pub fn with_unmapped(self, unmapped: Value) -> Self

Set unmapped vendor data.

Trait Implementations§

Source§

impl Clone for DetectionFinding

Source§

fn clone(&self) -> DetectionFinding

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DetectionFinding

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for DetectionFinding

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for DetectionFinding

Source§

fn eq(&self, other: &DetectionFinding) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DetectionFinding

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for DetectionFinding

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,