EventLens: publish v1.1.0 application and standalone Compose
Includes campaign summaries, expanded Windows event correlation, worker-based redaction, updated demo assets and a local-only Compose example. Publish curated EventLens source from 6a2ca12f81a2dcf816c61a86bd8811fcc95e8d8d
This commit is contained in:
1 parent
c0ade21029
commit
4e282639a4
63 files changed
+7381
-1420
No files matched your search
+387
-56
@@ -3,13 +3,14 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from datetime import UTC, datetime, timedelta
|
||||
|
||||
from .models import Category, IncidentCluster, NormalizedEvent
|
||||
from .models import Campaign, Category, IncidentCluster, NormalizedEvent, Severity
|
||||
from .normalize import (
|
||||
is_application_error,
|
||||
is_dns_client,
|
||||
is_event_log,
|
||||
is_kernel_general,
|
||||
is_kernel_power,
|
||||
is_log_cleared,
|
||||
is_security_audit,
|
||||
is_service_control_manager,
|
||||
is_windows_error_reporting,
|
||||
@@ -17,18 +18,28 @@ from .normalize import (
|
||||
|
||||
TitleBuilder = Callable[[list[NormalizedEvent]], str]
|
||||
ReasonBuilder = Callable[[list[NormalizedEvent]], str]
|
||||
GroupFilter = Callable[[list[NormalizedEvent]], bool]
|
||||
Group = tuple[str | None, list[NormalizedEvent]]
|
||||
|
||||
MAX_TITLE_CHARS = 256
|
||||
FALLBACK_RULE_ID = "windows.generic.attention"
|
||||
FALLBACK_WINDOW_SECONDS = 300
|
||||
SPRAY_MIN_DISTINCT_ACCOUNTS = 3
|
||||
SEVERITY_RANK: dict[str, int] = {"info": 0, "warning": 1, "error": 2, "critical": 3}
|
||||
LEVEL_SEVERITY: dict[str, Severity] = {"critical": "critical", "error": "error", "warning": "warning"}
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Rule:
|
||||
id: str
|
||||
category: Category
|
||||
severity: str
|
||||
severity: Severity
|
||||
window_seconds: int
|
||||
predicate: Callable[[NormalizedEvent], bool]
|
||||
key: Callable[[NormalizedEvent], str | None]
|
||||
title_for: TitleBuilder
|
||||
reason_for: ReasonBuilder
|
||||
accept: GroupFilter | None = None
|
||||
|
||||
|
||||
def _field(event: NormalizedEvent, *names: str) -> str:
|
||||
@@ -66,16 +77,36 @@ def _service(event: NormalizedEvent) -> str | None:
|
||||
return _dimension(_field(event, "service", "EventData.param1", "UserData.param1"))
|
||||
|
||||
|
||||
def _new_service(event: NormalizedEvent) -> str | None:
|
||||
return _dimension(_field(event, "EventData.ServiceName", "service"))
|
||||
|
||||
|
||||
def _account(event: NormalizedEvent) -> str | None:
|
||||
return _dimension(_field(event, "EventData.TargetUserName", "TargetUserName"))
|
||||
|
||||
|
||||
def _source_ip(event: NormalizedEvent) -> str | None:
|
||||
return _dimension(_field(event, "EventData.IpAddress", "IpAddress"))
|
||||
|
||||
|
||||
def _group_key(*dimensions: str | None) -> str | None:
|
||||
if any(value is None for value in dimensions):
|
||||
return None
|
||||
return "|".join(value.casefold() for value in dimensions if value is not None)
|
||||
|
||||
|
||||
def _bounded_title(value: str, fallback: str) -> str:
|
||||
text = " ".join(value.split()) or fallback
|
||||
return text if len(text) <= MAX_TITLE_CHARS else f"{text[: MAX_TITLE_CHARS - 1]}…"
|
||||
|
||||
|
||||
def _distinct_accounts(evidence: list[NormalizedEvent]) -> int:
|
||||
return len({account.casefold() for event in evidence if (account := _account(event))})
|
||||
|
||||
|
||||
# --- predicates -------------------------------------------------------------
|
||||
|
||||
|
||||
def _crash(event: NormalizedEvent) -> bool:
|
||||
return is_application_error(event.provider, event.channel, event.event_id) or is_windows_error_reporting(
|
||||
event.provider, event.channel, event.event_id
|
||||
@@ -86,6 +117,10 @@ def _service_failure(event: NormalizedEvent) -> bool:
|
||||
return is_service_control_manager(event.provider, event.channel) and event.event_id in {7023, 7024, 7031, 7034}
|
||||
|
||||
|
||||
def _service_installed(event: NormalizedEvent) -> bool:
|
||||
return is_service_control_manager(event.provider, event.channel) and event.event_id == 7045
|
||||
|
||||
|
||||
def _dns_timeout(event: NormalizedEvent) -> bool:
|
||||
return is_dns_client(event.provider, event.channel) and event.event_id == 1014
|
||||
|
||||
@@ -94,6 +129,18 @@ def _failed_logon(event: NormalizedEvent) -> bool:
|
||||
return is_security_audit(event.provider, event.channel) and event.event_id == 4625
|
||||
|
||||
|
||||
def _account_lockout(event: NormalizedEvent) -> bool:
|
||||
return is_security_audit(event.provider, event.channel) and event.event_id == 4740
|
||||
|
||||
|
||||
def _account_change(event: NormalizedEvent) -> bool:
|
||||
return is_security_audit(event.provider, event.channel) and event.event_id in {4720, 4728, 4732, 4756}
|
||||
|
||||
|
||||
def _log_cleared(event: NormalizedEvent) -> bool:
|
||||
return is_log_cleared(event.provider, event.channel, event.event_id)
|
||||
|
||||
|
||||
def _normal_startup(event: NormalizedEvent) -> bool:
|
||||
return (is_kernel_general(event.provider, event.channel) and event.event_id == 12) or (
|
||||
is_event_log(event.provider, event.channel) and event.event_id == 6005
|
||||
@@ -112,6 +159,9 @@ def _unexpected_shutdown(event: NormalizedEvent) -> bool:
|
||||
)
|
||||
|
||||
|
||||
# --- titles and reasons -----------------------------------------------------
|
||||
|
||||
|
||||
def _crash_title(evidence: list[NormalizedEvent]) -> str:
|
||||
ids = {event.event_id for event in evidence}
|
||||
if {1000, 1001}.issubset(ids):
|
||||
@@ -139,6 +189,20 @@ def _service_reason(evidence: list[NormalizedEvent]) -> str:
|
||||
return "Service Control Manager reported an abnormal service termination for the same known service and host."
|
||||
|
||||
|
||||
def _service_installed_key(event: NormalizedEvent) -> str | None:
|
||||
return _group_key(_host(event), _new_service(event))
|
||||
|
||||
|
||||
def _service_installed_title(evidence: list[NormalizedEvent]) -> str:
|
||||
return "New service installed" if len(evidence) == 1 else "New service installation activity"
|
||||
|
||||
|
||||
def _service_installed_reason(evidence: list[NormalizedEvent]) -> str:
|
||||
if _service_installed_key(evidence[0]) is None:
|
||||
return "Service Control Manager recorded a service installation (7045); no service/host grouping was applied because a grouping dimension was unavailable."
|
||||
return "Service Control Manager recorded installation of the same known service on the same host (7045); installation alone is not evidence of malice."
|
||||
|
||||
|
||||
def _dns_title(evidence: list[NormalizedEvent]) -> str:
|
||||
return "DNS timeout activity" if len(evidence) > 1 else "DNS timeout recorded"
|
||||
|
||||
@@ -163,6 +227,53 @@ def _auth_reason(evidence: list[NormalizedEvent]) -> str:
|
||||
return "Security Auditing reported failed sign-ins for the same known account and host; this is evidence of activity, not proof of cause."
|
||||
|
||||
|
||||
def _spray_title(evidence: list[NormalizedEvent]) -> str:
|
||||
return "Failed sign-ins across multiple accounts from one source"
|
||||
|
||||
|
||||
def _spray_reason(evidence: list[NormalizedEvent]) -> str:
|
||||
return (
|
||||
f"Security Auditing reported failed sign-ins (4625) for {_distinct_accounts(evidence)} distinct accounts "
|
||||
"from the same known source address on the same host; this pattern is consistent with, but does not prove, password spraying."
|
||||
)
|
||||
|
||||
|
||||
def _lockout_title(evidence: list[NormalizedEvent]) -> str:
|
||||
return "Account lockout" if len(evidence) == 1 else "Repeated account lockouts"
|
||||
|
||||
|
||||
def _lockout_reason(evidence: list[NormalizedEvent]) -> str:
|
||||
if _group_key(_host(evidence[0]), _account(evidence[0])) is None:
|
||||
return "Security Auditing recorded an account lockout (4740); no account/host grouping was applied because a grouping dimension was unavailable."
|
||||
return "Security Auditing recorded lockouts (4740) for the same known account on the same host."
|
||||
|
||||
|
||||
def _account_change_title(evidence: list[NormalizedEvent]) -> str:
|
||||
ids = {event.event_id for event in evidence}
|
||||
if 4720 in ids and ids & {4728, 4732, 4756}:
|
||||
return "Account created and added to a security group"
|
||||
if 4720 in ids:
|
||||
return "User account created"
|
||||
return "Security group membership changed"
|
||||
|
||||
|
||||
def _account_change_reason(evidence: list[NormalizedEvent]) -> str:
|
||||
if _host(evidence[0]) is None:
|
||||
return "Security Auditing recorded an account or security-group change; no host grouping was applied because the computer identity was unavailable."
|
||||
return "Security Auditing recorded account creation or security-group membership changes (4720/4728/4732/4756) on the same known host in one bounded window."
|
||||
|
||||
|
||||
def _log_cleared_title(evidence: list[NormalizedEvent]) -> str:
|
||||
return "Event log cleared" if len(evidence) == 1 else "Event logs cleared"
|
||||
|
||||
|
||||
def _log_cleared_reason(evidence: list[NormalizedEvent]) -> str:
|
||||
return (
|
||||
"EventLog recorded that an event log was cleared (Security 1102 / System 104); records from before this point "
|
||||
"may be missing. The record identifies the clearing account only as far as its own fields state."
|
||||
)
|
||||
|
||||
|
||||
def _startup_title(evidence: list[NormalizedEvent]) -> str:
|
||||
return "Normal startup sequence" if len(evidence) > 1 else "Normal startup evidence"
|
||||
|
||||
@@ -188,6 +299,16 @@ def _unexpected_reason(evidence: list[NormalizedEvent]) -> str:
|
||||
|
||||
|
||||
RULES = (
|
||||
Rule(
|
||||
"windows.audit.log-cleared",
|
||||
"security",
|
||||
"critical",
|
||||
300,
|
||||
_log_cleared,
|
||||
lambda event: _group_key(_host(event)),
|
||||
_log_cleared_title,
|
||||
_log_cleared_reason,
|
||||
),
|
||||
Rule(
|
||||
"windows.crash.application-report",
|
||||
"crash",
|
||||
@@ -208,6 +329,16 @@ RULES = (
|
||||
_service_title,
|
||||
_service_reason,
|
||||
),
|
||||
Rule(
|
||||
"windows.service.installed",
|
||||
"service",
|
||||
"warning",
|
||||
300,
|
||||
_service_installed,
|
||||
_service_installed_key,
|
||||
_service_installed_title,
|
||||
_service_installed_reason,
|
||||
),
|
||||
Rule(
|
||||
"windows.network.dns-timeout",
|
||||
"network",
|
||||
@@ -228,6 +359,37 @@ RULES = (
|
||||
_auth_title,
|
||||
_auth_reason,
|
||||
),
|
||||
Rule(
|
||||
"windows.auth.password-spray",
|
||||
"authentication",
|
||||
"warning",
|
||||
300,
|
||||
_failed_logon,
|
||||
lambda event: _group_key(_host(event), _source_ip(event)),
|
||||
_spray_title,
|
||||
_spray_reason,
|
||||
accept=lambda evidence: _distinct_accounts(evidence) >= SPRAY_MIN_DISTINCT_ACCOUNTS,
|
||||
),
|
||||
Rule(
|
||||
"windows.auth.account-lockout",
|
||||
"authentication",
|
||||
"warning",
|
||||
300,
|
||||
_account_lockout,
|
||||
lambda event: _group_key(_host(event), _account(event)),
|
||||
_lockout_title,
|
||||
_lockout_reason,
|
||||
),
|
||||
Rule(
|
||||
"windows.account.change",
|
||||
"security",
|
||||
"warning",
|
||||
300,
|
||||
_account_change,
|
||||
lambda event: _group_key(_host(event)),
|
||||
_account_change_title,
|
||||
_account_change_reason,
|
||||
),
|
||||
Rule(
|
||||
"windows.system.startup",
|
||||
"system",
|
||||
@@ -261,6 +423,9 @@ RULES = (
|
||||
)
|
||||
|
||||
|
||||
# --- grouping ---------------------------------------------------------------
|
||||
|
||||
|
||||
def _event_sort_key(event: NormalizedEvent) -> tuple[bool, datetime, str]:
|
||||
reliable_timestamp = event.timestamp is not None and event.timestamp_valid
|
||||
return (
|
||||
@@ -270,19 +435,56 @@ def _event_sort_key(event: NormalizedEvent) -> tuple[bool, datetime, str]:
|
||||
)
|
||||
|
||||
|
||||
def _groups_for_rule(events: list[NormalizedEvent], rule: Rule) -> list[list[NormalizedEvent]]:
|
||||
buckets: dict[str, list[NormalizedEvent]] = {}
|
||||
isolated_number = 0
|
||||
Signature = tuple[str, str, int | None]
|
||||
|
||||
|
||||
def _signature(event: NormalizedEvent) -> Signature:
|
||||
return (event.provider, event.channel, event.event_id)
|
||||
|
||||
|
||||
def _matching(events: list[NormalizedEvent], predicate: Callable[[NormalizedEvent], bool]) -> list[NormalizedEvent]:
|
||||
"""Filter events by a rule predicate, evaluating it once per distinct signature.
|
||||
|
||||
Every rule predicate depends only on provider, channel and event ID, so a
|
||||
100,000-event log with a few hundred signatures needs a few hundred
|
||||
predicate calls per rule instead of 100,000.
|
||||
"""
|
||||
verdicts: dict[Signature, bool] = {}
|
||||
matched: list[NormalizedEvent] = []
|
||||
for event in events:
|
||||
if not rule.predicate(event) or event.timestamp is None or not event.timestamp_valid:
|
||||
signature = _signature(event)
|
||||
verdict = verdicts.get(signature)
|
||||
if verdict is None:
|
||||
verdict = verdicts[signature] = predicate(event)
|
||||
if verdict:
|
||||
matched.append(event)
|
||||
return matched
|
||||
|
||||
|
||||
def _windowed_groups(
|
||||
events: list[NormalizedEvent],
|
||||
predicate: Callable[[NormalizedEvent], bool],
|
||||
key_for: Callable[[NormalizedEvent], str | None],
|
||||
window_seconds: int,
|
||||
) -> list[Group]:
|
||||
"""Bucket timed events by key and split each bucket into bounded windows.
|
||||
|
||||
A window is anchored on its first event, so a group can never chain beyond
|
||||
``window_seconds``. Events whose key is unknown become isolated groups
|
||||
(key ``None``) so that missing dimensions never merge unrelated evidence.
|
||||
"""
|
||||
buckets: dict[str, list[NormalizedEvent]] = {}
|
||||
isolated: list[NormalizedEvent] = []
|
||||
for event in events:
|
||||
if not predicate(event) or event.timestamp is None or not event.timestamp_valid:
|
||||
continue
|
||||
key = rule.key(event)
|
||||
key = key_for(event)
|
||||
if key is None:
|
||||
isolated_number += 1
|
||||
key = f"__isolated__{isolated_number}:{event.id}"
|
||||
buckets.setdefault(key, []).append(event)
|
||||
groups: list[list[NormalizedEvent]] = []
|
||||
window = timedelta(seconds=rule.window_seconds)
|
||||
isolated.append(event)
|
||||
else:
|
||||
buckets.setdefault(key, []).append(event)
|
||||
groups: list[Group] = []
|
||||
window = timedelta(seconds=window_seconds)
|
||||
for key in sorted(buckets):
|
||||
ordered = sorted(buckets[key], key=_event_sort_key)
|
||||
current: list[NormalizedEvent] = []
|
||||
@@ -290,73 +492,202 @@ def _groups_for_rule(events: list[NormalizedEvent], rule: Rule) -> list[list[Nor
|
||||
if not current or event.timestamp - current[0].timestamp <= window:
|
||||
current.append(event)
|
||||
else:
|
||||
groups.append(current)
|
||||
groups.append((key, current))
|
||||
current = [event]
|
||||
if current:
|
||||
groups.append(current)
|
||||
groups.append((key, current))
|
||||
groups.extend((None, [event]) for event in sorted(isolated, key=_event_sort_key))
|
||||
return groups
|
||||
|
||||
|
||||
def _always(_event: NormalizedEvent) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
def _groups_for_rule(events: list[NormalizedEvent], rule: Rule) -> list[Group]:
|
||||
groups = _windowed_groups(_matching(events, rule.predicate), _always, rule.key, rule.window_seconds)
|
||||
if rule.accept is None:
|
||||
return groups
|
||||
return [group for group in groups if rule.accept(group[1])]
|
||||
|
||||
|
||||
def _incident_id(rule_id: str, evidence: list[NormalizedEvent]) -> str:
|
||||
seed = f"{rule_id}|{'|'.join(event.id for event in evidence)}".encode()
|
||||
return f"incident-{hashlib.sha256(seed).hexdigest()[:16]}"
|
||||
|
||||
|
||||
def _build(rule: Rule, evidence: list[NormalizedEvent]) -> IncidentCluster:
|
||||
signatures = {(event.provider, event.event_id, event.summary) for event in evidence}
|
||||
reasons = [rule.reason_for(evidence)]
|
||||
if len(evidence) > 1:
|
||||
def _signatures(evidence: list[NormalizedEvent]) -> set[tuple[str, int | None, str]]:
|
||||
return {(event.provider, event.event_id, event.summary) for event in evidence}
|
||||
|
||||
|
||||
def _compression_reasons(evidence: list[NormalizedEvent]) -> list[str]:
|
||||
reasons: list[str] = []
|
||||
timed = all(event.timestamp is not None and event.timestamp_valid for event in evidence)
|
||||
if len(evidence) > 1 and timed:
|
||||
seconds = int((evidence[-1].timestamp - evidence[0].timestamp).total_seconds())
|
||||
reasons.append(f"{len(evidence)} evidence events occurred within {seconds} second(s).")
|
||||
signatures = _signatures(evidence)
|
||||
if len(signatures) < len(evidence):
|
||||
reasons.append(f"Repeated signals compress from {len(evidence)} records to {len(signatures)} distinct signature(s).")
|
||||
return IncidentCluster(
|
||||
return reasons
|
||||
|
||||
|
||||
def _build(rule: Rule, evidence: list[NormalizedEvent]) -> IncidentCluster:
|
||||
return IncidentCluster.model_construct(
|
||||
id=_incident_id(rule.id, evidence),
|
||||
rule_id=rule.id,
|
||||
start=evidence[0].timestamp,
|
||||
end=evidence[-1].timestamp,
|
||||
title=rule.title_for(evidence),
|
||||
title=_bounded_title(rule.title_for(evidence), "Correlated evidence"),
|
||||
category=rule.category,
|
||||
severity=rule.severity,
|
||||
reasons=reasons,
|
||||
reasons=[rule.reason_for(evidence), *_compression_reasons(evidence)],
|
||||
evidence_event_ids=[event.id for event in evidence],
|
||||
original_count=len(evidence),
|
||||
compressed_count=max(1, len(signatures)),
|
||||
compressed_count=max(1, len(_signatures(evidence))),
|
||||
)
|
||||
|
||||
|
||||
def _attention(event: NormalizedEvent) -> bool:
|
||||
return event.level.casefold() in LEVEL_SEVERITY
|
||||
|
||||
|
||||
def _fallback_key(event: NormalizedEvent) -> str | None:
|
||||
provider = _dimension(event.provider)
|
||||
if provider is None or provider.casefold() == "unknown provider" or event.event_id is None:
|
||||
return None
|
||||
return _group_key(_host(event), provider, str(event.event_id))
|
||||
|
||||
|
||||
def _max_severity(levels: list[Severity]) -> Severity:
|
||||
return max(levels, key=lambda level: SEVERITY_RANK[level])
|
||||
|
||||
|
||||
def _build_fallback(evidence: list[NormalizedEvent]) -> IncidentCluster:
|
||||
first = evidence[0]
|
||||
timed = first.timestamp is not None and first.timestamp_valid
|
||||
if len(evidence) == 1:
|
||||
reason = "An error or warning was not matched by a more specific correlation rule."
|
||||
else:
|
||||
reason = (
|
||||
"Errors or warnings with the same provider, event ID and known host were not matched by a more specific "
|
||||
"rule and were compressed into one bounded window; repetition is not a causal claim."
|
||||
)
|
||||
return IncidentCluster.model_construct(
|
||||
id=_incident_id(FALLBACK_RULE_ID, evidence),
|
||||
rule_id=FALLBACK_RULE_ID,
|
||||
start=first.timestamp if timed else None,
|
||||
end=evidence[-1].timestamp if timed else None,
|
||||
title=_bounded_title(first.summary, "Unclassified attention event"),
|
||||
category=first.category,
|
||||
severity=_max_severity([LEVEL_SEVERITY.get(event.level.casefold(), "warning") for event in evidence]),
|
||||
reasons=[reason, *_compression_reasons(evidence)],
|
||||
evidence_event_ids=[event.id for event in evidence],
|
||||
original_count=len(evidence),
|
||||
compressed_count=max(1, len(_signatures(evidence))),
|
||||
)
|
||||
|
||||
|
||||
# --- campaigns --------------------------------------------------------------
|
||||
|
||||
|
||||
def _campaigns_for(
|
||||
rule_id: str, window_seconds: int, keyed: list[tuple[str | None, IncidentCluster]]
|
||||
) -> list[Campaign]:
|
||||
"""Link adjacent windows of one rule and one known key into a summary campaign.
|
||||
|
||||
``keyed`` is ordered by key and then by time, as produced by
|
||||
:func:`_windowed_groups`. Incidents keep their bounded windows; a campaign
|
||||
only records that the same rule recurred for the same known dimensions.
|
||||
"""
|
||||
campaigns: list[Campaign] = []
|
||||
window = timedelta(seconds=window_seconds)
|
||||
run: list[IncidentCluster] = []
|
||||
run_key: str | None = None
|
||||
|
||||
def flush() -> None:
|
||||
if len(run) < 2:
|
||||
return
|
||||
first, last = run[0], run[-1]
|
||||
incident_ids = [incident.id for incident in run]
|
||||
seed = f"{rule_id}|{'|'.join(incident_ids)}".encode()
|
||||
campaign = Campaign.model_construct(
|
||||
id=f"campaign-{hashlib.sha256(seed).hexdigest()[:16]}",
|
||||
rule_id=rule_id,
|
||||
title=_bounded_title(f"Recurring: {first.title}", "Recurring activity"),
|
||||
category=first.category,
|
||||
severity=_max_severity([incident.severity for incident in run]),
|
||||
start=first.start,
|
||||
end=last.end,
|
||||
incident_ids=incident_ids,
|
||||
event_count=sum(incident.original_count for incident in run),
|
||||
reasons=[
|
||||
(
|
||||
f"The same rule fired for the same known grouping dimensions in {len(run)} adjacent windows "
|
||||
f"(gaps of at most {window_seconds} second(s))."
|
||||
),
|
||||
"Each incident stays bounded by its rule span; the campaign only summarizes recurrence and makes no causal claim.",
|
||||
],
|
||||
)
|
||||
for incident in run:
|
||||
incident.campaign_id = campaign.id
|
||||
campaigns.append(campaign)
|
||||
|
||||
for key, incident in keyed:
|
||||
previous = run[-1] if run else None
|
||||
contiguous = (
|
||||
key is not None
|
||||
and key == run_key
|
||||
and previous is not None
|
||||
and previous.end is not None
|
||||
and incident.start is not None
|
||||
and incident.start - previous.end <= window
|
||||
)
|
||||
if not contiguous:
|
||||
flush()
|
||||
run = []
|
||||
run_key = key
|
||||
if key is not None and incident.start is not None:
|
||||
run.append(incident)
|
||||
flush()
|
||||
return campaigns
|
||||
|
||||
|
||||
def _incident_sort_key(incident: IncidentCluster) -> tuple[bool, datetime, str, str]:
|
||||
return (
|
||||
incident.start is None,
|
||||
incident.start or datetime.max.replace(tzinfo=UTC),
|
||||
incident.rule_id,
|
||||
incident.id,
|
||||
)
|
||||
|
||||
|
||||
def correlate_with_campaigns(events: list[NormalizedEvent]) -> tuple[list[IncidentCluster], list[Campaign]]:
|
||||
ordered = sorted(events, key=_event_sort_key)
|
||||
incidents: list[IncidentCluster] = []
|
||||
campaigns: list[Campaign] = []
|
||||
consumed: set[str] = set()
|
||||
for rule in RULES:
|
||||
keyed = [(key, _build(rule, group)) for key, group in _groups_for_rule(ordered, rule)]
|
||||
for _, incident in keyed:
|
||||
consumed.update(incident.evidence_event_ids)
|
||||
incidents.extend(incident for _, incident in keyed)
|
||||
campaigns.extend(_campaigns_for(rule.id, rule.window_seconds, keyed))
|
||||
|
||||
remaining = [event for event in ordered if event.id not in consumed and _attention(event)]
|
||||
keyed_fallback = [
|
||||
(key, _build_fallback(group))
|
||||
for key, group in _windowed_groups(remaining, _always, _fallback_key, FALLBACK_WINDOW_SECONDS)
|
||||
]
|
||||
incidents.extend(incident for _, incident in keyed_fallback)
|
||||
campaigns.extend(_campaigns_for(FALLBACK_RULE_ID, FALLBACK_WINDOW_SECONDS, keyed_fallback))
|
||||
# Untimed attention events stay visible as evidence but never join a temporal group.
|
||||
incidents.extend(
|
||||
_build_fallback([event]) for event in remaining if event.timestamp is None or not event.timestamp_valid
|
||||
)
|
||||
campaigns.sort(key=lambda campaign: (campaign.start, campaign.rule_id, campaign.id))
|
||||
return sorted(incidents, key=_incident_sort_key), campaigns
|
||||
|
||||
|
||||
def correlate(events: list[NormalizedEvent]) -> list[IncidentCluster]:
|
||||
ordered = sorted(events, key=_event_sort_key)
|
||||
incidents: list[IncidentCluster] = []
|
||||
consumed: set[str] = set()
|
||||
for rule in RULES:
|
||||
for group in _groups_for_rule(ordered, rule):
|
||||
incidents.append(_build(rule, group))
|
||||
consumed.update(event.id for event in group)
|
||||
fallback_rule_id = "windows.generic.attention"
|
||||
for event in ordered:
|
||||
if event.id not in consumed and event.level.casefold() in {"critical", "error", "warning"}:
|
||||
incidents.append(
|
||||
IncidentCluster(
|
||||
id=_incident_id(fallback_rule_id, [event]),
|
||||
rule_id=fallback_rule_id,
|
||||
start=event.timestamp if event.timestamp_valid else None,
|
||||
end=event.timestamp if event.timestamp_valid else None,
|
||||
title=event.summary or "Unclassified attention event",
|
||||
category=event.category,
|
||||
severity="warning",
|
||||
reasons=["An error or warning was not matched by a more specific correlation rule."],
|
||||
evidence_event_ids=[event.id],
|
||||
original_count=1,
|
||||
compressed_count=1,
|
||||
)
|
||||
)
|
||||
return sorted(
|
||||
incidents,
|
||||
key=lambda incident: (
|
||||
incident.start is None,
|
||||
incident.start or datetime.max.replace(tzinfo=UTC),
|
||||
incident.rule_id,
|
||||
incident.id,
|
||||
),
|
||||
)
|
||||
return correlate_with_campaigns(events)[0]
|
||||
+164
-102
@@ -1,22 +1,30 @@
|
||||
import asyncio
|
||||
import gzip
|
||||
import hashlib
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
from collections import Counter
|
||||
from collections.abc import AsyncIterator
|
||||
from contextlib import asynccontextmanager
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from fastapi import FastAPI, File, HTTPException, UploadFile
|
||||
from fastapi import FastAPI, HTTPException, Request, Response
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from starlette.datastructures import UploadFile as StarletteUploadFile
|
||||
from starlette.formparsers import MultiPartException
|
||||
from starlette.requests import ClientDisconnect
|
||||
|
||||
from .correlate import correlate
|
||||
from .correlate import correlate_with_campaigns
|
||||
from .demo import load_demo
|
||||
from .models import AnalysisResponse, ParseIssue, ParseStats
|
||||
from .models import AnalysisResponse, ParseIssue, ParseStats, ParseStatus, SourceInfo
|
||||
from .parser import (
|
||||
MAX_UPLOAD_BYTES,
|
||||
EvtxParseError,
|
||||
ParseResult,
|
||||
UnexpectedParserError,
|
||||
parse_evtx_bytes,
|
||||
)
|
||||
@@ -43,10 +51,11 @@ app.add_middleware(
|
||||
|
||||
MAX_MULTIPART_OVERHEAD_BYTES = 1024 * 1024
|
||||
MAX_REQUEST_BYTES = MAX_UPLOAD_BYTES + MAX_MULTIPART_OVERHEAD_BYTES
|
||||
MAX_REPORTED_ISSUES = 200
|
||||
GZIP_LEVEL = 1
|
||||
CONTENT_SECURITY_POLICY = (
|
||||
"default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; "
|
||||
"img-src 'self' data:; connect-src 'self' http://localhost:8000 http://127.0.0.1:8000 "
|
||||
"http://localhost:5173 http://127.0.0.1:5173 http://127.0.0.1:4173; "
|
||||
"img-src 'self' data:; connect-src 'self'; "
|
||||
"font-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'"
|
||||
)
|
||||
SECURITY_HEADERS = {
|
||||
@@ -176,49 +185,67 @@ def health():
|
||||
@app.get("/api/demo", response_model=AnalysisResponse)
|
||||
def demo():
|
||||
events = load_demo()
|
||||
return AnalysisResponse(source="bundled-demo", events=events, incidents=correlate(events))
|
||||
incidents, campaigns = correlate_with_campaigns(events)
|
||||
return AnalysisResponse(source="bundled-demo", events=events, incidents=incidents, campaigns=campaigns)
|
||||
|
||||
|
||||
async def _parse_with_admission(data: bytes):
|
||||
def _capacity_error(message: str) -> HTTPException:
|
||||
return HTTPException(
|
||||
503,
|
||||
detail={"code": "parse_capacity_exceeded", "message": message},
|
||||
headers={"Retry-After": "1"},
|
||||
)
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def _admission() -> AsyncIterator[None]:
|
||||
"""Reserve an analysis slot before the multipart body is spooled.
|
||||
|
||||
Starlette spools uploads to TMPDIR while parsing the form. Admitting first
|
||||
bounds the number of concurrently spooled uploads to concurrency + queue,
|
||||
so a burst of large uploads gets a fast 503 instead of exhausting tmpfs.
|
||||
"""
|
||||
global _parse_inflight
|
||||
async with _parse_admission_lock:
|
||||
if _parse_inflight >= PARSE_CONCURRENCY + PARSE_QUEUE_LIMIT:
|
||||
raise HTTPException(
|
||||
503,
|
||||
detail={
|
||||
"code": "parse_capacity_exceeded",
|
||||
"message": "EventLens is already analyzing its maximum concurrent uploads; retry shortly.",
|
||||
},
|
||||
headers={"Retry-After": "1"},
|
||||
)
|
||||
raise _capacity_error("EventLens is already analyzing its maximum concurrent uploads; retry shortly.")
|
||||
_parse_inflight += 1
|
||||
acquired = False
|
||||
try:
|
||||
try:
|
||||
await asyncio.wait_for(_parse_slots.acquire(), timeout=PARSE_QUEUE_TIMEOUT_SECONDS)
|
||||
acquired = True
|
||||
except TimeoutError as exc:
|
||||
raise HTTPException(
|
||||
503,
|
||||
detail={
|
||||
"code": "parse_capacity_exceeded",
|
||||
"message": "EventLens is busy analyzing another upload; retry shortly.",
|
||||
},
|
||||
headers={"Retry-After": "1"},
|
||||
) from exc
|
||||
yield
|
||||
finally:
|
||||
if not acquired:
|
||||
async with _parse_admission_lock:
|
||||
_parse_inflight -= 1
|
||||
try:
|
||||
return await asyncio.to_thread(parse_evtx_bytes, data)
|
||||
finally:
|
||||
if acquired:
|
||||
_parse_slots.release()
|
||||
async with _parse_admission_lock:
|
||||
_parse_inflight -= 1
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def _parse_slot() -> AsyncIterator[None]:
|
||||
try:
|
||||
await asyncio.wait_for(_parse_slots.acquire(), timeout=PARSE_QUEUE_TIMEOUT_SECONDS)
|
||||
except TimeoutError as exc:
|
||||
raise _capacity_error("EventLens is busy analyzing another upload; retry shortly.") from exc
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
_parse_slots.release()
|
||||
|
||||
|
||||
def _stats(parsed: ParseResult, status: ParseStatus | None = None) -> ParseStats:
|
||||
counts = Counter(issue.code for issue in parsed.issues)
|
||||
return ParseStats(
|
||||
status=status or parsed.status,
|
||||
parsed_events=len(parsed.events) if status != "failed" else 0,
|
||||
records_seen=parsed.records_seen,
|
||||
skipped_records=parsed.skipped_records,
|
||||
issue_count=len(parsed.issues),
|
||||
truncated=parsed.truncated,
|
||||
truncation_reason=parsed.truncation_reason,
|
||||
duration_ms=parsed.duration_ms,
|
||||
issues=parsed.issues[:MAX_REPORTED_ISSUES],
|
||||
issues_truncated=len(parsed.issues) > MAX_REPORTED_ISSUES,
|
||||
issue_counts=dict(sorted(counts.items())),
|
||||
)
|
||||
|
||||
|
||||
def _failed_parse_stats() -> ParseStats:
|
||||
return ParseStats(
|
||||
status="failed",
|
||||
@@ -230,77 +257,112 @@ def _failed_parse_stats() -> ParseStats:
|
||||
truncation_reason=None,
|
||||
duration_ms=0,
|
||||
issues=[ParseIssue(code="parser_rejected_input", message="The EVTX parser rejected the input.")],
|
||||
issue_counts={"parser_rejected_input": 1},
|
||||
)
|
||||
|
||||
|
||||
@app.post("/api/analyze", response_model=AnalysisResponse)
|
||||
async def analyze(file: UploadFile = File(...)): # noqa: B008
|
||||
def _analyze_bytes(source: str, data: bytes | bytearray, compress: bool = False) -> bytes:
|
||||
"""Parse, correlate, serialize and optionally gzip off the event loop."""
|
||||
source_info = SourceInfo(sha256=hashlib.sha256(data).hexdigest(), size_bytes=len(data))
|
||||
try:
|
||||
source = _safe_source_name(file.filename)
|
||||
if not source.lower().endswith(".evtx"):
|
||||
raise HTTPException(400, "Upload an .evtx file")
|
||||
data = bytearray()
|
||||
while True:
|
||||
chunk = await file.read(min(1024 * 1024, MAX_UPLOAD_BYTES + 1 - len(data)))
|
||||
if not chunk:
|
||||
break
|
||||
data.extend(chunk)
|
||||
if len(data) > MAX_UPLOAD_BYTES:
|
||||
raise HTTPException(413, "EVTX file exceeds the 50 MiB MVP limit")
|
||||
try:
|
||||
parsed = await _parse_with_admission(bytes(data))
|
||||
except EvtxParseError as exc:
|
||||
raise HTTPException(
|
||||
422,
|
||||
detail={
|
||||
"code": "parser_rejected_input",
|
||||
"message": str(exc),
|
||||
"parse": _failed_parse_stats().model_dump(mode="json"),
|
||||
},
|
||||
) from exc
|
||||
except UnexpectedParserError as exc:
|
||||
logger.error("Unexpected EVTX parser failure reached API exception_type=%s", type(exc).__name__)
|
||||
raise HTTPException(
|
||||
500,
|
||||
detail={"code": "parser_internal_error", "message": "EVTX analysis failed unexpectedly; retry the request."},
|
||||
) from exc
|
||||
if not parsed.events:
|
||||
raise HTTPException(
|
||||
422,
|
||||
detail={
|
||||
"code": "no_readable_events",
|
||||
"message": "No readable Windows events were found in this file.",
|
||||
"parse": ParseStats(
|
||||
status="failed",
|
||||
parsed_events=0,
|
||||
records_seen=parsed.records_seen,
|
||||
skipped_records=parsed.skipped_records,
|
||||
issue_count=len(parsed.issues),
|
||||
truncated=parsed.truncated,
|
||||
truncation_reason=parsed.truncation_reason,
|
||||
duration_ms=parsed.duration_ms,
|
||||
issues=parsed.issues,
|
||||
).model_dump(mode="json"),
|
||||
},
|
||||
)
|
||||
return AnalysisResponse(
|
||||
source=source,
|
||||
events=parsed.events,
|
||||
incidents=correlate(parsed.events),
|
||||
parse=ParseStats(
|
||||
status=parsed.status,
|
||||
parsed_events=len(parsed.events),
|
||||
records_seen=parsed.records_seen,
|
||||
skipped_records=parsed.skipped_records,
|
||||
issue_count=len(parsed.issues),
|
||||
truncated=parsed.truncated,
|
||||
truncation_reason=parsed.truncation_reason,
|
||||
duration_ms=parsed.duration_ms,
|
||||
issues=parsed.issues,
|
||||
),
|
||||
parsed = parse_evtx_bytes(data)
|
||||
except EvtxParseError as exc:
|
||||
raise HTTPException(
|
||||
422,
|
||||
detail={
|
||||
"code": "parser_rejected_input",
|
||||
"message": str(exc),
|
||||
"parse": _failed_parse_stats().model_dump(mode="json"),
|
||||
},
|
||||
) from exc
|
||||
if not parsed.events:
|
||||
raise HTTPException(
|
||||
422,
|
||||
detail={
|
||||
"code": "no_readable_events",
|
||||
"message": "No readable Windows events were found in this file.",
|
||||
"parse": _stats(parsed, "failed").model_dump(mode="json"),
|
||||
},
|
||||
)
|
||||
finally:
|
||||
await file.close()
|
||||
incidents, campaigns = correlate_with_campaigns(parsed.events)
|
||||
response = AnalysisResponse(
|
||||
source=source,
|
||||
events=parsed.events,
|
||||
incidents=incidents,
|
||||
campaigns=campaigns,
|
||||
parse=_stats(parsed),
|
||||
source_info=source_info,
|
||||
)
|
||||
payload = response.model_dump_json().encode("utf-8")
|
||||
# Event JSON is highly repetitive: level 1 shrinks a 100k-event response
|
||||
# ~20x for about a second of worker-thread CPU, never on the event loop.
|
||||
return gzip.compress(payload, compresslevel=GZIP_LEVEL, mtime=0) if compress else payload
|
||||
|
||||
|
||||
async def _read_bounded(upload: StarletteUploadFile) -> bytearray:
|
||||
data = bytearray()
|
||||
while True:
|
||||
chunk = await upload.read(min(1024 * 1024, MAX_UPLOAD_BYTES + 1 - len(data)))
|
||||
if not chunk:
|
||||
return data
|
||||
data.extend(chunk)
|
||||
if len(data) > MAX_UPLOAD_BYTES:
|
||||
raise HTTPException(413, "EVTX file exceeds the 50 MiB MVP limit")
|
||||
|
||||
|
||||
ANALYZE_OPENAPI = {
|
||||
"requestBody": {
|
||||
"required": True,
|
||||
"content": {
|
||||
"multipart/form-data": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["file"],
|
||||
"properties": {"file": {"type": "string", "format": "binary"}},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@app.post("/api/analyze", response_model=AnalysisResponse, openapi_extra=ANALYZE_OPENAPI)
|
||||
async def analyze(request: Request):
|
||||
compress = "gzip" in request.headers.get("accept-encoding", "").lower()
|
||||
async with _admission():
|
||||
try:
|
||||
form = await request.form(max_files=1, max_fields=4)
|
||||
except MultiPartException as exc:
|
||||
raise HTTPException(400, "Upload one .evtx file as multipart form data") from exc
|
||||
try:
|
||||
upload = form.get("file")
|
||||
if not isinstance(upload, StarletteUploadFile):
|
||||
raise HTTPException(422, "Upload one .evtx file in the 'file' form field")
|
||||
source = _safe_source_name(upload.filename)
|
||||
if not source.lower().endswith(".evtx"):
|
||||
raise HTTPException(400, "Upload an .evtx file")
|
||||
data = await _read_bounded(upload)
|
||||
async with _parse_slot():
|
||||
try:
|
||||
payload = await asyncio.to_thread(_analyze_bytes, source, data, compress)
|
||||
except UnexpectedParserError as exc:
|
||||
logger.error(
|
||||
"Unexpected EVTX parser failure reached API exception_type=%s", type(exc).__name__
|
||||
)
|
||||
raise HTTPException(
|
||||
500,
|
||||
detail={
|
||||
"code": "parser_internal_error",
|
||||
"message": "EVTX analysis failed unexpectedly; retry the request.",
|
||||
},
|
||||
) from exc
|
||||
del data
|
||||
finally:
|
||||
await form.close()
|
||||
headers = {"Vary": "Accept-Encoding"}
|
||||
if compress:
|
||||
headers["Content-Encoding"] = "gzip"
|
||||
return Response(content=payload, media_type="application/json", headers=headers)
|
||||
|
||||
|
||||
def _safe_source_name(filename: str | None) -> str:
|
||||
|
||||
+36
-2
@@ -3,7 +3,11 @@ from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, Field, field_validator, model_validator
|
||||
|
||||
Category = Literal["system", "service", "network", "authentication", "application", "crash", "other"]
|
||||
Category = Literal[
|
||||
"system", "service", "network", "authentication", "security", "application", "crash", "other"
|
||||
]
|
||||
Severity = Literal["critical", "error", "warning", "info"]
|
||||
AuditOutcome = Literal["success", "failure"]
|
||||
ParseStatus = Literal["complete", "partial", "failed"]
|
||||
TimestampSource = Literal["event", "record", "missing", "invalid"]
|
||||
|
||||
@@ -20,6 +24,7 @@ class NormalizedEvent(BaseModel):
|
||||
computer: str = Field(default="", max_length=256)
|
||||
category: Category = "other"
|
||||
summary: str = Field(default="", max_length=512)
|
||||
outcome: AuditOutcome | None = None
|
||||
fields: dict[str, str] = Field(default_factory=dict, max_length=200)
|
||||
|
||||
@field_validator("timestamp")
|
||||
@@ -49,11 +54,31 @@ class IncidentCluster(BaseModel):
|
||||
end: datetime | None = None
|
||||
title: str = Field(max_length=256)
|
||||
category: Category
|
||||
severity: str = Field(max_length=32)
|
||||
severity: Severity
|
||||
reasons: list[str] = Field(max_length=8)
|
||||
evidence_event_ids: list[str]
|
||||
original_count: int = Field(ge=1)
|
||||
compressed_count: int = Field(ge=1)
|
||||
campaign_id: str | None = Field(default=None, max_length=128)
|
||||
|
||||
|
||||
class Campaign(BaseModel):
|
||||
"""Consecutive incidents of one rule and grouping key, linked for summary only.
|
||||
|
||||
Incident windows stay bounded by their rule span; a campaign only states
|
||||
that the same rule fired for the same known dimensions in adjacent windows.
|
||||
"""
|
||||
|
||||
id: str = Field(max_length=128)
|
||||
rule_id: str = Field(max_length=128)
|
||||
title: str = Field(max_length=256)
|
||||
category: Category
|
||||
severity: Severity
|
||||
start: datetime
|
||||
end: datetime
|
||||
incident_ids: list[str] = Field(min_length=2)
|
||||
event_count: int = Field(ge=2)
|
||||
reasons: list[str] = Field(max_length=8)
|
||||
|
||||
|
||||
class ParseIssue(BaseModel):
|
||||
@@ -74,10 +99,19 @@ class ParseStats(BaseModel):
|
||||
truncation_reason: str | None = Field(default=None, max_length=64)
|
||||
duration_ms: int = Field(ge=0)
|
||||
issues: list[ParseIssue] = Field(default_factory=list)
|
||||
issues_truncated: bool = False
|
||||
issue_counts: dict[str, int] = Field(default_factory=dict)
|
||||
|
||||
|
||||
class SourceInfo(BaseModel):
|
||||
sha256: str = Field(pattern=r"^[0-9a-f]{64}$")
|
||||
size_bytes: int = Field(ge=0)
|
||||
|
||||
|
||||
class AnalysisResponse(BaseModel):
|
||||
source: str
|
||||
events: list[NormalizedEvent]
|
||||
incidents: list[IncidentCluster]
|
||||
campaigns: list[Campaign] = Field(default_factory=list)
|
||||
parse: ParseStats | None = None
|
||||
source_info: SourceInfo | None = None
|
||||
+90
-16
@@ -3,9 +3,12 @@ import json
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any
|
||||
|
||||
from .models import Category, NormalizedEvent, TimestampSource
|
||||
from .models import AuditOutcome, Category, NormalizedEvent, TimestampSource
|
||||
|
||||
AUTH_EVENT_IDS = {4624, 4625, 4634, 4647, 4648, 4672, 4768, 4769, 4771, 4776}
|
||||
AUTH_EVENT_IDS = {4624, 4625, 4634, 4647, 4648, 4672, 4740, 4768, 4769, 4771, 4776}
|
||||
ACCOUNT_CHANGE_EVENT_IDS = {4720, 4728, 4732, 4756}
|
||||
AUDIT_FAILURE_KEYWORD = 0x0010_0000_0000_0000
|
||||
AUDIT_SUCCESS_KEYWORD = 0x0020_0000_0000_0000
|
||||
LEVELS = {0: "information", 1: "critical", 2: "error", 3: "warning", 4: "information", 5: "verbose"}
|
||||
MAX_EVENT_ID = 4_294_967_295
|
||||
MAX_RECORD_ID = 9_223_372_036_854_775_807
|
||||
@@ -86,6 +89,21 @@ def _provider(system: dict[str, Any]) -> str:
|
||||
return _bounded_text(value, MAX_PROVIDER_CHARS, "Unknown provider")
|
||||
|
||||
|
||||
def _outcome(system: dict[str, Any]) -> AuditOutcome | None:
|
||||
raw = _scalar(system.get("Keywords"))
|
||||
if raw is None or isinstance(raw, bool):
|
||||
return None
|
||||
try:
|
||||
value = int(raw, 0) if isinstance(raw, str) else int(raw)
|
||||
except (TypeError, ValueError, OverflowError):
|
||||
return None
|
||||
if value & AUDIT_FAILURE_KEYWORD:
|
||||
return "failure"
|
||||
if value & AUDIT_SUCCESS_KEYWORD:
|
||||
return "success"
|
||||
return None
|
||||
|
||||
|
||||
def _store_field(output: dict[str, str], key: str, value: str, limit: int) -> None:
|
||||
bounded_key = _bounded_text(key or "value", MAX_FIELD_KEY_CHARS)
|
||||
if bounded_key not in output:
|
||||
@@ -127,47 +145,78 @@ def _flatten(
|
||||
if len(output) >= limit:
|
||||
return
|
||||
return
|
||||
_store_field(output, prefix or "value", _render_scalar(value)[:MAX_FIELD_VALUE_CHARS], limit)
|
||||
|
||||
|
||||
def _render_scalar(value: Any) -> str:
|
||||
"""Render a scalar exactly like ``json.dumps`` would, with fast paths for common types."""
|
||||
if isinstance(value, str):
|
||||
return value
|
||||
if value is None:
|
||||
return "null"
|
||||
if value is True:
|
||||
return "true"
|
||||
if value is False:
|
||||
return "false"
|
||||
if type(value) is int:
|
||||
return str(value)
|
||||
try:
|
||||
rendered = json.dumps(value, ensure_ascii=False) if not isinstance(value, str) else value
|
||||
return json.dumps(value, ensure_ascii=False)
|
||||
except (TypeError, ValueError):
|
||||
rendered = "[unrenderable value]"
|
||||
_store_field(output, prefix or "value", rendered[:MAX_FIELD_VALUE_CHARS], limit)
|
||||
return "[unrenderable value]"
|
||||
|
||||
|
||||
def _fold(value: str) -> str:
|
||||
return value.strip().casefold()
|
||||
|
||||
|
||||
EVENTLOG_PROVIDERS = frozenset({"eventlog", "microsoft-windows-eventlog"})
|
||||
|
||||
|
||||
def _channel_matches(channel: str, *accepted: str) -> bool:
|
||||
return channel.strip().casefold() in {value.casefold() for value in accepted}
|
||||
folded = _fold(channel)
|
||||
return any(folded == value.casefold() for value in accepted)
|
||||
|
||||
|
||||
def is_security_audit(provider: str, channel: str) -> bool:
|
||||
return provider.strip().casefold() == "microsoft-windows-security-auditing" and _channel_matches(channel, "Security")
|
||||
return _fold(provider) == "microsoft-windows-security-auditing" and _fold(channel) == "security"
|
||||
|
||||
|
||||
def is_service_control_manager(provider: str, channel: str) -> bool:
|
||||
return provider.strip().casefold() == "service control manager" and _channel_matches(channel, "System")
|
||||
return _fold(provider) == "service control manager" and _fold(channel) == "system"
|
||||
|
||||
|
||||
def is_dns_client(provider: str, channel: str) -> bool:
|
||||
return provider.strip().casefold() == "microsoft-windows-dns-client" and _channel_matches(channel, "System")
|
||||
return _fold(provider) == "microsoft-windows-dns-client" and _fold(channel) == "system"
|
||||
|
||||
|
||||
def is_application_error(provider: str, channel: str, event_id: int | None) -> bool:
|
||||
return provider.casefold().strip() == "application error" and event_id == 1000 and _channel_matches(channel, "Application")
|
||||
return event_id == 1000 and _fold(provider) == "application error" and _fold(channel) == "application"
|
||||
|
||||
|
||||
def is_windows_error_reporting(provider: str, channel: str, event_id: int | None) -> bool:
|
||||
return provider.casefold().strip() == "windows error reporting" and event_id == 1001 and _channel_matches(channel, "Application")
|
||||
return event_id == 1001 and _fold(provider) == "windows error reporting" and _fold(channel) == "application"
|
||||
|
||||
|
||||
def is_event_log(provider: str, channel: str) -> bool:
|
||||
return provider.casefold().strip() in {"eventlog", "microsoft-windows-eventlog"} and _channel_matches(channel, "System")
|
||||
return _fold(provider) in EVENTLOG_PROVIDERS and _fold(channel) == "system"
|
||||
|
||||
|
||||
def is_log_cleared(provider: str, channel: str, event_id: int | None) -> bool:
|
||||
"""Security 1102 (audit log cleared) or System 104 (an event log was cleared)."""
|
||||
if event_id not in {1102, 104} or _fold(provider) not in EVENTLOG_PROVIDERS:
|
||||
return False
|
||||
return (event_id == 1102 and _channel_matches(channel, "Security")) or (
|
||||
event_id == 104 and _channel_matches(channel, "System")
|
||||
)
|
||||
|
||||
|
||||
def is_kernel_general(provider: str, channel: str) -> bool:
|
||||
return provider.strip().casefold() == "microsoft-windows-kernel-general" and _channel_matches(channel, "System")
|
||||
return _fold(provider) == "microsoft-windows-kernel-general" and _fold(channel) == "system"
|
||||
|
||||
|
||||
def is_kernel_power(provider: str, channel: str) -> bool:
|
||||
return provider.strip().casefold() == "microsoft-windows-kernel-power" and _channel_matches(channel, "System")
|
||||
return _fold(provider) == "microsoft-windows-kernel-power" and _fold(channel) == "system"
|
||||
|
||||
|
||||
def classify(provider: str, event_id: int | None, channel: str) -> Category:
|
||||
@@ -181,6 +230,10 @@ def classify(provider: str, event_id: int | None, channel: str) -> Category:
|
||||
return "network"
|
||||
if is_security_audit(provider, channel) and event_id in AUTH_EVENT_IDS:
|
||||
return "authentication"
|
||||
if is_log_cleared(provider, channel, event_id) or (
|
||||
is_security_audit(provider, channel) and event_id in ACCOUNT_CHANGE_EVENT_IDS
|
||||
):
|
||||
return "security"
|
||||
if is_application_error(provider, channel, event_id) or is_windows_error_reporting(provider, channel, event_id):
|
||||
return "crash"
|
||||
if (
|
||||
@@ -195,6 +248,23 @@ def classify(provider: str, event_id: int | None, channel: str) -> Category:
|
||||
|
||||
|
||||
def summarize(provider: str, event_id: int | None, category: Category, fields: dict[str, str]) -> str:
|
||||
if category == "service" and event_id == 7045:
|
||||
service = fields.get("EventData.ServiceName") or fields.get("service")
|
||||
return f"Service installed: {service}" if service else "Service installed"
|
||||
if category == "security" and event_id == 1102:
|
||||
return "Security audit log cleared"
|
||||
if category == "security" and event_id == 104:
|
||||
cleared = fields.get("UserData.LogFileCleared.Channel")
|
||||
return f"Event log cleared: {cleared}" if cleared else "Event log cleared"
|
||||
if category == "security" and event_id == 4720:
|
||||
account = fields.get("EventData.TargetUserName")
|
||||
return f"User account created: {account}" if account else "User account created"
|
||||
if category == "security" and event_id in {4728, 4732, 4756}:
|
||||
group = fields.get("EventData.TargetUserName")
|
||||
return f"Member added to security group {group}" if group else "Member added to a security group"
|
||||
if category == "authentication" and event_id == 4740:
|
||||
account = fields.get("EventData.TargetUserName")
|
||||
return f"Account locked out: {account}" if account else "Account locked out"
|
||||
if category == "service" and event_id in {7023, 7024, 7031, 7034}:
|
||||
service = fields.get("EventData.param1") or fields.get("UserData.param1") or fields.get("service")
|
||||
return f"{service} terminated unexpectedly" if service else "Service failure recorded"
|
||||
@@ -245,11 +315,14 @@ def normalize_record(
|
||||
stable_id = f"event-{hashlib.sha256(seed).hexdigest()[:16]}"
|
||||
timestamp, timestamp_source = _timestamp(system, record_timestamp)
|
||||
summary = summarize(provider, event_id, category, fields)[:MAX_SUMMARY_CHARS]
|
||||
return NormalizedEvent(
|
||||
# Every value above is already bounded and typed exactly as NormalizedEvent
|
||||
# requires (see tests/test_performance.py, which re-validates the output),
|
||||
# so skip per-event pydantic validation on this hot path.
|
||||
return NormalizedEvent.model_construct(
|
||||
id=stable_id,
|
||||
timestamp=timestamp,
|
||||
timestamp_source=timestamp_source,
|
||||
timestamp_valid=timestamp is not None,
|
||||
timestamp_valid=timestamp is not None and timestamp_source in {"event", "record"},
|
||||
provider=provider,
|
||||
event_id=event_id,
|
||||
level=level[:32],
|
||||
@@ -257,5 +330,6 @@ def normalize_record(
|
||||
computer=computer,
|
||||
category=category,
|
||||
summary=summary,
|
||||
outcome=_outcome(system),
|
||||
fields=fields,
|
||||
)
|
||||
@@ -52,7 +52,7 @@ def _fingerprint(stage: str, exc: BaseException) -> str:
|
||||
|
||||
|
||||
def parse_evtx_bytes(
|
||||
data: bytes,
|
||||
data: bytes | bytearray,
|
||||
max_events: int = MAX_EVENTS,
|
||||
max_seconds: float = MAX_PARSE_SECONDS,
|
||||
) -> ParseResult:
|
||||
@@ -113,9 +113,11 @@ def parse_evtx_bytes(
|
||||
raw_data = record["data"]
|
||||
if not isinstance(raw_data, str):
|
||||
raise TypeError("record data was not textual")
|
||||
if (
|
||||
len(raw_data) > MAX_RECORD_JSON_BYTES
|
||||
or len(raw_data.encode("utf-8")) > MAX_RECORD_JSON_BYTES
|
||||
# A str of n characters encodes to at most 4n UTF-8 bytes, so the
|
||||
# costly encode is only needed for records near the limit.
|
||||
if len(raw_data) > MAX_RECORD_JSON_BYTES or (
|
||||
len(raw_data) * 4 > MAX_RECORD_JSON_BYTES
|
||||
and len(raw_data.encode("utf-8")) > MAX_RECORD_JSON_BYTES
|
||||
):
|
||||
add_issue(
|
||||
"record_json_limit_exceeded",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "eventlens-api"
|
||||
version = "1.0.6"
|
||||
version = "1.1.0"
|
||||
description = "Local EVTX incident reconstruction API for EventLens"
|
||||
requires-python = ">=3.12"
|
||||
dependencies = [
|
||||
|
||||
@@ -0,0 +1,298 @@
|
||||
"""Regression tests for the November 2026 audit: bounded titles, severities,
|
||||
fallback burst compression, campaigns, new scoped rules, audit outcome,
|
||||
source integrity metadata, bounded issue lists and off-loop analysis."""
|
||||
|
||||
import asyncio
|
||||
import hashlib
|
||||
import threading
|
||||
import time
|
||||
from datetime import UTC, datetime, timedelta
|
||||
|
||||
import httpx
|
||||
|
||||
from app import main
|
||||
from app.correlate import MAX_TITLE_CHARS, correlate, correlate_with_campaigns
|
||||
from app.models import NormalizedEvent, ParseIssue
|
||||
from app.normalize import normalize_record
|
||||
from app.parser import ParseResult
|
||||
|
||||
START = datetime(2026, 11, 20, 8, 0, tzinfo=UTC)
|
||||
|
||||
|
||||
def event(
|
||||
identifier: str,
|
||||
seconds: int,
|
||||
*,
|
||||
provider: str = "Microsoft-Windows-Security-Auditing",
|
||||
event_id: int = 4625,
|
||||
channel: str = "Security",
|
||||
computer: str = "LAB-PC",
|
||||
level: str = "information",
|
||||
summary: str = "Synthetic event",
|
||||
fields: dict[str, str] | None = None,
|
||||
) -> NormalizedEvent:
|
||||
return NormalizedEvent(
|
||||
id=identifier,
|
||||
timestamp=START + timedelta(seconds=seconds),
|
||||
provider=provider,
|
||||
event_id=event_id,
|
||||
level=level,
|
||||
channel=channel,
|
||||
computer=computer,
|
||||
summary=summary,
|
||||
fields=fields or {},
|
||||
)
|
||||
|
||||
|
||||
def request(method: str, url: str, **kwargs) -> httpx.Response:
|
||||
async def send() -> httpx.Response:
|
||||
transport = httpx.ASGITransport(app=main.app)
|
||||
async with httpx.AsyncClient(transport=transport, base_url="http://testserver") as client:
|
||||
return await client.request(method, url, **kwargs)
|
||||
|
||||
return asyncio.run(send())
|
||||
|
||||
|
||||
# --- correlation ------------------------------------------------------------
|
||||
|
||||
|
||||
def test_unmatched_event_with_long_summary_gets_a_bounded_title():
|
||||
long = event("1", 0, provider="P" * 250, event_id=4_294_967_295, level="warning", summary="P" * 300 + " event")
|
||||
incident = correlate([long])[0]
|
||||
assert len(incident.title) <= MAX_TITLE_CHARS
|
||||
assert incident.title.endswith("…")
|
||||
|
||||
|
||||
def test_fallback_severity_preserves_critical_and_error_levels():
|
||||
critical = event("1", 0, provider="Disk", event_id=11, channel="System", level="critical")
|
||||
error = event("2", 0, provider="Ntfs", event_id=55, channel="System", level="error")
|
||||
severities = {incident.evidence_event_ids[0]: incident.severity for incident in correlate([critical, error])}
|
||||
assert severities == {"1": "critical", "2": "error"}
|
||||
|
||||
|
||||
def test_identical_unmatched_warnings_are_burst_compressed():
|
||||
events = [
|
||||
event(str(index), index % 60, provider="Disk", event_id=153, channel="System", level="warning", summary="Disk event 153")
|
||||
for index in range(5_000)
|
||||
]
|
||||
incidents = correlate(events)
|
||||
assert len(incidents) == 1
|
||||
assert incidents[0].rule_id == "windows.generic.attention"
|
||||
assert incidents[0].original_count == 5_000
|
||||
assert incidents[0].compressed_count == 1
|
||||
assert any("compress" in reason for reason in incidents[0].reasons)
|
||||
|
||||
|
||||
def test_fallback_never_merges_unknown_hosts_or_different_event_ids():
|
||||
events = [
|
||||
event("1", 0, provider="Disk", event_id=153, channel="System", computer="", level="warning"),
|
||||
event("2", 1, provider="Disk", event_id=153, channel="System", computer="", level="warning"),
|
||||
event("3", 2, provider="Disk", event_id=154, channel="System", level="warning"),
|
||||
event("4", 3, provider="Disk", event_id=153, channel="System", level="warning"),
|
||||
]
|
||||
assert sorted(len(incident.evidence_event_ids) for incident in correlate(events)) == [1, 1, 1, 1]
|
||||
|
||||
|
||||
def test_sustained_activity_is_summarized_as_a_campaign_without_widening_incidents():
|
||||
events = [
|
||||
event(str(index), index * 60, fields={"EventData.TargetUserName": "alice"}) for index in range(30)
|
||||
]
|
||||
incidents, campaigns = correlate_with_campaigns(events)
|
||||
failed = [incident for incident in incidents if incident.rule_id == "windows.auth.failed-logon"]
|
||||
assert len(failed) > 1
|
||||
assert all(
|
||||
(incident.end - incident.start).total_seconds() <= 120 for incident in failed if incident.start and incident.end
|
||||
)
|
||||
assert len(campaigns) == 1
|
||||
campaign = campaigns[0]
|
||||
assert campaign.incident_ids == [incident.id for incident in failed]
|
||||
assert campaign.event_count == 30
|
||||
assert {incident.campaign_id for incident in failed} == {campaign.id}
|
||||
|
||||
|
||||
def test_separated_activity_does_not_form_a_campaign():
|
||||
events = [
|
||||
event("1", 0, fields={"EventData.TargetUserName": "alice"}),
|
||||
event("2", 3_600, fields={"EventData.TargetUserName": "alice"}),
|
||||
]
|
||||
incidents, campaigns = correlate_with_campaigns(events)
|
||||
assert campaigns == []
|
||||
assert all(incident.campaign_id is None for incident in incidents)
|
||||
|
||||
|
||||
def test_log_clear_is_a_critical_security_incident():
|
||||
cleared = normalize_record(
|
||||
{
|
||||
"Event": {
|
||||
"System": {
|
||||
"Provider": {"#attributes": {"Name": "Microsoft-Windows-Eventlog"}},
|
||||
"EventID": 1102,
|
||||
"Channel": "Security",
|
||||
"Computer": "LAB-PC",
|
||||
"TimeCreated": {"#attributes": {"SystemTime": "2026-11-20T08:00:00Z"}},
|
||||
},
|
||||
"UserData": {"LogFileCleared": {"SubjectUserName": "admin"}},
|
||||
}
|
||||
}
|
||||
)
|
||||
assert cleared.category == "security"
|
||||
assert cleared.summary == "Security audit log cleared"
|
||||
incident = correlate([cleared])[0]
|
||||
assert incident.rule_id == "windows.audit.log-cleared"
|
||||
assert incident.severity == "critical"
|
||||
|
||||
|
||||
def test_system_log_clear_is_detected_and_scoped_to_its_channel():
|
||||
system_clear = event("1", 0, provider="Microsoft-Windows-Eventlog", event_id=104, channel="System")
|
||||
wrong_channel = event("2", 0, provider="Microsoft-Windows-Eventlog", event_id=104, channel="Application")
|
||||
rules = {incident.evidence_event_ids[0]: incident.rule_id for incident in correlate([system_clear, wrong_channel])}
|
||||
assert rules.get("1") == "windows.audit.log-cleared"
|
||||
assert rules.get("2") != "windows.audit.log-cleared"
|
||||
|
||||
|
||||
def test_service_installation_lockout_and_account_change_rules():
|
||||
events = [
|
||||
event("1", 0, provider="Service Control Manager", event_id=7045, channel="System", fields={"EventData.ServiceName": "Updater"}),
|
||||
event("2", 10, event_id=4740, fields={"EventData.TargetUserName": "alice"}),
|
||||
event("3", 20, event_id=4720, fields={"EventData.TargetUserName": "backup"}),
|
||||
event("4", 25, event_id=4732, fields={"EventData.TargetUserName": "Administrators"}),
|
||||
]
|
||||
by_rule = {incident.rule_id: incident for incident in correlate(events)}
|
||||
assert by_rule["windows.service.installed"].evidence_event_ids == ["1"]
|
||||
assert by_rule["windows.auth.account-lockout"].evidence_event_ids == ["2"]
|
||||
change = by_rule["windows.account.change"]
|
||||
assert change.evidence_event_ids == ["3", "4"]
|
||||
assert change.title == "Account created and added to a security group"
|
||||
|
||||
|
||||
def test_password_spray_requires_distinct_accounts_from_one_known_source():
|
||||
spray = [
|
||||
event(str(index), index, fields={"EventData.TargetUserName": f"user{index}", "EventData.IpAddress": "192.0.2.9"})
|
||||
for index in range(3)
|
||||
]
|
||||
two_accounts = [
|
||||
event(f"b{index}", index, fields={"EventData.TargetUserName": f"user{index % 2}", "EventData.IpAddress": "192.0.2.8"})
|
||||
for index in range(4)
|
||||
]
|
||||
unknown_source = [
|
||||
event(f"c{index}", index, fields={"EventData.TargetUserName": f"user{index}", "EventData.IpAddress": "-"})
|
||||
for index in range(5)
|
||||
]
|
||||
sprays = [
|
||||
incident for incident in correlate(spray + two_accounts + unknown_source) if incident.rule_id == "windows.auth.password-spray"
|
||||
]
|
||||
assert len(sprays) == 1
|
||||
assert sprays[0].evidence_event_ids == ["0", "1", "2"]
|
||||
assert "3 distinct accounts" in sprays[0].reasons[0]
|
||||
|
||||
|
||||
def test_audit_failure_keyword_becomes_outcome():
|
||||
record = {
|
||||
"Event": {
|
||||
"System": {
|
||||
"Provider": {"#attributes": {"Name": "Microsoft-Windows-Security-Auditing"}},
|
||||
"EventID": 4625,
|
||||
"Level": 0,
|
||||
"Keywords": "0x8010000000000000",
|
||||
"Channel": "Security",
|
||||
}
|
||||
}
|
||||
}
|
||||
assert normalize_record(record).outcome == "failure"
|
||||
record["Event"]["System"]["Keywords"] = "0x8020000000000000"
|
||||
assert normalize_record(record).outcome == "success"
|
||||
record["Event"]["System"]["Keywords"] = "not-hex"
|
||||
assert normalize_record(record).outcome is None
|
||||
|
||||
|
||||
def test_correlation_of_large_inputs_stays_within_budget():
|
||||
events = [
|
||||
event(str(index), index, fields={"EventData.TargetUserName": f"u{index % 50}", "EventData.IpAddress": "192.0.2.1"})
|
||||
for index in range(50_000)
|
||||
]
|
||||
started = time.perf_counter()
|
||||
incidents, campaigns = correlate_with_campaigns(events)
|
||||
assert time.perf_counter() - started < 20
|
||||
assert len(campaigns) >= 50
|
||||
assert incidents
|
||||
|
||||
|
||||
# --- API --------------------------------------------------------------------
|
||||
|
||||
|
||||
def _parse_with_issues(issue_count: int):
|
||||
def fake(_data) -> ParseResult:
|
||||
events = [event("1", 0, provider="Test", event_id=1000, channel="Application", level="error")]
|
||||
issues = [ParseIssue(code="invalid_timestamp", message="synthetic", record_id=index) for index in range(issue_count)]
|
||||
return ParseResult(events=events, issues=issues, truncated=False, duration_ms=1)
|
||||
|
||||
return fake
|
||||
|
||||
|
||||
def test_analysis_reports_source_sha256_and_size(monkeypatch):
|
||||
monkeypatch.setattr(main, "parse_evtx_bytes", _parse_with_issues(0))
|
||||
payload = b"synthetic-evtx-bytes"
|
||||
response = request("POST", "/api/analyze", files={"file": ("sample.evtx", payload, "application/octet-stream")})
|
||||
assert response.status_code == 200
|
||||
assert response.json()["source_info"] == {"sha256": hashlib.sha256(payload).hexdigest(), "size_bytes": len(payload)}
|
||||
|
||||
|
||||
def test_demo_has_no_source_integrity_claim_and_returns_campaign_list():
|
||||
body = request("GET", "/api/demo").json()
|
||||
assert body["source_info"] is None
|
||||
assert isinstance(body["campaigns"], list)
|
||||
|
||||
|
||||
def test_parse_issue_list_is_bounded_with_counts(monkeypatch):
|
||||
monkeypatch.setattr(main, "parse_evtx_bytes", _parse_with_issues(main.MAX_REPORTED_ISSUES + 50))
|
||||
response = request("POST", "/api/analyze", files={"file": ("sample.evtx", b"x", "application/octet-stream")})
|
||||
parse = response.json()["parse"]
|
||||
assert parse["issue_count"] == main.MAX_REPORTED_ISSUES + 50
|
||||
assert len(parse["issues"]) == main.MAX_REPORTED_ISSUES
|
||||
assert parse["issues_truncated"] is True
|
||||
assert parse["issue_counts"] == {"invalid_timestamp": main.MAX_REPORTED_ISSUES + 50}
|
||||
|
||||
|
||||
def test_parsing_and_correlation_run_off_the_event_loop(monkeypatch):
|
||||
threads: list[int] = []
|
||||
original = main.correlate_with_campaigns
|
||||
|
||||
def recording(events):
|
||||
threads.append(threading.get_ident())
|
||||
return original(events)
|
||||
|
||||
monkeypatch.setattr(main, "parse_evtx_bytes", _parse_with_issues(0))
|
||||
monkeypatch.setattr(main, "correlate_with_campaigns", recording)
|
||||
loop_thread: list[int] = []
|
||||
|
||||
async def send() -> httpx.Response:
|
||||
loop_thread.append(threading.get_ident())
|
||||
transport = httpx.ASGITransport(app=main.app)
|
||||
async with httpx.AsyncClient(transport=transport, base_url="http://testserver") as client:
|
||||
return await client.post("/api/analyze", files={"file": ("a.evtx", b"x", "application/octet-stream")})
|
||||
|
||||
assert asyncio.run(send()).status_code == 200
|
||||
assert threads and threads[0] != loop_thread[0]
|
||||
|
||||
|
||||
def test_full_admission_rejects_before_reading_the_upload(monkeypatch):
|
||||
def must_not_parse(_data):
|
||||
raise AssertionError("parser must not run when admission is full")
|
||||
|
||||
monkeypatch.setattr(main, "parse_evtx_bytes", must_not_parse)
|
||||
monkeypatch.setattr(main, "_parse_inflight", main.PARSE_CONCURRENCY + main.PARSE_QUEUE_LIMIT)
|
||||
response = request("POST", "/api/analyze", files={"file": ("a.evtx", b"x", "application/octet-stream")})
|
||||
assert response.status_code == 503
|
||||
assert response.json()["detail"]["code"] == "parse_capacity_exceeded"
|
||||
assert response.headers["retry-after"] == "1"
|
||||
|
||||
|
||||
def test_missing_file_field_is_a_client_error():
|
||||
response = request("POST", "/api/analyze", data={"other": "value"})
|
||||
assert response.status_code == 422
|
||||
|
||||
|
||||
def test_production_csp_only_allows_same_origin_connections():
|
||||
csp = request("GET", "/health").headers["content-security-policy"]
|
||||
assert "connect-src 'self';" in csp
|
||||
assert "localhost" not in csp
|
||||
@@ -0,0 +1,99 @@
|
||||
"""Guards for the performance shortcuts: they must never change results or
|
||||
bypass the normalized-event contract."""
|
||||
|
||||
import asyncio
|
||||
import gzip
|
||||
from datetime import UTC, datetime
|
||||
|
||||
import httpx
|
||||
import pytest
|
||||
|
||||
from app import correlate as correlate_module
|
||||
from app import main
|
||||
from app.models import NormalizedEvent
|
||||
from app.normalize import _render_scalar, normalize_record
|
||||
from app.parser import ParseResult
|
||||
|
||||
RECORDS = [
|
||||
{"Event": {"System": {"Provider": {"#attributes": {"Name": "Service Control Manager"}}, "EventID": {"#text": 7031, "#attributes": {"Qualifiers": 49152}}, "Level": 2, "Channel": "System", "Computer": "LAB-PC", "EventRecordID": 9, "TimeCreated": {"#attributes": {"SystemTime": "2026-11-20T08:00:00.123456Z"}}}, "EventData": {"param1": "Sync", "param2": 1, "flag": True, "none": None, "ratio": 1.5, "huge": 10**30}}},
|
||||
{"Event": {"System": {"Provider": "P" * 400, "EventID": "not-a-number", "Level": "weird", "Channel": "C" * 400, "Computer": "H" * 400}, "UserData": {"Nested": {"List": [{"a": "x" * 5000}, [1, [2, [3]]]]}}}},
|
||||
{"Event": {"System": {"Provider": {"Name": "Legacy"}, "EventID": 1, "TimeCreated": {"#attributes": {"SystemTime": "garbage"}}}}},
|
||||
{"Event": {"System": {"EventID": 4294967296, "Keywords": "0x8010000000000000"}, "EventData": {f"k{index}": index for index in range(400)}}},
|
||||
{"System": {"Provider": {"#attributes": {"Name": "Microsoft-Windows-Eventlog"}}, "EventID": 1102, "Channel": "Security"}},
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("payload", RECORDS)
|
||||
def test_constructed_events_satisfy_the_validated_contract(payload):
|
||||
event = normalize_record(payload, record_timestamp="2026-11-20T08:00:00Z", record_ordinal=3)
|
||||
revalidated = NormalizedEvent.model_validate(event.model_dump())
|
||||
assert revalidated == event
|
||||
|
||||
|
||||
@pytest.mark.parametrize("value", [None, True, False, 0, -7, 10**30, 1.5, float("inf"), [1, "a"], {"a": 1}])
|
||||
def test_fast_scalar_rendering_matches_json_dumps(value):
|
||||
import json
|
||||
|
||||
assert _render_scalar(value) == json.dumps(value, ensure_ascii=False)
|
||||
|
||||
|
||||
def test_strings_are_kept_verbatim():
|
||||
assert _render_scalar('a "quoted" value') == 'a "quoted" value'
|
||||
|
||||
|
||||
def test_rule_predicates_run_once_per_signature(monkeypatch):
|
||||
calls = 0
|
||||
original = correlate_module._failed_logon
|
||||
|
||||
def counting(event):
|
||||
nonlocal calls
|
||||
calls += 1
|
||||
return original(event)
|
||||
|
||||
rules = tuple(
|
||||
correlate_module.Rule(**{**rule.__dict__, "predicate": counting}) if rule.predicate is original else rule
|
||||
for rule in correlate_module.RULES
|
||||
)
|
||||
monkeypatch.setattr(correlate_module, "RULES", rules)
|
||||
events = [
|
||||
NormalizedEvent(id=str(index), timestamp=datetime(2026, 11, 20, tzinfo=UTC), provider="Microsoft-Windows-Security-Auditing", channel="Security", computer="LAB-PC", event_id=4625, fields={"EventData.TargetUserName": "alice"})
|
||||
for index in range(1_000)
|
||||
]
|
||||
correlate_module.correlate(events)
|
||||
# two rules use the predicate (failed-logon and password-spray), one signature each
|
||||
assert calls == 2
|
||||
|
||||
|
||||
def _request(headers: dict[str, str]) -> httpx.Response:
|
||||
async def send() -> httpx.Response:
|
||||
transport = httpx.ASGITransport(app=main.app)
|
||||
async with httpx.AsyncClient(transport=transport, base_url="http://testserver") as client:
|
||||
return await client.post("/api/analyze", headers=headers, files={"file": ("a.evtx", b"x", "application/octet-stream")})
|
||||
|
||||
return asyncio.run(send())
|
||||
|
||||
|
||||
def _fake_parse(_data) -> ParseResult:
|
||||
event = NormalizedEvent(id="1", timestamp=datetime(2026, 11, 20, tzinfo=UTC), provider="Test", event_id=1, level="error", channel="Application", computer="LAB-PC", summary="x")
|
||||
return ParseResult(events=[event], issues=[], truncated=False, duration_ms=1)
|
||||
|
||||
|
||||
def test_analysis_response_is_gzipped_when_accepted(monkeypatch):
|
||||
monkeypatch.setattr(main, "parse_evtx_bytes", _fake_parse)
|
||||
response = _request({"Accept-Encoding": "gzip"})
|
||||
assert response.status_code == 200
|
||||
assert response.headers["content-encoding"] == "gzip"
|
||||
assert response.headers["vary"] == "Accept-Encoding"
|
||||
assert response.json()["events"][0]["id"] == "1"
|
||||
|
||||
|
||||
def test_analysis_response_is_plain_without_gzip_support(monkeypatch):
|
||||
monkeypatch.setattr(main, "parse_evtx_bytes", _fake_parse)
|
||||
response = _request({"Accept-Encoding": "identity"})
|
||||
assert "content-encoding" not in response.headers
|
||||
assert response.json()["events"][0]["id"] == "1"
|
||||
|
||||
|
||||
def test_gzip_output_is_deterministic():
|
||||
payload = b'{"events": []}' * 100
|
||||
assert gzip.compress(payload, compresslevel=main.GZIP_LEVEL, mtime=0) == gzip.compress(payload, compresslevel=main.GZIP_LEVEL, mtime=0)
|
||||
Generated
+78
-75
@@ -62,11 +62,11 @@ filecache = [
|
||||
|
||||
[[package]]
|
||||
name = "certifi"
|
||||
version = "2026.7.22"
|
||||
version = "2026.10.23"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/fd/11/b524cbd9bbdaca58608e4cf4053fd463417549e1959fa8d3aa18319f9555/certifi-2026.10.23.tar.gz", hash = "sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd", size = 136225, upload-time = "2026-10-23T11:36:16.478Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/32/d1/a3652fe2c19134d0d15922177821d863cbd7e842d53a21bbe7e8e3a1b5ac/certifi-2026.10.23-py3-none-any.whl", hash = "sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1", size = 135082, upload-time = "2026-10-23T11:36:14.763Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -245,7 +245,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "eventlens-api"
|
||||
version = "1.0.6"
|
||||
version = "1.1.0"
|
||||
source = { virtual = "." }
|
||||
dependencies = [
|
||||
{ name = "evtx" },
|
||||
@@ -309,11 +309,11 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "filelock"
|
||||
version = "3.32.6"
|
||||
version = "4.2.12"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/38/46/126b1831dca12060d4a8296bf9c4fe5c93c4f22197fa239cb0cc82042bba/filelock-3.32.6.tar.gz", hash = "sha256:a3f55a18af3652a94d8f47d6055df434f254ca1d02ef2524850c6d249ca2512c", size = 225172, upload-time = "2026-09-08T22:57:11.528Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/52/aa/8ccff8da9a27e089727fcffd3c5b61708383217e47eb1e1b8af37b1dd166/filelock-4.2.12.tar.gz", hash = "sha256:7e7da24d3ac39268b0f156e56870001de44886318f092f9d851e692f7114d6dd", size = 680837, upload-time = "2026-11-18T01:20:03.951Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/cc/06/4f138f618dbea66803291274f228f01daf29f306fe8b96bc30dab765df75/filelock-3.32.6-py3-none-any.whl", hash = "sha256:3f16ecd0117feae0dfc147e8c62eb5daeccd8bd800378c3ddf416de9b4feb6b1", size = 100189, upload-time = "2026-09-08T22:57:10.182Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8a/c9/eb6b6528c7edb958d4c24ac47a8b94113d9de36e4cfc6eecd599b1a4f349/filelock-4.2.12-py3-none-any.whl", hash = "sha256:21decfec02f116ed4c954433cdb31f28c3b346b784543177b6d7059da2702ee9", size = 222442, upload-time = "2026-11-18T01:20:02.439Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -442,76 +442,79 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "msgpack"
|
||||
version = "1.2.2"
|
||||
version = "1.2.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/6d/44/ea2100ec54d30c46ee9dba10a3bfb79b655e96c6df237238a3234c75869b/msgpack-1.2.2.tar.gz", hash = "sha256:9eb0b0e602064527a045ea28c4f174ed69383587e29cebe28947e3b84106eb2a", size = 187025, upload-time = "2026-08-27T10:03:47.793Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/cc/52/1ec7ead2c7528bf3d1db73e886fa4df10f9e6f0eb7854a448b7090cfcef7/msgpack-1.2.4.tar.gz", hash = "sha256:475c44e12f2a5de766a8448783f149c9b33f3f49b88953c6cd739a77d93c732c", size = 197764, upload-time = "2026-10-26T17:55:48.593Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/31/78/90c15bebb1a72667349ca62d4507e9d9369e7f8f76b95f490b823d3622e5/msgpack-1.2.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a4348705be86e029d04e741cf9ed0dfe03e942d7d3b92e838fa80d3aa2c3ebc", size = 84275, upload-time = "2026-08-27T10:02:07.106Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/88/88/c2b6d8e81571da87aa232c0e34a3f3a0e618e6235892065ec82d1d81fc7a/msgpack-1.2.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0a652ceeededf71d3fa40c303a02a149d42338d310162367b91c539d4bd6e0a3", size = 83970, upload-time = "2026-08-27T10:02:08.488Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/da/c0/d3ede9f5d16acb4c05a9281859f1e99ef9f877a928eb78454c37f70db001/msgpack-1.2.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90986cc9aab9d7d1d8f38bcbf65d3f7ac83bdd90c35765db7d691b4829698cba", size = 409401, upload-time = "2026-08-27T10:02:09.877Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/41/f0/29f591bea185616cf417645ac03bd3ad9b317483ad8572160e325f7fe777/msgpack-1.2.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:77c2e018417dc1d66f235e383877ee885b60ade9d29e494dd581e08af2cb1923", size = 420619, upload-time = "2026-08-27T10:02:11.526Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4e/8e/c70c8c9180c5ddf4440eb8658ebead98e22e7686fbf84f6b165031430750/msgpack-1.2.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0e91332144f69bc3018c91232fac26da580ef748fb8eaddd7914d4458001cc4f", size = 379747, upload-time = "2026-08-27T10:02:13.345Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/50/9a/f10ce11fa62700c9ab87a22e65b9ca272f7f673ddd31aeb2de6ae272ad35/msgpack-1.2.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3e915d390d7068b257ca8b62f3fc59fad135c8631d1017ab03b0b924b07c5367", size = 398944, upload-time = "2026-08-27T10:02:15.006Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/82/fe/d7be978456ff8552e69a8e270d882e7530e01513c096b293d83df03753ea/msgpack-1.2.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:c522420d78db2431887d45b518e304d86e27b9ad0b30f24e3806a6ad5d8bdbfc", size = 373979, upload-time = "2026-08-27T10:02:16.618Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/be/af/91b0d8d3fb3063e259daee3ea8515cea6282f68f4b0e5f0b6fea25762c6e/msgpack-1.2.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4b554d8164ebb526892194f71dcd96ef1fefe0c250087498785d3ffc04a80be3", size = 417781, upload-time = "2026-08-27T10:02:18.293Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8e/3c/ce8e9efe1fd9e95c78b3705e4300ba7feba3dc6c00fb76259895db155518/msgpack-1.2.2-cp312-cp312-win32.whl", hash = "sha256:0e3315de5a4b2920ccef48d96b4448025e064a10d0f5a250f6584477d839c8d4", size = 65267, upload-time = "2026-08-27T10:02:19.869Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/85/98/a33b8b4af14e3476bb0da1b8c36ef7a0f28dcf95db1c5e68ff88cb89d591/msgpack-1.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:b68614fba0570349833b7dd999ff0aed4e5cc8d9eb6e3a7d4527be33c65e33d3", size = 72275, upload-time = "2026-08-27T10:02:21.141Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/df/5e/2f323a33a6aba5bd4b2d8b430e4fab21d92cd91c093b49ee287bc166ee54/msgpack-1.2.2-cp312-cp312-win_arm64.whl", hash = "sha256:59d5b93efa45fd09f620d0c9ba81cde339a2c9937af3eea42ee9653094ce6640", size = 65488, upload-time = "2026-08-27T10:02:22.575Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1f/eb/42f31c5a48811787ff59a9869721f70a49654d65ab6c455f4463c39b044e/msgpack-1.2.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8b2a281b556f120a43e591ea39915741b7ad54d4727b9c4350a0a11692252533", size = 83911, upload-time = "2026-08-27T10:02:24.06Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/33/54/10c6c16ddba8a5112e3680176b838e3694e4aad7284f9daa6d6d70d98817/msgpack-1.2.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1e8cdd1f3e7cc52c751092a9bf740e81e6919ab109cd376ae2d965dad0bbae34", size = 83734, upload-time = "2026-08-27T10:02:25.613Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d7/75/35823e4419df8792191b2a17ae3fe71b41d02c162b2c491c94d1a87f0caa/msgpack-1.2.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1814f92306ae7862908e9ece7cfd90e0dc87ded3e89b6ae7ffdd1175d6376fdc", size = 405635, upload-time = "2026-08-27T10:02:27.012Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6e/d3/6592e4064619b04f2dd0054c5fa13e37e3d55eb26044483d871fadb2f46b/msgpack-1.2.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d24b38a825bcca41bb956de50eb98451ef291304a8607fad99e619043d3e79b9", size = 417332, upload-time = "2026-08-27T10:02:28.776Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e3/a1/b21c6818a545e9a4a976ac954a5c250eecde9a02e0ec82f415473dab1324/msgpack-1.2.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:34e83e345194a2a51d8bd447dea9de2104f91e75b247f4735f14f04529f0746b", size = 374378, upload-time = "2026-08-27T10:02:30.678Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/03/8b/7ada15c7b64151d6dbb562d1b091520efb2c37acf2403b1d4ae13797b27d/msgpack-1.2.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:682804bf31e43d46e51a9a33bd575b51e839d715ce6bd5612c055f7b28ad637b", size = 395809, upload-time = "2026-08-27T10:02:32.322Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/bb/f7/96283e50f7020df4dfeacc55612b7a210c8cdf0dda48bc262f1f9b3e4c49/msgpack-1.2.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:9b659d77f8726fa5e7038967dda6b68d53cf34472c094cfa5b845454713b90d5", size = 373495, upload-time = "2026-08-27T10:02:33.832Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/cc/fe/1548dede9d9ca482f2d424a2e110a9705d4e02627a16b8bc8d10ce0208a2/msgpack-1.2.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4d9a562aec0a92fe536da2e533d313b3d2a6b929157b1dec7ff623446dc0a8ab", size = 414360, upload-time = "2026-08-27T10:02:35.396Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/77/9d/4419b8f86c219174b1fb8bbd7faaf84a548935f7b1916d028401b9433417/msgpack-1.2.2-cp313-cp313-win32.whl", hash = "sha256:a4161eee7799863aee237c35c90427861f7b994416dd81ae829f560b0a81bdcd", size = 65196, upload-time = "2026-08-27T10:02:37.007Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/3c/f8/593f5caf0dacab41cde1564c5f0419e61af55ec9628006205e8fd5eb5e03/msgpack-1.2.2-cp313-cp313-win_amd64.whl", hash = "sha256:b07c03f0da7e5279170df7745ddc732d526c8a198208936ec1a95c11ed2b2d5f", size = 72203, upload-time = "2026-08-27T10:02:38.28Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/bc/9e/c6ef92046b4a2bbb9d3aa0cb581cbf4a4051afccf6e5fb301a1bd3086f39/msgpack-1.2.2-cp313-cp313-win_arm64.whl", hash = "sha256:d13d07efbf655f9ae7a2352b630c52727b359005b21ba08a507585c9ac8c0896", size = 65435, upload-time = "2026-08-27T10:02:39.534Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5e/50/3e92c403346652cabd08cb8faceef847bae917ea3b3c81b64a5b6d09ed41/msgpack-1.2.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e497ee34e8a3342bbde51b27c22d8db05a651df3361dd3daef5b3ab0d66f3e04", size = 84315, upload-time = "2026-08-27T10:02:41.181Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b6/dc/8efe6dd96a12ab043930cb4cffb40b6e7f061491d6ec7a3d2b75ef1fda42/msgpack-1.2.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0dd9173c5ebaf5ecc5ca86e7ae1db92934e1d57b856f3dd90698941431f4fd77", size = 84634, upload-time = "2026-08-27T10:02:42.621Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1b/89/996573095bf7b038c04dd65ddbc4f1a4d381b0f7a44ff9186f3c7b8325c2/msgpack-1.2.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8dc4487097571f7311188c3eca2a3e86cd1f1db4c37c7a017bcc3fd38486cbfe", size = 404194, upload-time = "2026-08-27T10:02:44.096Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b6/4e/46f5a5d949dbd054dab60cb15aac7ac6ae6774c134532893414689bf2f53/msgpack-1.2.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:73b0e05c32c3cfc3cd84994908e57430c0ebc6813abf905d3f18ff115d54df3f", size = 412343, upload-time = "2026-08-27T10:02:45.747Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/da/e8/739a94197358a313307e6e9e7d8d22ef66add39222de911a44161aa96920/msgpack-1.2.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:aa1120c653b76d8eafa50423b5eba06b5c9737f8692c74fa3afe03e84b8978ea", size = 372620, upload-time = "2026-08-27T10:02:47.578Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/03/d4/09b92e1fcdccea9466bfae45455367ac52362ae445d96a602e51b7a8df73/msgpack-1.2.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ccfd880988f8438d1c91c77d7edc58e70f4d2012e999167bc154c64c6f06ea6b", size = 394603, upload-time = "2026-08-27T10:02:49.172Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/47/db/d11bd6f258a60703dcdc7a3772818ad0c2f602ee4c2acfb24088c6c3ebc3/msgpack-1.2.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:6195257a107bf25872ef84aab7295078271eea3ac6413f0506b631f6c9586ed5", size = 372666, upload-time = "2026-08-27T10:02:50.886Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/71/cf/fbbbac0c6e5fbb9d51abc23e3b5fe8620f5c01e0588797cf664a623bb9e1/msgpack-1.2.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b8dd6c71d20c28d2d0eb0c51e7cccf3584afde3b1364f6629596186c9025bd54", size = 410889, upload-time = "2026-08-27T10:02:52.51Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/94/60/8366558da954095e04e7fbc351f9387d87a682feaee9a235ceda966f794b/msgpack-1.2.2-cp314-cp314-win32.whl", hash = "sha256:d242f3c4ccf55b056e6cf901720dccde58f1df117898f2bbf3bcd6e38ec7c248", size = 66774, upload-time = "2026-08-27T10:02:53.984Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4b/3d/1ce873c8057c65e4fbb076ffe1c99c9ae39d90a00a2540d7b06c652a292f/msgpack-1.2.2-cp314-cp314-win_amd64.whl", hash = "sha256:1510f24612d4b983dff6935d9273e02c320cfd525727fbcb58836a75f589fdbc", size = 73424, upload-time = "2026-08-27T10:02:55.277Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d5/55/e36f2a33e38657f33850d74e0bf256838a0d45802c298cc501a32bffcc08/msgpack-1.2.2-cp314-cp314-win_arm64.whl", hash = "sha256:7826f16edc763e768404f55605ef85dfcf5857e729c1ed29e0d7c180be4fe6d8", size = 67657, upload-time = "2026-08-27T10:02:56.493Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/64/58/7e764b957bae80ae281a9cb28761068c8bae8d5c6ac0873e43cc69d176c7/msgpack-1.2.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:f466049b8e1ec0854287bbe9a074316826fe0e08dcf707245f98b1ae49e92650", size = 86594, upload-time = "2026-08-27T10:02:57.796Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ae/f0/250f5985b6ee533e60d357571a808aaae03c54118294dc3db7158e27feb1/msgpack-1.2.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1f6b6f8deb07d49090e1808c6ef9cb7d23ca17bef3aa6ed3e5e03df16606e60c", size = 87374, upload-time = "2026-08-27T10:02:59.256Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/bd/2c/126ec8f187877c5f688631c543d1d3a3d75b2e66b83fb9de3ed7c13a39b6/msgpack-1.2.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b542ffc0a5c531eedc40419f291f1bd659aa8d4223408a5b51c88a2796083fd3", size = 428157, upload-time = "2026-08-27T10:03:00.9Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/95/21/d2d81d50aaedb14147d01f22094185794db3ad8a8791b60afacba0627c89/msgpack-1.2.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7d095df2627e5dd59ac7b0c5ad627a671c76e6020171e03cbe4621a61f0562c3", size = 426669, upload-time = "2026-08-27T10:03:02.457Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/fc/f7d484ee5b572719608e7ffad569bea22ff11309a96ca2fae85eec94226b/msgpack-1.2.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ffdd2f4950daf7815490f23087963e3420175b9609520b7ff5df64d351159c22", size = 380625, upload-time = "2026-08-27T10:03:04.244Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0a/c4/b924cbd5516676f4e612329f18602a833bd055ffbe27f808eeba0f01bfea/msgpack-1.2.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:652d1bf13d01bac8fd569def0fe76745e55bcda01e30aa6332d5947ea3788839", size = 411328, upload-time = "2026-08-27T10:03:05.869Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/27/9d/0c1d9683a951a80f270c3b7dac1022c18b9307617344dd44d904135d5e12/msgpack-1.2.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:9bf452ff4d4981f25a18e9476e002bcc9263e7928024aa4d7148e25f7be3f929", size = 377892, upload-time = "2026-08-27T10:03:07.37Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/bb/bf22338cdd22e0b40c8f28468cea5f3d9c320244c095d8303364bc012c41/msgpack-1.2.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:55faa6f8395e23b848c535ad5dcb96b3462f37f5e7f4ac500d500434f7345da7", size = 419426, upload-time = "2026-08-27T10:03:09Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7d/42/6d02c19a01abd8d7ce817c321d2ee6af1a8e24d584dca619d1b6576a83bf/msgpack-1.2.2-cp314-cp314t-win32.whl", hash = "sha256:419a45c67a5c04213172a14b1864657e014665b77d7081b107a51707923dd39e", size = 71810, upload-time = "2026-08-27T10:03:10.498Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/af/df/fda3a204415dab0a8c0db5461ef7205416ea52bd8581c5cafd361be07f3b/msgpack-1.2.2-cp314-cp314t-win_amd64.whl", hash = "sha256:935b1cfad9b908b0fa845010f4271df4c2f04e1cd26e3f18acd61a45f93c9e36", size = 78919, upload-time = "2026-08-27T10:03:12.016Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/63/d4/4b4b0ef25a86deca91feaf7252ca885ba4f2ada40461379120122a04fe96/msgpack-1.2.2-cp314-cp314t-win_arm64.whl", hash = "sha256:11e8c421e117d1c36728b423d0402555cccbf0c6f53e288f0e75b6b12100d70f", size = 71925, upload-time = "2026-08-27T10:03:13.332Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/3b/92/4b44bc8f3243ef8cf9cb5368c17a299d45b9df858f6dfdd98a0482dbbb37/msgpack-1.2.2-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:e1b99ad34613d5f8477fa5cf99bc4eaeaf27965588007c102370cd9a78fe9de5", size = 84293, upload-time = "2026-08-27T10:03:14.718Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/80/05/c992bb65744665a41b5bf531fc0e1619bae0901f57738228ded90023c151/msgpack-1.2.2-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:0fbc1bed8a535389b41882cfae66376e248cd1680eaa94fd83193c73e1d24986", size = 84490, upload-time = "2026-08-27T10:03:16.12Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d7/bf/7f53b9e6709a4df7f9b9b81dc65f9dfaa32caf65bee94986ec2cb8fa07f1/msgpack-1.2.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:06d95f61de7afe4f4ff908a6feebfcb070d0582ac87c9cf3cedf8551cf634516", size = 405332, upload-time = "2026-08-27T10:03:17.692Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d2/5a/305c4dca14b50d0b51fb88ef04ec125b8f0be3e2ce730dcc62dbaa651cc5/msgpack-1.2.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b5c696ae7cd7166b3657261adb855b461ff31f07823fdbae9de8bf80adfccc21", size = 416798, upload-time = "2026-08-27T10:03:19.389Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7a/df/a645102b4cdfd9a94201cac4e900e9c1429fc16d86aa311c06eef82528c9/msgpack-1.2.2-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0708afbf6a9587f0bfe479a9825c141d14d91e2f6a5c8103cf28bc96f4edb5d9", size = 377312, upload-time = "2026-08-27T10:03:20.928Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f4/26/c56d8d086d3fb1077bb48092b158b5ea2eee08b279e10c191275f13bc980/msgpack-1.2.2-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:226a62ffe99fe54c5c61d910ec64c3449b7766c3280bd286bf6c94838dde239a", size = 395182, upload-time = "2026-08-27T10:03:22.571Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4d/b5/3d46ba367a565e536d8d2a61eebcee71b1dc803da3ce74a22313b573d6fa/msgpack-1.2.2-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:9fd7f32e2f0fb334e7ecc5adb5cf0458785bd3a9d9d86f950e1715f101cebce5", size = 377945, upload-time = "2026-08-27T10:03:24.151Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a5/2c/d5d2df273ed5306357da25b69400fd8d7a53c4d87d8976604b677484d61c/msgpack-1.2.2-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:9db1ba1c1e6a84245a9dd866265b56b8a1e9461549cc72ed296d8cbfbd32961b", size = 413341, upload-time = "2026-08-27T10:03:25.85Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1b/fb/32613bced3cad47b40b1b73dd04d687121349d83f748efc2575929121903/msgpack-1.2.2-cp315-cp315-win32.whl", hash = "sha256:e2eb7ea0ac3911a7aac9d8aaa36d40f216d99455b3274cd3fac38181bcd910cf", size = 66730, upload-time = "2026-08-27T10:03:27.294Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/74/56/d86171f7251015e9312e5a7f9fdd4cf89752fc2114b88fed453d2a040c66/msgpack-1.2.2-cp315-cp315-win_amd64.whl", hash = "sha256:9352e6cdb510a7b1a5d3ccaccec730e82e50cf3484a3af7bdaab19e23b9589ff", size = 73477, upload-time = "2026-08-27T10:03:28.615Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/13/1a/56b90f6defef61700b86baca3637c15f62ac0f9b21ab0f16613ab9d1f101/msgpack-1.2.2-cp315-cp315-win_arm64.whl", hash = "sha256:29cc2d5291711a52956a79a51f41c732329df39ad727c886bd8f0b5b9237a808", size = 67660, upload-time = "2026-08-27T10:03:29.895Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/cd/20/12751ca0d8ec874701b54c392c2b19f51af8dd1de40a92a10e356f0aaf58/msgpack-1.2.2-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:d886baa46b2532135e7320067e6a44edb09ba5883a6096b0f9c044533984b8a8", size = 86462, upload-time = "2026-08-27T10:03:31.348Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/91/4c/cf6d12a3d709fe5f9771dd917c35e6ebcd55597a5b792287382fde056c95/msgpack-1.2.2-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:53679573c75cce5f82359e0bd4e6a97809a6b9a9b7a48fd1ba592f4a82cddc84", size = 87412, upload-time = "2026-08-27T10:03:32.74Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ca/0d/0aac5752d1708dcb458f8754db34a4999514db3df2d2b798b9381293f638/msgpack-1.2.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3c247d457ae9079974c7ce3c665396754a6d2baff7eaa51332212a8a5a3f13b", size = 422057, upload-time = "2026-08-27T10:03:34.124Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/81/30/70f281a3685b04aaf235a5237da11b978a02a865a5a479186205177ad676/msgpack-1.2.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:352ed831042549cca8be23780e1fe7c9177e65ff02bf183509c4b4d33f671782", size = 422696, upload-time = "2026-08-27T10:03:35.862Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8a/6d/f76e8425efb0aa38988cd778ae290bfa120491d80d26872d88bb52fedb3f/msgpack-1.2.2-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f80361592c13d7226b4379c8941529b63fe1a9d0e05d2de8f3306b70e522b53f", size = 376495, upload-time = "2026-08-27T10:03:37.339Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/95/77/0809aa9b52b2868f7d01862dc14073708f0440421a65197b48453480034c/msgpack-1.2.2-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:68df2947921d449f6dcfeafd86cb2cdde13327a8b447534bbe4ee5aaf32a5695", size = 404683, upload-time = "2026-08-27T10:03:38.87Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/02/d2/4e5ac915ba120172d210ef00165c5e6276c8a65db3a4a5cf36e946b83e23/msgpack-1.2.2-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:51dd39d23cfdea0400ed3ff2d29d1e83bd951d3aea79dc89be5b701a09edfe23", size = 375087, upload-time = "2026-08-27T10:03:40.486Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/cb/e3/8051d53e5495c87c6cf27eb42fb680361017037f87f322bdaf525f71e4a2/msgpack-1.2.2-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:b13b59e66f107cca1ba708dd5307179870ca1b15b19fcee7ccf722e5308d9212", size = 414421, upload-time = "2026-08-27T10:03:42.308Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ba/4e/13783aa7c17414d7186c72c49bc718366f75e49f0ea58d4f81cb63ac3187/msgpack-1.2.2-cp315-cp315t-win32.whl", hash = "sha256:8c6321a414f8b4a8dc43976b2fa8349156434ca9adedd9a187b796f7e1d3d3fc", size = 71790, upload-time = "2026-08-27T10:03:43.715Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5e/9d/1d02994c7ae2603c98100984428ff0f67443572133bc18eca6058f732c1b/msgpack-1.2.2-cp315-cp315t-win_amd64.whl", hash = "sha256:6f53285f20d592ed309ee19e509cc4c77a3bda1db02ad67e8a0949bb227a5a6d", size = 78766, upload-time = "2026-08-27T10:03:45.036Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/60/54/89ed16e6f966a050dc78b0e94a545025211b07ce9f4bdfe07dff70c03fc2/msgpack-1.2.2-cp315-cp315t-win_arm64.whl", hash = "sha256:a378e12ccc06d76efde115caf4073b7e5ff3cc18291d1341f9e65fb882e3f754", size = 71819, upload-time = "2026-08-27T10:03:46.375Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/27/fd/45f6cd13cefbb659a8e0128ea64d51b349571163fec3c9c20f99792dc42a/msgpack-1.2.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:90cba4996b18ec1201fcaabd01ec48ff4b9755416bcd52105ded2f89fe145c49", size = 91903, upload-time = "2026-10-26T17:54:03.097Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7f/89/169c2a0b1ffeafe68a4f13d8d96b6ed1cd8d40d8262b3a6690851da7eda1/msgpack-1.2.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:112933726919f4239646cca9572e2c2fa5626358c670da8440aac09403100a48", size = 90573, upload-time = "2026-10-26T17:54:04.383Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/cf/8e/272a384f2a001cfced1baab0a8abdd912d6281432670f4609d1aab718d7b/msgpack-1.2.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9ca1e78106675f2aed07dc37b842ce19be70010ab22c5c5c04688f0840d48539", size = 461057, upload-time = "2026-10-26T17:54:05.821Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/1e/d9/f59bd841fc2fd2b74dc50ce85860a6a25f58e588dd48946aeaf2862cf990/msgpack-1.2.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c4d5bbdbea8f5669b3a734d6c226772804fb120848f99cbe63a0ddee63b049c9", size = 475652, upload-time = "2026-10-26T17:54:07.414Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/00/03/afd000e1b1e28fd535dc8c7bc21ebb88923bc1964a2429fe660fb313ace3/msgpack-1.2.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0d9ff7f3aaffd84010f1c501b05406a497584f5cab2f732eb9d89bf960e12f6f", size = 427082, upload-time = "2026-10-26T17:54:09.1Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f7/7a/e2890b272883c496faad777324ddb70e9cc4a6c63731962a4a39a6a40f44/msgpack-1.2.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:aa10dc04c03408f31948ac1896a942141fd8d7a954b3612edac79f19663e4076", size = 451956, upload-time = "2026-10-26T17:54:10.476Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c2/46/0c1b240b8a580af3e72139c33b018025440a1a42c2579e82e39b1195ee36/msgpack-1.2.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:472a25463678f2795143a7cb42e88a1b59cc2375e9881917e69a9323bde42114", size = 423833, upload-time = "2026-10-26T17:54:12.195Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/80/8e/851415b1a9264e6abf64d8a9617d856769d59e247fb9470106f133aedbae/msgpack-1.2.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cbb8a677da3e845713925e9a203b8a120b1e9da9989836890ba4a4a187902701", size = 470951, upload-time = "2026-10-26T17:54:13.764Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c9/74/d75bf61aab9cb88b84f7d3a8eca8dd92e19a742b77ded300a1177e88d031/msgpack-1.2.4-cp312-cp312-win32.whl", hash = "sha256:2b0b7dff5beddc10f16ecea6b28c6b98014d1135d7015bd83adff5037f35848d", size = 68786, upload-time = "2026-10-26T17:54:15.049Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/81/c5/dd0e78eb04f9a0773a810d25ef2cd8f16bb941487567d0c63f814881133c/msgpack-1.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:6e38b123681df22373d545520f54bbeddc4706d9235a1161061f12bd6648497d", size = 77272, upload-time = "2026-10-26T17:54:16.491Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/65/e7/b38f63ae82777c0077daa56c4b09af39d29dcb8927ab2ff59268094069c5/msgpack-1.2.4-cp312-cp312-win_arm64.whl", hash = "sha256:6795c588b210b2f13d62c8fcc23bf779b509b839ec5c197a7ab4f5191459e126", size = 71884, upload-time = "2026-10-26T17:54:17.995Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2d/26/16eaad5fe6e199334fa5bd66070778665717c86e9a273525dc706ddb06a7/msgpack-1.2.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:fb811ac3d463a75013b234d2aae56b9f0bdb0105caf4dd2ee65305b6a8a6078d", size = 92057, upload-time = "2026-10-26T17:54:19.616Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/9c/b8/9660be6d120820bc05106f291e824c73d35f4ab77d927788ae67ea80889c/msgpack-1.2.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:36258fd0909e1bf26e94604439108846432abe4ffa9a23c9dc2f6f1c60f94b60", size = 90542, upload-time = "2026-10-26T17:54:20.965Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6c/10/cd55a69fec29df26884b178dc4b1803442ec82abf929604aac619881917a/msgpack-1.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9c5ba0f053a7e98f013f083c9d1b2dffb26cad8c897c533d8286e44ed24c669", size = 455798, upload-time = "2026-10-26T17:54:22.434Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c9/94/562e0733593a780c70b0b18994f30c205149f7f9f4efbe3e9b00b88612c5/msgpack-1.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7fabd415c41e62006c6641fcdf5b3e866f581c4e11c58328c0d0f69584b9577d", size = 469262, upload-time = "2026-10-26T17:54:24.043Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/bb/92/76d1a5c597e04e1d360b05573d150bdb4502f5a014e6e9cf089c9537c156/msgpack-1.2.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7433d340de45003db3ed909a642c9469b598d175530f7a707cbaba64287d27ce", size = 420789, upload-time = "2026-10-26T17:54:25.587Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8a/c6/b72b8d8022718380db459ced8ffbabc7570ad2d22c7f2fa659c872cb6734/msgpack-1.2.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ccd6e4af5347eb9828147320449bcd30e3321f6397d4583ff16047485dd8be3d", size = 447068, upload-time = "2026-10-26T17:54:27.721Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/cb/dc/f378ef1def4aa135e70325c09e22457f3203ae2a390a192e892267906f33/msgpack-1.2.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:23d1459a1d0b4c9f6629df072d592eb74424b3ed3656b69af507bc9023cc027f", size = 418896, upload-time = "2026-10-26T17:54:29.325Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/62/93/a7e507378f43e91415cb6fda47e0ded0c9de1618a1f4ac4f2887912a92dd/msgpack-1.2.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9e73761fe9fc55a4e9d2df8e8f59b0979231af4dbf80b8bf90cd64c74173d779", size = 465764, upload-time = "2026-10-26T17:54:30.719Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/60/76/7f39f49cbcdaa4aafe64b4941b2640772dbdc1cac3a9332f4c9ba6994da9/msgpack-1.2.4-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:d088d1f552e129859db830692268747aba0a1ee3e6e0fe6344dbb3aab1df9f6c", size = 53615, upload-time = "2026-10-26T17:54:32.213Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/67/9b/85b93350dbd7b52b358882f7f17a88a03664a7a59a359406e6315c162634/msgpack-1.2.4-cp313-cp313-win32.whl", hash = "sha256:892d4f17d7962bfd2c2928b0a47542bf2948f074a7c04721b73d4138b70481e4", size = 68724, upload-time = "2026-10-26T17:54:33.484Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/02/4a/a7e2778ce09a943c17b6f91c7acb2f9488357657c01f2cccb278297621c4/msgpack-1.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:318d4e634d2b320be10decd9968ad1ae0be1d80cba23b5528c37b429eeb0e3e0", size = 77039, upload-time = "2026-10-26T17:54:35.016Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/64/16/9ff7495a9853e9d7de74965fdadce15017e7213ce564bb5dafc5403c9108/msgpack-1.2.4-cp313-cp313-win_arm64.whl", hash = "sha256:bec3e34749b90cfcf116149aad11295c720ff4a74a7d0a35abdb968a396c1524", size = 71873, upload-time = "2026-10-26T17:54:36.19Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/86/34/747f9ea2b428088201c73fcb3a885cebcbedcd71def0f1f3c36896294b27/msgpack-1.2.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:895e9369185df4a874768849405c30cba7990caceb3fcb1692ebe62bb050f55e", size = 92449, upload-time = "2026-10-26T17:54:37.503Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/83/7e/52d208cb1561f869762c17be0e2c004e4d34f2842d239a450492d6246d62/msgpack-1.2.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c97f5f17407e1761f23f1944be33cbf1d5ce67017db32544dcd5e16e0b1b4a3b", size = 91202, upload-time = "2026-10-26T17:54:38.797Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2e/58/5516cabb60da83506024015c669622a0277979aef51eb611308cebaf4cc9/msgpack-1.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2444a4e04f924630d059ae6eae8f91fdfcd28ed9fd17b21bacf4e74550a091f7", size = 455185, upload-time = "2026-10-26T17:54:40.213Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/39/8f/bf975b5d2111e4954a0f8567fc6b60bab22c8766dd4fa509af1334c91a4f/msgpack-1.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5d65b791ce4283e02b6267742ad540899155e1b32887b9cbdda47f38f5a076b5", size = 465078, upload-time = "2026-10-26T17:54:41.971Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/32/2f/c74baeafc53d1c1fadfbeb774444d0e6354778d12b40b827e437a7a35856/msgpack-1.2.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5e4c67dbac05dce90a3fa1d845137617383c415e6b319062baac9734540706ae", size = 420144, upload-time = "2026-10-26T17:54:44.994Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b0/f2/bdf2ce9e284821397dc5549101824c7607ee6ba6e0635390d168a77ac49c/msgpack-1.2.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:781e856db4f2cb398e4992e2a74305295d3ebf694eec26fa0f4bc766eb9fa0a0", size = 446479, upload-time = "2026-10-26T17:54:46.484Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/76/8d/b4572d24bb75d98bcbbd031a934a3a1d03494ea88a100cd51ab16c4c7d57/msgpack-1.2.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:cfc1cc237792f9a5664002b66acb961027d4184528ec9d10e0e42330f7972383", size = 418780, upload-time = "2026-10-26T17:54:48.04Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/55/8e/4493bef4422730cfd3420b84094652fabd27ef8aadc8b443a8995b524d08/msgpack-1.2.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f60de6ae13d4d2a12a483f15c5e47cb6fa2731aa32d92fb31178e2017d6574a8", size = 462009, upload-time = "2026-10-26T17:54:49.433Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/41/29/efdc3d1d09e4e0e45955b0aad559b4c1f5d908767c9fb1021990c52182a5/msgpack-1.2.4-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:06a0657a4110d563255006b7cb7147432f67827144e429c2cdb1c967548d1817", size = 53714, upload-time = "2026-10-26T17:54:50.753Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/df/0b/08794c65e0a752acf20aa44e193e61dfb552b48fe6c27ba6023c146f9e77/msgpack-1.2.4-cp314-cp314-win32.whl", hash = "sha256:727a65b35db9f5ef516fc0229c4b05cab983092b1ae274a8a769b2d517fb0499", size = 70726, upload-time = "2026-10-26T17:54:52.397Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b5/da/e2cc63ec61e7ac05595b391cba01c10cb4657f4e517da1512e4a75d2d12e/msgpack-1.2.4-cp314-cp314-win_amd64.whl", hash = "sha256:80f5d4fda1ba373d95933f98e6c1d18247feffac839fda3930bdd85e6561bb5f", size = 78346, upload-time = "2026-10-26T17:54:54.662Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/93/e4/1b0eb49887009dc2c530171d659cf2aa37202b5f79c0b784e63777554b37/msgpack-1.2.4-cp314-cp314-win_arm64.whl", hash = "sha256:e5f67f0286f2ba2c6dbb4998404ed880112ca204ceda729cf239879cd89d3acf", size = 74152, upload-time = "2026-10-26T17:54:55.915Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d0/4a/6defc8fd0270c4ba675e6625f4f76ce936fd0c48733395fd7ba912cd423e/msgpack-1.2.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:45506bfb902cde24a0d33fb0581f58497ddb2682686dd1f6aa07e7b769df7ca4", size = 94083, upload-time = "2026-10-26T17:54:57.108Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c8/e8/59f7e076739048864710a4de3403ae1c1b43ed5077b796cd9e8cbce9b3f6/msgpack-1.2.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:dc9dc681958e69f46b9f37def3e7fd6cc5dcfaa5943fb00bfe9c223a1a1052f6", size = 95037, upload-time = "2026-10-26T17:54:58.489Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/2c/dd/dbae250b23b831cd0571eb664089f80de3249a39e98c6ef55f9a0efe928d/msgpack-1.2.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0bef691e2a95119cc6bf3ded29325dbd89c4b6f8ff233070431948ed70902421", size = 472722, upload-time = "2026-10-26T17:54:59.924Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a9/e2/383ece1c1b27c1ed322055fce8ab8972bc6d529ede881592065ce0c461bf/msgpack-1.2.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:55e6106d2d085af42b2de72efeb38ed255241a24b32295ca889707c1d679c442", size = 468726, upload-time = "2026-10-26T17:55:01.492Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/37/2f/5410a8815ae74a824ac87543c612e40cb6674851b70a6ad858bb32813203/msgpack-1.2.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:996dfc4774c240c8e6adf1166ae102141cfbed33c8856fde821bd6c0bd35ee41", size = 420488, upload-time = "2026-10-26T17:55:02.848Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/39/8e/16fdf02b4f91dff9c1480433c1bf80756c2fedc0b74fc6a231f02dfed007/msgpack-1.2.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:efa1357fb0c7201e833de28638be371ee127476f7ccff9e7a94211b0afc33ddf", size = 455541, upload-time = "2026-10-26T17:55:04.564Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c4/76/2454ef54d780a167667552d02e7bc977a3d419943bcbdf6a96a4da6786ad/msgpack-1.2.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:b9270b63409e70c8c6deb5faedc81fc27c6bd0196b38084a8773f68286abf034", size = 419514, upload-time = "2026-10-26T17:55:06.257Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ac/8b/2af9bf378def33c24875f250421b0d0b1b06f72a1c2c3f964749fc4cdee1/msgpack-1.2.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:2b597bb01aff61d65e305c2cf2589c93c86609929d42d575bfc359f3c54ea8e1", size = 461910, upload-time = "2026-10-26T17:55:08.05Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/0e/46/a133ac6c4cef4d3939383c00cc19baa16ee85fd70af0c5990e7a9ca8767f/msgpack-1.2.4-cp314-cp314t-win32.whl", hash = "sha256:ad5bc540cbc34db236f8535721a9a872d12a9d88d1322470f1fc7c5e9dadfdb2", size = 76441, upload-time = "2026-10-26T17:55:09.711Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d4/f5/8d22ec454c188f1795107a3fd9f68ada485076ebf394a4aaaa5fbb6093e7/msgpack-1.2.4-cp314-cp314t-win_amd64.whl", hash = "sha256:287e52c2ebaa94f8eca045628374859f51584e77bc07086e6835a9bb2204c774", size = 84321, upload-time = "2026-10-26T17:55:10.947Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/41/52/1390514aee47d14ca3fe6ea0cf236fddc55021867ace30daf8761deba36f/msgpack-1.2.4-cp314-cp314t-win_arm64.whl", hash = "sha256:f3f19fe5decd348b35b003ae5f32d3fa90877413a0183da676f748a3a7ab9270", size = 78589, upload-time = "2026-10-26T17:55:12.425Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d0/d8/0465d475c1a7063af1a1fb4f8c69e0dd661c4dd172055c9757a343a07d5d/msgpack-1.2.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:765584b93ed6f0b561f0c56e9735f24945c0682f857c9b3ee3b4caad9c32f66a", size = 92449, upload-time = "2026-10-26T17:55:13.665Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b2/d0/5220a8a53579dda39f3526394ba5b7eafc28736085f2626deda7fcd22cd1/msgpack-1.2.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:0221748c30ace75fde0dec8c470abe65fb5374cd4f37adb9db6aca7a3c362c0a", size = 91209, upload-time = "2026-10-26T17:55:14.913Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b2/98/f151742eba413503074a10d8f636bf03dd4f3f7cba29689767a35d19bd1c/msgpack-1.2.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c5917972ce1bf5f85f761031e00dab6fe0ad9f880cb3d2d43ed74b330c850400", size = 455713, upload-time = "2026-10-26T17:55:16.406Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b0/54/890510a2c9841aff63258e085d15d4e140c7eef559d4da81ef2d2d867436/msgpack-1.2.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e7ae8cf6012372cecb43016132d1b87ccc2ebb8ae5ab5078687399e82423386a", size = 466177, upload-time = "2026-10-26T17:55:18.351Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/3d/41/a6f20d7c2c380fb072b95ffc5b865a1d62eaf49d77fbee44466c45a1a8de/msgpack-1.2.4-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e78c66cf97ac5675037f705ca433ad98ac9177f9523e7fdbb34e486ae29044c8", size = 424398, upload-time = "2026-10-26T17:55:19.979Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/89/86/fa9559961f2b0d498e6cefa226298ddee2b896cb223449c211702bc34071/msgpack-1.2.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:59887281c3c163a7afff7dffaaad2f78cd2b513b7e1a7843f1ee8e7cd6a94231", size = 445686, upload-time = "2026-10-26T17:55:21.775Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/39/23/5a9d94036cdd77d4310bbb7cfaf3ccd1f087c4a5d5a4befec4361c5fc0dc/msgpack-1.2.4-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:9f46e70c8d22e96856967ab9d80c51dcf5bc63133e4da2d66fab64c0d4119b82", size = 422096, upload-time = "2026-10-26T17:55:24Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/6e/4b/86a5384112509a94ff6e20028aba6845138743effb7c6617e959ad1256ab/msgpack-1.2.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:0a1fd6c31952155b7cd01061288c70303e6554ae855244dfb38a897fd94f8749", size = 463407, upload-time = "2026-10-26T17:55:26.146Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/f4/cf/14db289e0ad531e22ce0f03284865f81d14fbc80bf3f79d3b1714bcf76cf/msgpack-1.2.4-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:b1f08ec826417e3c8dc3edadb50f38debba033af6cb849229f0eac72f80f2342", size = 53743, upload-time = "2026-10-26T17:55:27.497Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/46/72/a76fc90b51503c0bdacbc7fc823aa6fa62d40596ac47f9ea8492d6f95a34/msgpack-1.2.4-cp315-cp315-win32.whl", hash = "sha256:e8ba23c838739fe929e868095171e71f2f38d6ce0fcf5840b576fb82648e58e6", size = 70780, upload-time = "2026-10-26T17:55:28.705Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/58/a7/fa9d4a1b5dfead83ea6e03b4007041a5da988c25eb941d42612e0211d3c0/msgpack-1.2.4-cp315-cp315-win_amd64.whl", hash = "sha256:67310606cf2528a6dc3ece1298dcd5cc6c57add148b16d22c5111138aa84820c", size = 78288, upload-time = "2026-10-26T17:55:29.928Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b5/f3/8163d7938a8fe003952fe2719ddb31da71998559bbe290c55ffe622b886b/msgpack-1.2.4-cp315-cp315-win_arm64.whl", hash = "sha256:ce76e7a7c11459157887a8dadf07c107ff74eca98cf914f0de6ee7ab4b47104d", size = 74235, upload-time = "2026-10-26T17:55:31.112Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b4/fa/37c3219b250d81bee788c0dd78ae2fc673db2da1c21ae51f7982d85698f7/msgpack-1.2.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:fb9ddbf23b8c6e89752af399fcf4daed60055e239cda44c6acfaa76d19331e8c", size = 93793, upload-time = "2026-10-26T17:55:32.304Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/83/9f/b8afcd20d32cf4be1fa3c327e997656d6d446e667452b0fcc66b91710e82/msgpack-1.2.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:e283cf563166c21762131b88e3870ee2ec57757b08a8736929757b5a67541061", size = 94746, upload-time = "2026-10-26T17:55:33.624Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/e6/4f/03348d381fcbbc2685356833408cc7e9d2af0fe0775926935a2889650f64/msgpack-1.2.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40e91bf8325f492e8eb3c3aa6de06b20593c225336bb52b585c913d7c1da025b", size = 468480, upload-time = "2026-10-26T17:55:34.991Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/16/46/e54af8d9a51fb562e068e69a0d75a51e9c2fedec49f911f888515f5477ab/msgpack-1.2.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cfa86432bf329d6b976f5a00ad4c9064fd51736e4967a52526750236345cc2da", size = 470064, upload-time = "2026-10-26T17:55:36.615Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/74/f5/8f9a6b3af1d803e832b11017c8dad44d761fefdb91dba04ee58cb51838da/msgpack-1.2.4-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:42e0a7dc26df739149478585d4264338b4d330f24b3e3b57d5aa89e48866e8ab", size = 421267, upload-time = "2026-10-26T17:55:38.076Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/4b/8f/7302b0d18eadbbfef9be1dbbdc49905f7f3b847200c3e47068d093976be4/msgpack-1.2.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:8e680367090a58c966052d61418cc943111863538fd82471d61fca5271d911e1", size = 451244, upload-time = "2026-10-26T17:55:39.639Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/36/c6/05717fb56b510b5e974446f2cb8e9b26fa4347fafc0c5927745b176939b3/msgpack-1.2.4-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:a6c9926f8871b261622fe6b599db72c69be5bca8fdc0976886f9a531a301dee9", size = 420273, upload-time = "2026-10-26T17:55:41.488Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/05/d9/a19077d664c37319097e16ba8de14e6b3a2edcc8ee78a2069c0808e38960/msgpack-1.2.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:c50bac325dbf1a9c80e10da6dbd1100d7082f6b12e153084501e18e86cd3a037", size = 460421, upload-time = "2026-10-26T17:55:43.223Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/a2/bd/0e2033a7435f8d2311be37363fedc88bdfa9fd95c364ee8ac3216eb63e36/msgpack-1.2.4-cp315-cp315t-win32.whl", hash = "sha256:34051de19ae532ba47fcab5b0abd08c25c7a64ff763ad819f18764d45f3c2c81", size = 76256, upload-time = "2026-10-26T17:55:44.588Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/b3/3f/aa7265f25dafb6af7567a1a7d0a95c5566803db2226c5e084dc5850cfd96/msgpack-1.2.4-cp315-cp315t-win_amd64.whl", hash = "sha256:6ad2f0808099d4281208ff2c756efa958a55a7c8eb21fe1c7052b95c584f02f1", size = 83939, upload-time = "2026-10-26T17:55:45.773Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/bf/f2/c53904c4bc3da828fb75678bf489ece808a277affa73f8a7a91dfb7c5851/msgpack-1.2.4-cp315-cp315t-win_arm64.whl", hash = "sha256:e38d854f1c60e94f46d998765201126338bde3fe1b029be0d849094bcbef72c2", size = 77995, upload-time = "2026-10-26T17:55:47.016Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in new issue
Block a user