Bump project + daemon version 0.1.0 -> 0.2.0. Correct meson `license` from the
stale `MIT` to `GPL-3.0-or-later` to match the GPLv3 LICENSE file and README.
First tagged release carrying Stage 6 fleet learning and Stage 3.5 provenance
work (3.5a fleet-train flags, 3.5b2 write->exec data-flow feature).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New meson option enable_endpoint_security (auto, macOS only) links
EndpointSecurity and bsm and builds three ES backends behind the
existing interfaces. Helpers are in src/platform/es_support.hpp.
- ProcessMonitor: NOTIFY_EXEC events (pid, parent, path, dev:ino,
argv, start time) plus NOTIFY_TRACE and NOTIFY_KEXTLOAD for the
behavior rules. Events go to a bounded queue (4096, overflow counted
in events_dropped) drained on the monitor thread, so callbacks stay
on one thread. Without an ES client the monitor polls libproc
(backend "libproc"). backend_name() reports "endpoint_security".
- ExecGuard: AUTH_EXEC with the fanotify guard's rules. It fails open
at min(timeout, ES deadline - 500 ms) and on a full queue, and on
macOS 27+ ES_DEADLINE_MISS_MODE_FAIL_OPEN makes the kernel allow a
missed deadline too. Platform binaries and SIP paths are never
denied, and our own execs are muted. ES does not cache verdicts, so
rule changes apply on the next exec. Our own cache keys on
dev:ino:size:mtime:generation. The image is opened by path and its
dev:ino checked against the event; a swapped file counts as
unscanned.
- FileWatcher: NOTIFY_CREATE/RENAME/CLOSE(modified) with inverted
target-path muting: named entries selected literally, whole
directories by prefix. macos_watch_specs() covers launchd
agents/daemons, periodic jobs, cron tabs, sudo drop-ins, shell rc
files, authorized_keys, Downloads and the temp directories.
match_watch_spec() (direct children, as with fanotify directory
marks) is portable and tested. Home dirs come from the directory
service (local_home_dirs).
Every ES handler is noexcept and records swallowed exceptions. Client
errors name the missing requirement (root, entitlement, Full Disk
Access), and the daemon keeps running detection-only.
macos_es_live (root, ES entitlement) checks deny/allow/cache/
platform-binary/fail-open/audit for the guard, exec telemetry and
the file watcher, using small signed payload binaries. It has not run
yet: the development Mac has SIP enabled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tree now compiles on macOS. Each Linux-only call gets a Darwin
branch, and the Linux branch stays as it was:
- io::fdatasync uses fcntl(F_FULLFSYNC): fsync alone only reaches the
drive cache on APFS, and the store's crash atomicity relies on it.
- Control socket: FD_CLOEXEC set after socket/accept/recvmsg (no
SOCK_CLOEXEC, accept4 or MSG_CMSG_CLOEXEC), SO_NOSIGPIPE, peer
credentials from LOCAL_PEERCRED + LOCAL_PEERPID, getgrouplist with
int groups and a growing buffer. launchd has no RuntimeDirectory, so
the socket directory is created (0750, access group) when missing.
Default socket path is /var/run/strawberry/control.sock.
- CRC32C detects ARMv8 CRC with hw.optional.armv8_crc32 (no auxv).
- stat mtime via st_mtimespec; the BPF shared header uses stdint
typedefs off Linux.
- Background threads join the PRIO_DARWIN_BG band (lower CPU and I/O);
crash safety zeroes RLIMIT_CORE in place of PR_SET_DUMPABLE.
- The desktop app drops Qt DBus off Linux and shows notifications as
tray messages (app/notifier_tray.cpp).
- make setup passes Homebrew's keg-only libarchive to meson.
Tests: behavior_live (Linux ptrace API) builds on Linux only, the
control-server fd count reads /dev/fd, the crash test checks the core
limit on macOS, and the runtime pipeline test no longer references a
YARA-only helper when YARA is absent (that also broke Linux builds
without libyara).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing shipped used the library after the event store landed. A small
reader/writer for its file format (src/store/legacy_kv) replaces it for
the legacy code, and the submodule, subproject and library test are
removed.
A writer open now imports a legacy database.db file into the event
store: indicators are replayed in an order consistent with the old
hash/rule indexes, the result is verified against the old file, the
old file is kept as database.db.migrated-<ts>, and an import
interrupted between its final renames is finished on the next open.
Read-only handles read a legacy file directly and switch to the store
once it is imported. Ids re-stored under another hash are reported
(their old index entries cannot be carried over).
Tests: legacy import properties I1-I6 (locked and corrupt files are
left untouched), the differential test now shares its comparisons, and
fuzz_legacy_kv covers the file parser. A copy of a real 137 KB legacy
database imported cleanly into 7 KB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wire the policy, feeds, containment, exec guard, behavior, governor,
crash safety and event store into the daemon, detection pipeline, CLI
and meson build (zstd now required); Dockerfile, conan, systemd unit
(LimitCORE=0, resource limits) and installer updates; existing tests
adapted (store paths are directories now). Detections are counted and
notified even when evidence cannot be persisted (persist_failures in
status). prevention_timeout_ms is clamped and behavior dedupe handles
out-of-order events. Docs: API contract, developer guide, plan, UX,
agent rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>