ndaal-binsec 3.2.3

Binary (in)security scanner for ELF/PE/Mach-O with native, strictly-validated SARIF 2.1.0 and Markdown output (ndaal fork of binsec)
Documentation
pub mod elf;
pub mod mach;
pub mod pe;

use crate::BinResult;

// represents map used to store tabulated results
pub type GenericMap = std::collections::BTreeMap<String, serde_json::Value>;

/// Compilation properties we assess on every binary format we support.
pub trait UniversalCompilationProperties {
    fn binary_type(&self) -> &str;
    fn is_stripped(&self) -> bool;
    //fn is_cxx(&self) -> bool;
    fn compiler_runtime(&self, bytes: &[u8]) -> Option<String>;
}

/// Defines trait implemented by each supported libgoblin binary format
pub trait Analyze {
    fn compilation(&self, bytes: &[u8]) -> BinResult<GenericMap>;
    fn mitigations(&self) -> GenericMap;
    fn instrumentation(&self) -> GenericMap;
}