Skip to content

FIFO sensor follow-ups (deferred from #123) #124

Description

@LiorFink00

Deferred items from the FIFO bait sensor work (#123 / #100):

  • eslogger sensor (optional macOS upgrade). Adds coverage for the blind spots accepted in FIFO named-pipe bait sensor (replaces fs_usage) #123 — a statSync().isFile()-guarding worm, mmap-based readers, and scan-only discovery of non-canonical paths — plus race-free process/user attribution. macOS 13+, root, multi-client (no kdebug); JSON parsed dependency-free via plutil. Open question: TCC/Full Disk Access in the launchd/MDM deploy path. See the "Deferred" section of FIFO (named-pipe) bait as the v1 read sensor (replaces fs_usage); eslogger deferred #100.
  • Test robustness. tests/test_agent_fifo.py uses a fixed time.sleep(0.5) before reading a FIFO to let serve_fifo reach its blocking open(). Replace with a condition poll to avoid flakiness on loaded CI.

Context: #100 (design), #123 (implementation).


Validated attribution layers (2026-06-26) — build items

Empirically validated on macOS 26.5.1 (see #100 "Update"). Build the layered read sensor:

  • atime regular-file primary sensor. (PR Re-armable atime sensor + --sensor selector (#28, #100) #160) Plant a normal regular-file bait (satisfies "normal file"; covers the FIFO blind spots — statSync-guard, mmap, scan-only). Re-armable atime tripwire as the primary detector. Fix + elevate Agent atime fallback sensor is broken #28 (atime is now primary, not last-resort). Acceptance: a read of the regular-file bait fires the callback on macOS + Linux, re-arms, no pid needed.
  • Deterministic FIFO pid attribution (validated 8/8). In the FIFO serve loop, when open(O_WRONLY|O_NONBLOCK) succeeds (reader parked), attribute via an inode/realpath scan of full lsof — NOT lsof -t <path> (it misses FIFOs) — excluding self, before writing content; resolve pid→name while the reader is still parked.
  • Churn-ledger best-effort shortlistDROPPED (PR Churn-ledger suspect shortlist for atime trips (#124) #161 closed). Not definitive: a ~9-candidate shortlist, not a single pid. Product decision: definitive mechanisms only.
  • Bait constellation correlationDROPPED. Built on the (now-dropped) best-effort shortlist; only narrows probabilistically, never definitive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions