strawberry/scripts/run_live_tests_docker.sh
trvon 1d1ab9f57e
Add exec prevention, behavior telemetry and persistence watch
fanotify exec-permission guard (audit/enforce, fail-open deadline),
eBPF behavior engine (IOC connections, ptrace, module loads,
download-then-execute) and fanotify persistence watch, with unit tests
and privileged Docker live tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:17:16 -06:00

21 lines
839 B
Bash
Executable file

#!/usr/bin/env bash
# Root-only Linux tests (fanotify exec prevention + quarantine, eBPF behavior
# events, persistence watcher, process memory scan, daemon response verbs) in a
# privileged container. tracefs/debugfs are mounted so tracepoints can attach.
set -euo pipefail
IMAGE_TAG="${IMAGE_TAG:-strawberry-linux-test}"
nice -n 19 docker build --cpu-quota=200000 --cpu-period=100000 --memory=4g --target test -t "${IMAGE_TAG}" .
nice -n 19 docker run --rm --privileged --cpus=2 --memory=4g \
-v /sys/kernel/tracing:/sys/kernel/tracing \
-v /sys/kernel/debug:/sys/kernel/debug \
"${IMAGE_TAG}" bash -c '
set -euo pipefail
./builddir/tests/exec_guard_live
./builddir/tests/behavior_live
./builddir/tests/file_watch_live
./builddir/tests/test_yara_scanner
./builddir/tests/test_daemon_runtime
echo "live tests: ALL PASSED"
'