Privacy hardening, remote-peer IP masking and review fixes

- Add privacy projection (core/privacy.py), private report storage, bounded
  process capture; omit identities, free text and unapproved paths
- Mask remote peer IPs: only loopback/host/wildcard stay numeric, others are
  reduced to remote_scope private/public (schema + scoring updated)
- Map ss TCP states to canonical names; ASCII-only numeric fields; fix
  "Microsoft Visual C++" product matching (Python and PowerShell)
- Merge 7fed3b9: -Diagnostic switch, serialization exit code 3, PS7 module
  path, UI error detail; keep hardened task/certificate collectors
- Add audit docs, privacy docs and regression tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 18:50:24 -08:00
parent 7fed3b9ab9
commit 610a3bb447
51 changed files with 2719 additions and 604 deletions

View File

@@ -1,3 +1,7 @@
# Current security behavior
The privacy hardening in [PRIVACY_HARDENING.md](PRIVACY_HARDENING.md) supersedes the earlier collector/export descriptions below. Default collection omits accounts, task commands and triggers, certificate enumeration, SMB open-file activity and cron commands. Imports, UI, analysis and reports use `core/privacy.py`; exports use `core/storage.py`. Reports no longer preserve raw inventory or create raw sidecars. `core/process.py` uses bounded memory instead of temporary stdout files. Pin changes do not replace native Windows/supply-chain validation. Earlier architecture notes follow as implementation history.
# Developer guide
Use Python 3.11+ and requirements.txt. Run `python -m samsara.main` from the repository root. The desktop requires a Qt-capable graphical session; tests run offscreen.