Commit graph

4 commits

Author SHA1 Message Date
trvon
be237d6040
Findings: reconcile evidence and harden policy rebuilds
Preserve independent support, typed rule namespaces and stable process lifetimes. Share authoritative managed-set reconciliation across daemon and offline correlation, load offline policy without seeding/migration, and release resources after shutdown-flush exceptions. Keep retirement history, transaction ownership and fault/allocation regressions; no whole-set crash-atomicity or live acceptance claim.
2026-11-03 06:55:47 -07:00
trvon
6453d14589
Detection: IOC hash severity comes from per-feed trust, not a hardcoded critical
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 / macos (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
A benign system binary (/usr/bin/ss) whose SHA-256 was on a noisy community hash
feed produced thousands of critical "would have been blocked" findings: IOC hash
matches were hardcoded severity "critical" at every site, and in exec_guard an
ioc_match forces a prevention hit regardless of the severity threshold.

- FeedSpec gains `max_severity` (append-only; serialize/parse/validate, control
  socket `feed-add` accepts it). Empty = default for the kind: hash feeds are
  advisory "high", not "critical". PolicyStore::ioc_feed_severity() resolves it.
- All three IOC severity sites now use the feed's severity
  (detection_pipeline.cpp scan_image, assess_exec, handle_process), replacing the
  hardcoded "critical".
- Trust gating: ExecAssessment::ioc_match is set only when the matched feed
  resolves to "critical" (a curated feed that should force prevention). A
  community feed stays advisory — its "high" is subject to prevention_min_severity
  (default "critical"), so it no longer would-blocks system tools per exec.

Tests: test_ioc_hash_detection uses an explicit critical feed (trusted path) and
asserts assess_exec forces the hit; new test_ioc_community_feed_is_advisory
asserts a default feed is "high", ioc_match is not forced, and decide_exec allows
it in audit and enforce; test_policy covers max_severity validation, the advisory
default, and a critical round-trip. Suite 50/50; clang static analyzer and
clang-tidy clean on the changed TUs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-28 10:18:02 -06:00
trvon
8f6bd1d4e0
Privacy: attribute tracker contacts to programs via OpenSnitch events
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 / macos (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Second piece of tracker attribution (docs/tracker-attribution.md): which
programs reach domains on a trackers list. Advisory only: never a block,
never a finding (source invariant R11).

- OpenSnitch event listener: OpenSnitch's JSON "remote" logger is the
  hostname source (Strawberry's eBPF connects have none). It streams over
  TCP and cannot leave fields out, so events carry command lines and
  environments. The listener binds 127.0.0.1 at a port below 1024 (only
  root can), accepts only root-owned peers (/proc/net/tcp), bounds
  clients/object size/buffering, and reads only pid, uid, path,
  destination and action; arguments and environment are never copied.
- TrackerContacts: per program x domain, bounded at 20000 keys. A root-only
  tracker_contact telemetry record (type 25) on the first contact, then at
  most hourly with the count since.
- Status `privacy` block; control verb privacy-trackers; CLI
  `strawberry privacy trackers [--json]`.
- `strawberry opensnitch enable-events` adds the logger to OpenSnitch's
  config (with a .bak); the installer runs it when OpenSnitch is present,
  unless privacy_trackers=false. Config: privacy_trackers (default true),
  opensnitch_events (default 127.0.0.1:979).
- EasyPrivacy is a default trackers feed (GPL-3.0+ or CC-BY-SA-3.0,
  downloaded at run time).

Tests: E1-E7 (test_opensnitch_events: event fields, stream splitting,
peer uid, address rules, listener end to end, contacts and record, config
editor), the control verb, CLI translation and help, daemon status. New
fuzz_opensnitch_events (90 s clean).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 06:15:28 -06:00
trvon
fadc6363f9
Add policy, threat-intel feeds and OpenSnitch containment
PolicyStore (allowlist, protection settings, operator actions), the
rule/feed updater with HTTPS-only fetches and a systemd timer, IOC
hash/domain/network sets, OpenSnitch blocklist containment, the root
control socket (SCM_RIGHTS credentials, verb allowlist) and scanner
health snapshots.

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