You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Security
An MSSP parent could read another tenant's detection rule by linking it
into their own pack (GHSA-269m-hc43-wpqm, CWE-639, reported by @benchmeister). POST /mssp/rule-packs/{pack_id}/rules checked pack
ownership and then only that the supplied rule id existed — nothing tied
the rule to the caller — so a parent who learned a foreign rule's UUID
could link it, assign the pack to their own child, and read the rule back:
name, severity and category through the child's effective-rules preview,
and the full rule_body plus owner tenant_id through the child tenant's GET /rules. The write path now requires the linked rule to be the
caller's own or a platform built-in (refusing with the same 404 as a
missing id, so the route is no longer an existence oracle over rule
UUIDs); both read paths — the effective-rules resolver's pack branch and
the rule-library's pack-id expansion — apply the same containment
predicate, so a link row planted before the fix resolves to nothing; and
migration 184 deletes any such planted rows outright. Proven red-to-green
at every layer, including against a live Postgres with the shipped RLS.
Fixed
Every bare-aggregate natural-language query against the event lake failed.
The /nl-query/execute lake compiler appended ORDER BY event_time DESC to
any query without a GROUP BY — including a bare aggregate (count() with no
grouping, which the translator emits for "count events …" when the group-by
field does not resolve) and a DISTINCT projection. ClickHouse rejects that
with Code: 215 (Column 'event_time' is not under aggregate function and not in GROUP BY), so the query came back as lake query failed: clickhouse query failed: Code: 215. _order_clause guarded only the grouped case; it
now orders any aggregate or DISTINCT by its own output and reserves event_time DESC for the raw event-row projection.
GET /mssp/children returned 500 the moment a parent tenant had a child,
and five sibling MSSP list endpoints (/notes, /delegations, /metrics, /rule-packs, /overrides, and the rule-pack assign route) shared the fault.
The response models typed their timestamp fields (created_at, snapshot_at, updated_at) as str, but the endpoints return ORM rows whose columns are DateTime(timezone=True), so FastAPI's response validation rejected the datetime with string_type. It was latent because each endpoint returns [] until the first row exists — the first child onboarded onto a parent is
what surfaced it. The eight fields across ChildTenantOut, TenantNoteOut, DelegationOut, MetricsOut, RulePackOut, PackAssignmentOut and RuleOverrideOut are now datetime; pydantic serialises them to ISO-8601, so
the wire contract is unchanged.
A natural-language query with a severity level ignored it, or crashed. The
deterministic NL translator parsed no severity word at all, so "show critical
events" / "high severity events" returned every event in the window instead
of only the matching ones; the one phrasing that did parse, "severity is
critical", went through the generic field is value path and emitted the
string "critical" against event.severity, which the lake compiler maps to
the numeric severity_id column and rejected with severity_id needs a number. A severity level in context (critical events, high severity, severity is critical) now becomes event.severity == <id> with the OCSF id
(info=1 … critical=5), matched in both the agents translator and its vendored
copy under services/api. A level word with no severity or event context
(e.g. highest) is left alone.