Skip to main content

AnomalyKind

Enum AnomalyKind 

Source
#[non_exhaustive]
pub enum AnomalyKind {
Show 23 variants ObjectChecksumMismatch { block: u64, stored: u64, computed: u64, }, OmapInconsistent { oid: u64, xid: u64, }, OmapOrphanMapping { oid: u64, }, CheckpointRingMalformed { detail: &'static str, }, CheckpointSupersededState { xid: u64, }, SnapshotXidDisorder { xid: u64, }, SnapshotMissingMetadata { name: String, }, SnapshotDivergence { inode: u64, }, SealedVolumeHashMismatch { inode: u64, }, SealedVolumeBroken { broken_xid: u64, }, DeletedInodeRecoverable { oid: u64, }, DeletedExtentCarveCandidate { block: u64, }, ReaperPendingObject { oid: u64, }, CloneSharedExtent { inode_a: u64, inode_b: u64, }, CloneFlagWithoutSharing { inode: u64, }, EncryptionLocked, EncryptionState { detail: String, }, EncryptionKeybagAnomaly { raw_tag: u8, offset: u64, }, TimestampZeroed { inode: u64, }, TimestampOrder { inode: u64, }, XidReuse { oid: u64, xid: u64, }, OrphanInode { oid: u64, }, VolumeRoleMismatch { detail: String, },
}
Expand description

The APFS-specific anomalies this analyzer can surface. Each variant maps to a published, scheme-prefixed SCREAMING-KEBAB code (never changed once shipped; new variants get new codes).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ObjectChecksumMismatch

APFS-OBJECT-CKSUM-MISMATCH — Fletcher-64 over an object body ≠ stored o_cksum. Carries the block, stored, and computed values.

Fields

§block: u64
§stored: u64
§computed: u64
§

OmapInconsistent

APFS-OMAP-INCONSISTENT — omap maps a virtual oid to a paddr whose object oid/xid/type disagrees.

Fields

§oid: u64
§xid: u64
§

OmapOrphanMapping

APFS-OMAP-ORPHAN-MAPPING (Info) — omap entry for a block not referable from any live tree (FP-prone without a full reachability model).

Fields

§oid: u64
§

CheckpointRingMalformed

APFS-CHECKPOINT-RING-MALFORMED — structurally invalid checkpoint ring (no cksum-valid NXSB, bad magic, wrap/index inconsistency).

Fields

§detail: &'static str
§

CheckpointSupersededState

APFS-CHECKPOINT-SUPERSEDED-STATE (Info) — recoverable prior state in a non-latest checkpoint (normal copy-on-write residue).

Fields

§xid: u64
§

SnapshotXidDisorder

APFS-SNAPSHOT-XID-DISORDER (Info) — snapshot xids inconsistent with create_time ordering.

Fields

§xid: u64
§

SnapshotMissingMetadata

APFS-SNAPSHOT-MISSING-METADATA — snap-name without snap-metadata (or vice-versa).

Fields

§name: String
§

SnapshotDivergence

APFS-SNAPSHOT-DIVERGENCE (Info) — a snapshot’s inode view differs from the live volume.

Fields

§inode: u64
§

SealedVolumeHashMismatch

APFS-SEALED-VOLUME-HASH-MISMATCH — sealed-volume file-info hash ≠ recomputed content hash (a hash-metadata mismatch, not a trust verdict).

Fields

§inode: u64
§

SealedVolumeBroken

APFS-SEALED-VOLUME-BROKENintegrity_meta_phys.im_broken_xid set.

Fields

§broken_xid: u64
§

DeletedInodeRecoverable

APFS-DELETED-INODE-RECOVERABLE — superseded inode/dir record still in an older checkpoint / unreaped block.

Fields

§oid: u64
§

DeletedExtentCarveCandidate

APFS-DELETED-EXTENT-CARVE-CANDIDATE (Low) — extent blocks marked free (carve candidate, NOT a recoverability guarantee).

Fields

§block: u64
§

ReaperPendingObject

APFS-REAPER-PENDING-OBJECT (Low) — object queued in the reaper.

Fields

§oid: u64
§

CloneSharedExtent

APFS-CLONE-SHARED-EXTENT (Info) — inode shares physical extents (clonefile/dedup provenance link).

Fields

§inode_a: u64
§inode_b: u64
§

CloneFlagWithoutSharing

APFS-CLONE-FLAG-WITHOUT-SHARING (Low) — INODE_WAS_CLONED set but no shared extent found.

Fields

§inode: u64
§

EncryptionLocked

APFS-ENCRYPTION-LOCKED (Info) — volume encrypted, no key available.

§

EncryptionState

APFS-ENCRYPTION-STATE (Info) — observed keybag/crypto-state fields (raw).

Fields

§detail: String
§

EncryptionKeybagAnomaly

APFS-ENCRYPTION-KEYBAG-ANOMALY — malformed/unexpected keybag entry; carries the raw tag value + offset.

Fields

§raw_tag: u8
§offset: u64
§

TimestampZeroed

APFS-TIMESTAMP-ZEROED (Info) — one timestamp 0 while siblings are set.

Fields

§inode: u64
§

TimestampOrder

APFS-TIMESTAMP-ORDER (Info) — change_time < create_time, etc. (FP-prone).

Fields

§inode: u64
§

XidReuse

APFS-XID-REUSE — two live objects claim the same (oid, xid).

Fields

§oid: u64
§xid: u64
§

OrphanInode

APFS-ORPHAN-INODE (Low) — inode with no referencing DIR_REC.

Fields

§oid: u64
§

VolumeRoleMismatch

APFS-VOLUME-ROLE-MISMATCH (Info) — volume role flag inconsistent with content.

Fields

§detail: String

Implementations§

Source§

impl AnomalyKind

Source

pub fn code(&self) -> &'static str

The published anomaly code.

Trait Implementations§

Source§

impl Clone for AnomalyKind

Source§

fn clone(&self) -> AnomalyKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for AnomalyKind

Source§

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

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

impl Observation for AnomalyKind

Source§

fn severity(&self) -> Option<Severity>

Severity, or None if the analyzer deliberately does not grade this kind.
Source§

fn code(&self) -> &'static str

Stable, scheme-prefixed machine code.
Source§

fn note(&self) -> String

Human-readable, consistent-with note.
Source§

fn category(&self) -> Category

Analytical lens; defaults to Category::from_code of Observation::code. Override when a code’s keyword classification is wrong.
Source§

fn subjects(&self) -> Vec<SubjectRef>

Non-disk subjects this kind is about (default: none).
Source§

fn evidence(&self) -> Vec<Evidence>

Backing evidence rows (default: none).
Source§

fn mitre(&self) -> &'static [&'static str]

MITRE ATT&CK technique ids this kind is consistent with (default: none).
Source§

fn confidence(&self) -> Option<Confidence>

Heuristic confidence, if inferential (default: none).
Source§

fn to_finding(&self, source: Source) -> Finding

Assemble the canonical Finding from this kind and its producing source.

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> 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.