Problem/Motivation
MCP Sentinel already evaluates anomaly rules by operation, time window, threshold, and debounce interval. It also detects thresholded denied-access storms. The local rule set does not yet cover activity outside an approved operating-hours schedule or complete and near-complete bulk reads across a governed collection.
Without these signals, an operator can detect repeated denials but cannot consistently distinguish unusual access timing or broad data collection from normal governed activity.
Proposed resolution
Extend the existing anomaly engine with configurable off-hours and complete bulk-read signals. Reuse the current rule evaluation, threshold, window, debounce, audit, and notification seams rather than introducing a second anomaly subsystem.
Preserve existing denied-access storm behavior as regression coverage.
Acceptance criteria
- Administrators can define an operating-hours schedule and timezone for governed activity.
- Governed activity outside the configured schedule produces a stable off-hours anomaly signal.
- Complete or near-complete reads of a governed collection produce a stable bulk-read anomaly signal.
- Bulk-read detection covers every supported local governed read channel that can enumerate a collection.
- Threshold, time-window, and debounce behavior remains configurable and deterministic.
- Existing thresholded denied-access storm detection remains covered by regression tests.
- Audit evidence identifies the signal, governed actor context, target scope, rule version, window, threshold, and outcome without exposing credentials or sensitive payload content.
- Tests cover allowed-hours activity, off-hours activity, partial reads, complete reads, repeated and debounced detection, and disabled rules.
Scope boundary
This issue owns local off-hours and complete bulk-read signals. Hosted tenant/principal correlation and cross-system anomaly aggregation are separate work.
API changes
The existing anomaly rule contract gains the configuration needed for operating-hours and complete bulk-read signals.
Data model changes
Any rule-schema change must remain backward compatible with existing anomaly rules.
Comments
Comment #22
jmcerdaReleased in 2.13.0 (commit cdd53eb on 1.x). Marking Fixed.
A fired rule now writes a bounded anomaly_alert audit row, and the same fields travel on the webhook. Governed JSON:API GET/HEAD documents and GraphQL field resolutions emit one entity_read per distinct entity when Log reads is on, so bulk_read can see those channels. Hosted tenant correlation remains out of scope.
https://www.drupal.org/project/mcp_sentinel/releases/2.13.0