Add baseline reconciliation: accept audited drift with a reason
Implements the v0.9 roadmap item from the approved design spec. Operators accept a specific FIM/package/listener/SUID drift item with a mandatory reason; the ack suppresses that one alert only while the live state still matches the recorded fingerprint. Content kinds (fim/pkgfile) re-alert on further change; identity kinds (listener/suid) retire on TTL or revoke. - reconcile.py: ReconcileStore (mtime-cached, fails closed on missing/corrupt store), fingerprint builders, and the filter_alerts chokepoint. - CLI: baseline accept/revoke/list with --reason/--expires/--force/--stale/--json. - Wired at the daemon sweep + eBPF chokepoint, fim-check, and /api/integrity. - RECONCILE_V1 schema, config knob, COMMAND_REFERENCE/SCHEMAS/OPERATIONS/ROADMAP docs, and reconcile unit/CLI/integration tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
3d2047fde2
commit
dbbe35b3fc
18 changed files with 1155 additions and 28 deletions
|
|
@ -59,6 +59,39 @@ helpers.
|
|||
|
||||
Do not run this to silence unexplained findings.
|
||||
|
||||
### `baseline accept` / `revoke` / `list`
|
||||
|
||||
```bash
|
||||
enodia-sentinel baseline accept <kind> <target> --reason "..." [--expires 7d] [--force]
|
||||
enodia-sentinel baseline revoke <kind> <target>
|
||||
enodia-sentinel baseline list [--stale] [--json]
|
||||
```
|
||||
|
||||
Baseline *reconciliation*: accept a specific, identified drift item with a
|
||||
mandatory reason instead of silently folding it into a baseline. `<kind>` is one
|
||||
of `fim`, `pkgfile`, `listener`, or `suid`; `<target>` is a path (FIM/package/
|
||||
SUID) or a `port/comm` key (listener).
|
||||
|
||||
An acknowledgement suppresses that one alert **only while the live state still
|
||||
matches the accepted fingerprint**. `fim` and `pkgfile` acks are content-bound:
|
||||
when the file changes again the ack goes *stale* and the alert returns. `listener`
|
||||
and `suid` acks are identity-bound, so only `--expires` (TTL) or an explicit
|
||||
`revoke` retires them. Each record stores who accepted it, when, why, and the
|
||||
fingerprint, in `log_dir/reconciliation.json` (override with `reconcile_store`).
|
||||
|
||||
- `accept` refuses to record drift it cannot observe live (e.g. a listener not
|
||||
currently bound); pass `--force` to accept anyway — required for accepting a
|
||||
*removed* file. Omitting `--reason` is a hard error.
|
||||
- `--expires` accepts `Nd` / `Nh` / `Nm` (days/hours/minutes).
|
||||
- `revoke` exits `1` if the target isn't present.
|
||||
- `list` shows every ack; `--stale` filters to stale/expired ones. It exits `1`
|
||||
whenever any acknowledgement is stale (a scriptable drift check) and re-derives
|
||||
FIM staleness against live files.
|
||||
|
||||
Reconciled drift is dropped at the daemon detection chokepoint, hidden from
|
||||
`fim-check`, and summarised in the dashboard integrity view, so an acknowledged
|
||||
item stops alerting everywhere until its fingerprint changes or its TTL lapses.
|
||||
|
||||
## Detection and Integrity Commands
|
||||
|
||||
### `list-detectors`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue