pub enum Observation {
Show 14 variants
ApiCall {
api: String,
args: Vec<Value>,
result: Value,
},
PropertyRead {
object: String,
property: String,
value: Value,
},
PropertyWrite {
object: String,
property: String,
value: Value,
},
DomMutation {
kind: DomMutationKind,
target: String,
detail: String,
},
NetworkRequest {
url: String,
method: String,
headers: Vec<(String, String)>,
body: Option<String>,
},
TimerSet {
id: u32,
delay_ms: u32,
is_interval: bool,
callback_preview: String,
},
DynamicCodeExec {
source: DynamicCodeSource,
code_preview: String,
},
CookieAccess {
operation: CookieOp,
name: String,
value: Option<String>,
},
CssExfiltration {
selector: String,
url: String,
trigger: String,
},
WasmInstantiation {
module_size: usize,
import_names: Vec<String>,
export_names: Vec<String>,
},
FingerprintAccess {
api: String,
detail: String,
},
ContextMessage {
from_context: String,
to_context: String,
payload: Value,
},
Error {
message: String,
script_index: Option<usize>,
},
ResourceLimit {
kind: ResourceLimitKind,
detail: String,
},
}Expand description
A single observable action performed by JavaScript during execution.
Observations are the OUTPUT of detonation. They describe what the code DID, not what it IS. Every observation includes enough context to reconstruct the action without access to the original script.
Consumers (Sear, Soleno) receive a Vec<Observation> in execution order.
The observation stream is the single source of truth for behavioral analysis.
Variants§
ApiCall
A bridged API function was called.
PropertyRead
A bridged object property was read.
PropertyWrite
A bridged object property was written.
DomMutation
DOM was mutated (element created, attribute set, innerHTML written, etc.).
NetworkRequest
An outbound network request was attempted.
TimerSet
A timer was registered.
DynamicCodeExec
Dynamic code execution: eval(), Function(), setTimeout(string), etc.
CookieAccess
Cookie was read or written.
CssExfiltration
A CSS rule matched that would trigger an external URL load.
WasmInstantiation
JavaScript attempted to instantiate a WebAssembly module.
FingerprintAccess
A fingerprinting API was accessed.
ContextMessage
Message sent between execution contexts.
Error
Script execution produced an error.
ResourceLimit
Execution hit a resource limit.
Trait Implementations§
Source§impl Clone for Observation
impl Clone for Observation
Source§fn clone(&self) -> Observation
fn clone(&self) -> Observation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Observation
impl Debug for Observation
Source§impl<'de> Deserialize<'de> for Observation
impl<'de> Deserialize<'de> for Observation
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>,
Auto Trait Implementations§
impl Freeze for Observation
impl RefUnwindSafe for Observation
impl Send for Observation
impl Sync for Observation
impl Unpin for Observation
impl UnsafeUnpin for Observation
impl UnwindSafe for Observation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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