pub struct ForensicCatalog { /* private fields */ }Expand description
A queryable collection of ArtifactDescriptors with built-in decode logic.
Implementations§
Source§impl ForensicCatalog
impl ForensicCatalog
Sourcepub const fn new(entries: &'static [ArtifactDescriptor]) -> ForensicCatalog
pub const fn new(entries: &'static [ArtifactDescriptor]) -> ForensicCatalog
Create a new catalog from a static slice of descriptors.
Sourcepub fn list(&self) -> &[ArtifactDescriptor]
pub fn list(&self) -> &[ArtifactDescriptor]
Return all descriptors in the catalog.
Sourcepub fn by_id(&self, id: &str) -> Option<&ArtifactDescriptor>
pub fn by_id(&self, id: &str) -> Option<&ArtifactDescriptor>
Look up a descriptor by its id field.
Sourcepub fn filter(&self, query: &ArtifactQuery) -> Vec<&ArtifactDescriptor>
pub fn filter(&self, query: &ArtifactQuery) -> Vec<&ArtifactDescriptor>
Return all descriptors matching the given query. Every Some field in
the query must match; None fields are wildcards.
Sourcepub fn by_mitre(&self, technique: &str) -> Vec<&ArtifactDescriptor>
pub fn by_mitre(&self, technique: &str) -> Vec<&ArtifactDescriptor>
Return all descriptors associated with the given MITRE ATT&CK technique ID.
Sourcepub fn for_triage(&self) -> Vec<&ArtifactDescriptor>
pub fn for_triage(&self) -> Vec<&ArtifactDescriptor>
Return all descriptors sorted by triage priority descending (Critical first). Within the same priority, original catalog order is preserved.
Sourcepub fn unassessed(&self) -> Vec<&ArtifactDescriptor>
pub fn unassessed(&self) -> Vec<&ArtifactDescriptor>
Return all descriptors that have not yet received an evidence/volatility assessment, sorted by triage priority descending.
Use this to drive demand-prioritised assessment sweeps: unassessed().first()
is always the highest-impact unassessed artifact.
Sourcepub fn assessment_coverage(&self) -> (usize, usize)
pub fn assessment_coverage(&self) -> (usize, usize)
Return (assessed_count, total_count) for coverage reporting.
Sourcepub fn filter_by_keyword(&self, keyword: &str) -> Vec<&ArtifactDescriptor>
pub fn filter_by_keyword(&self, keyword: &str) -> Vec<&ArtifactDescriptor>
Return all descriptors whose meaning or name contains keyword
(case-insensitive).
Source§impl ForensicCatalog
impl ForensicCatalog
Sourcepub fn parsing_profile(
&self,
id: &str,
) -> Option<&'static ArtifactParsingProfile>
pub fn parsing_profile( &self, id: &str, ) -> Option<&'static ArtifactParsingProfile>
Look up parsing guidance for an artifact id.
Sourcepub fn container_profile(&self, id: &str) -> Option<&'static ContainerProfile>
pub fn container_profile(&self, id: &str) -> Option<&'static ContainerProfile>
Look up the container parsing layer for an artifact id.
Sourcepub fn container_signature(
&self,
id: &str,
) -> Option<&'static ContainerSignature>
pub fn container_signature( &self, id: &str, ) -> Option<&'static ContainerSignature>
Look up carving/recognition guidance for an artifact’s outer container.
Sourcepub fn record_signatures(&self, id: &str) -> Vec<&'static RecordSignature>
pub fn record_signatures(&self, id: &str) -> Vec<&'static RecordSignature>
Look up carving/recognition guidance for records associated with an artifact.
Sourcepub fn decode(
&self,
descriptor: &ArtifactDescriptor,
name: &str,
raw: &[u8],
) -> Result<ArtifactRecord, DecodeError>
pub fn decode( &self, descriptor: &ArtifactDescriptor, name: &str, raw: &[u8], ) -> Result<ArtifactRecord, DecodeError>
Decode raw data using the descriptor’s embedded decoder.
§Parameters
descriptor– the catalog entry describing the artifactname– the registry value name (or filename), used by ROT13 and PipeDelimited decodersraw– the raw byte payload of the registry value or file content