Some checks failed
Build and Test / build (debug, clang) (push) Has been cancelled
Build and Test / build (debug, gcc) (push) Has been cancelled
Build and Test / build (release, clang) (push) Has been cancelled
Build and Test / build (release, gcc) (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
strawberry [--config PATH] [--json] <command> [<subcommand>] [args] [--flags] status, doctor, doctor fix <action>, daemon run, findings list/show/ correlate, process search/trace/trace-node/suspend/resume/kill, scan file/processes/memory, rules reload/update/check/fetch, policy show/set, opensnitch enable-checksums, store verify/compact, replay, demo seed, help [command], version. One table in src/cli_commands.cpp defines each command (words, positionals, flags, help) and how it maps onto the existing flag form, which main() still parses; help is generated from the same table. Unknown options and wrong arity print the command's usage. Process actions validate node ids before building their JSON payload. The older flag form (strawberry --status, strawberry <config>) still works. The systemd units now run `strawberry daemon run --config ...` and `strawberry rules fetch --config ...`. README, AGENTS.md and the false-positive guide use the command form. doctor renders the daemon's checks with their fixes; doctor fix runs a maintenance action (with --dry-run). Against an older daemon the CLI says to reinstall rather than "unknown command". replay explains that telemetry is root-only instead of reporting zeros, and keeps config output out of --json. tests/test_cli.cpp: translations, flag-form passthrough, errors, help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.4 KiB
Desktop File
48 lines
1.4 KiB
Desktop File
[Unit]
|
|
Description=Strawberry YARA rule feed update
|
|
Documentation=https://github.com/trvon/strawberry
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/usr/local/bin/strawberry rules fetch --config /etc/strawberry/strawberry.conf
|
|
Environment=XDG_DATA_HOME=/var/lib
|
|
TimeoutStartSec=15min
|
|
# Retry later on failure (e.g. offline, GitHub rate limit); the previous rules stay active.
|
|
Restart=on-failure
|
|
RestartSec=1h
|
|
|
|
# Downloads untrusted content, so it runs with no capabilities, can only write
|
|
# the feeds directory, and never touches the scanner's evidence database.
|
|
# Group=strawberry lets it ask the daemon to reload rules over the control socket.
|
|
User=root
|
|
Group=strawberry
|
|
UMask=0027
|
|
CapabilityBoundingSet=
|
|
AmbientCapabilities=
|
|
NoNewPrivileges=true
|
|
StateDirectory=strawberry/feeds
|
|
StateDirectoryMode=0750
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
PrivateTmp=true
|
|
PrivateDevices=true
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectKernelLogs=true
|
|
ProtectControlGroups=true
|
|
ProtectClock=true
|
|
ProtectHostname=true
|
|
ProtectProc=invisible
|
|
ProcSubset=pid
|
|
RestrictNamespaces=true
|
|
RestrictRealtime=true
|
|
RestrictSUIDSGID=true
|
|
LockPersonality=true
|
|
MemoryDenyWriteExecute=true
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
SystemCallArchitectures=native
|
|
SystemCallFilter=@system-service
|
|
SystemCallFilter=~@privileged @resources
|
|
SystemCallErrorNumber=EPERM
|