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>
41 lines
977 B
Meson
41 lines
977 B
Meson
option(
|
|
'enable_tests',
|
|
type: 'boolean',
|
|
value: true,
|
|
description: 'Build unit tests',
|
|
)
|
|
|
|
option(
|
|
'enable_app',
|
|
type: 'feature',
|
|
value: 'auto',
|
|
description: 'Build the Qt6 desktop app and tray indicator (strawberry-tray)',
|
|
)
|
|
|
|
option(
|
|
'enable_mcp',
|
|
type: 'feature',
|
|
value: 'auto',
|
|
description: 'Build the strawberry-mcp Model Context Protocol server (needs nlohmann_json)',
|
|
)
|
|
|
|
option(
|
|
'enable_profiling',
|
|
type: 'boolean',
|
|
value: false,
|
|
description: 'Build with Tracy zones/plots (STRAWBERRY_ZONE etc.); needs the tracy dependency or `meson wrap install tracy`',
|
|
)
|
|
|
|
option(
|
|
'enable_fuzzing',
|
|
type: 'boolean',
|
|
value: false,
|
|
description: 'Build libFuzzer targets in fuzz/ (clang only; adds ASan/UBSan + coverage to everything)',
|
|
)
|
|
|
|
option(
|
|
'enable_endpoint_security',
|
|
type: 'feature',
|
|
value: 'auto',
|
|
description: 'macOS: Endpoint Security backends (exec events, exec prevention, file watch); needs the ES entitlement at run time',
|
|
)
|