/tmp is tmpfs (RAM) on the dev host; a large GCC LTO relink writes its
ltrans files to $TMPDIR and, when that is /tmp, can exhaust memory and
freeze the machine (observed this session). Point the build's TMPDIR at a
disk-backed build/tmp, created as an order-only prerequisite of the
compiling targets (build, conan-build, fuzz). Override with BUILD_TMPDIR=.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- scripts/analyze_changed.sh + `make analyze`: clang-check --analyze over the
changed TUs via builddir/compile_commands.json (host build may be gcc; clang
tolerates those flags), nice -n 19, 2 at a time. Strict by default (any
analyzer diagnostic fails), ANALYZE_STRICT=0 reports only; ANALYZE_FILES/--all
override selection. Results in build/audit/out/analyze.log.
- AGENTS.md "Per-change checks": new analyzer row, positioned as path-sensitive
intra-TU analysis that complements fold's bounded symbolic cross-call pass and
the syntactic invariants (run all three); YAMS index-at-checkpoint reminder.
- CLAUDE.md: analyzer added to the checks pointer + a Performance & C++ bullet
(perf-kpi + Tracy/PerfStats).
- docs/prompts/PROMPT-strawberry-audit.md: "Clang static analyzer" subsection
under Symbolic SAST.
No C++ changed; unit suite 50/50 green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
scripts/install.sh hands off to scripts/macos_install.sh on Darwin (it
failed on getent/groupadd) and runs from the repo root. `make install`
runs it on either OS.
Signing: an ad hoc signature carrying the ES entitlement is killed at
launch while SIP is on, and the hardened runtime rejected the Homebrew
dylibs (different Team ID). Both entitlement files now disable library
validation; with SIP on and IDENTITY=- the installer signs with
strawberry-base.entitlements (libproc fallback), test-launches the
binary and re-signs without ES if it is killed. `make macos-sign`
refuses the combination that would be killed.
The installer no longer sets enable_bpf_monitoring=false, which turned
off all process monitoring; it sets db_path explicitly. The rule
updater runs as the new _strawberry user, which owns only feeds/, and
starts on update-requested via KeepAlive PathState (WatchPaths also
fired on removal). launchd jobs use `daemon run` / `rules fetch`.
Parity with Linux: completions, the installed-files manifest,
evidence permissions, group offer. Shared helpers in
scripts/install_common.sh. MCP registration moved to the README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
packaging/macos/ holds the ES entitlement and two LaunchDaemons: the
scanner (root, group strawberry, umask 027, XDG_DATA_HOME=/var/db so
evidence lands in /var/db/strawberry) and the rule updater (daily, and
on feeds/update-requested like strawberry-update.path).
scripts/macos_install.sh creates the group with dseditgroup, the
config (/run paths moved to /var/run), state directories, signs the
binary with the entitlement and bootstraps both jobs.
make macos-sign (IDENTITY=- ad hoc, or a Developer ID), make
macos-install, and make macos-live-tests (signs and runs
macos_es_live under sudo). An ad hoc signature carries the ES
entitlement only with SIP disabled; the install script says so.
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>
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>