use std::sync::Arc;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Fact {
TriggeredRule(Arc<str>),
TaintFlow(TaintFlow),
FunctionCall(FunctionCall),
MemoryOperation(MemoryOperation),
OnnxModelOutput(Arc<str>),
BinaryInfo(BinaryInfo),
SecurityFlags(SecurityFlags),
SectionInfo(SectionInfo),
ImportInfo(ImportInfo),
SymQueryRequest(SymQueryRequest),
SymQueryResult(SymQueryResult),
Custom {
namespace: Arc<str>,
key: Arc<str>,
value: Arc<str>,
},
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct TaintFlow {
pub source: Arc<str>,
pub sink: Arc<str>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct FunctionCall {
pub name: Arc<str>,
pub arguments: Vec<Arc<str>>,
pub properties: Vec<Arc<str>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct MemoryOperation {
pub destination_address: u64,
pub is_write: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct BinaryInfo {
pub format: Arc<str>,
pub arch: Arc<str>,
pub entry_point: u64,
pub file_size: u64,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct SecurityFlags {
pub flag_name: Arc<str>,
pub flag_value: Arc<str>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct SectionInfo {
pub name: Arc<str>,
pub is_executable: bool,
pub is_writable: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct ImportInfo {
pub symbol: Arc<str>,
pub library: Option<Arc<str>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct SymQueryRequest {
pub query_id: String,
pub artifact_id: String,
pub addr: u64,
pub kind: String,
pub params: String,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct SymQueryResult {
pub query_id: String,
pub sat: bool,
pub summary: String,
pub witness: Option<String>,
}