Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
Python agentic-aiai-securityalert-triageblue-teamcybersecuritydetection-engineeringincident-responselanggraphllm-agentsmcpmitre-attackmodel-context-protocolpurple-teamsecurity-operationsself-hostedsiemsoarsocthreat-detectionthreat-intelligence
feat(connectors): add Qualys, Rapid7-class vuln, GreyNoise, JumpCloud, Darktrace, Imperva (Wave 3a) (#536)
Beenu Arora8c9339d90b21
diff --git a/README.md b/README.mdindex 95f7f1e2a..c90554667 100644--- a/README.md+++ b/README.md@@ -174,7 +174,7 @@ A handful of headline capabilities — the rest are catalogued in [`apps/docs/do> **Maturity (v7.6.0 — Fully-Operational release).** The end-to-end spine is wired and CI-gated: ingest → ClickHouse lake → live detection → fused alert → auto-triage → governed response. Connectors, Investigation Rail + Ledger, Hunt-as-Code, live-stream detection, and copilot auto-triage are GA. Autonomous *response* defaults to copilot/dry-run (an autonomy policy governs every real execution). The live-agent LLM benchmark is preview (the deterministic-tier scoreboard is CI-gated per PR); substrate eval suites are GA. Every product claim is backed by a failing test — [claim-to-gate matrix](docs/audit/CLAIM_TO_GATE_MATRIX.md): 33 GATED / 7 PARTIAL / 0 NO GATE. Full per-claim status: [`docs/audit/REALITY_REPORT.md`](docs/audit/REALITY_REPORT.md).-- **78 click-and-connect data connectors** (EDR/XDR, SIEM, NDR, cloud, CNAPP, identity, SaaS, VCS, K8s audit, network) with schema-driven config, live `Test connection`, and vault-encrypted secrets — now including IBM QRadar, Exabeam, Securonix, Devo, Netskope, Windows/Sysmon (WEF), Zeek/Suricata NDR, a generic syslog/CEF listener, and an AI/LLM-usage audit connector. Walkthrough: [`apps/docs/docs/connectors/index.md`](apps/docs/docs/connectors/index.md).+- **83 click-and-connect data connectors** (EDR/XDR, SIEM, NDR, cloud, CNAPP, identity, SaaS, VCS, K8s audit, network) with schema-driven config, live `Test connection`, and vault-encrypted secrets — now including IBM QRadar, Exabeam, Securonix, Devo, Netskope, Windows/Sysmon (WEF), Zeek/Suricata NDR, a generic syslog/CEF listener, and an AI/LLM-usage audit connector. Walkthrough: [`apps/docs/docs/connectors/index.md`](apps/docs/docs/connectors/index.md).- **End-to-end SIEM spine** — a cold `docker compose up` ingests connector data → lands it in the ClickHouse event lake → the executable detection corpus (947 rules) fires on the live stream → a fused alert is created, all asserted by an extended integration gate. [`apps/docs/docs/architecture.md`](apps/docs/docs/architecture.md).- **Autonomous triage + governed response** — every fused alert is auto-triaged by the agent (copilot/read-only by default); approved actions execute against real connector credentials through a per-action, blast-radius-scoped autonomy policy with real rollback + post-action verification. [`apps/docs/docs/concepts/automation-maturity.md`](apps/docs/docs/concepts/automation-maturity.md).- **Advanced Data Explorer** — one investigation surface (NL + SQL over the lake, plus pivots to identity/graph/intel), replacing the SIEM context-switch. `/explore`.diff --git a/RELEASES.md b/RELEASES.mdindex 21a64b9f3..7de112b8b 100644--- a/RELEASES.md+++ b/RELEASES.md@@ -82,7 +82,7 @@ The full inventory (every file, env-var, and test count) lives under `[7.6.0]` i- First community contribution merged: [#135](https://github.com/beenuar/AiSOC/pull/135) (UEBA env-var alignment, closes [#134](https://github.com/beenuar/AiSOC/issues/134)). Every UEBA variable accepts both unprefixed (`DATABASE_URL`) and legacy (`UEBA_DATABASE_URL`) forms; unprefixed wins.**Stage 2 / Stage 3 platform additions** — landed alongside the architectural foundation above.-- **Wazuh Indexer ingest connector** — polls `wazuh-alerts-*` over HTTPX, paginates time-windowed queries, retries on 5xx; collapses Wazuh severity into the AiSOC ladder. Docs: [`apps/docs/docs/connectors/wazuh.md`](apps/docs/docs/connectors/wazuh.md). The connector registry now declares **78 first-party connectors**.+- **Wazuh Indexer ingest connector** — polls `wazuh-alerts-*` over HTTPX, paginates time-windowed queries, retries on 5xx; collapses Wazuh severity into the AiSOC ladder. Docs: [`apps/docs/docs/connectors/wazuh.md`](apps/docs/docs/connectors/wazuh.md). The connector registry now declares **83 first-party connectors**.- **auditd `file_tail` connector + `aisoc.rules` profile** — replaces the host-agent dependency for Linux endpoint visibility; 4 new detections pivot on the bundled `aisoc_*` audit keys. Docs: [`apps/docs/docs/connectors/auditd.md`](apps/docs/docs/connectors/auditd.md).- **Live Actions dispatcher** — generic vendor/capability surface so plugins can register executors against the in-tree taxonomy (`isolate_host`, `disable_user`, `block_ip`, …) without forking. Unknown pairs return a typed `LiveActionResult(FAILED, "executor_not_found")` — never a 500. Docs: [`apps/docs/docs/concepts/live-actions.md`](apps/docs/docs/concepts/live-actions.md).- **Deterministic NL → ES|QL / KQL / SPL translator** — replaces the template fallback in `/nl_query` with an IR + grammar validator; 50-pair gold eval set scores 100% syntactic, 100% semantic. Air-gapped by default; optional `gpt-4o-mini` enhancement falls back deterministically.@@ -91,7 +91,7 @@ The full inventory (every file, env-var, and test count) lives under `[7.6.0]` i- **Azure Container Apps + Postgres Flexible Server Terraform skeleton** — file-for-file mirror of the GCP skeleton for teams standardised on Azure. Container Apps for the three customer-visible services, VNet-integrated Postgres 16 + Azure Cache for Redis on private endpoints, Key Vault for secrets, ACR for images, and per-service user-assigned managed identities so each app pulls its own image and reads only its own secrets. Docs: [`apps/docs/docs/deployment/azure.md`](apps/docs/docs/deployment/azure.md).- **Blameless case post-mortem endpoint** — `GET /api/v1/cases/{case_id}/postmortem?format=json|html` produces a deterministic retrospective covering contributing factors, detection timing/gaps, response phases, blast radius, and action items. Analyst handles are explicitly redacted from the narrative. Docs: [`apps/docs/docs/operations/case-reports.md`](apps/docs/docs/operations/case-reports.md).- **Per-rule cross-fire FP gate** — `services/agents/tests/test_detection_fp_rate.py` replays every rule's `match_when` against every *other* rule's positive fixture; current corpus 816 native rules, worst FPR 0.49% (5% ceiling). Wired into `scripts/run_evals.py` as `suites.detection_fp_rate`.-- **Operator-facing documentation refresh** — new pages for [notifications](apps/docs/docs/operations/notifications.md), [plugin lifecycle](apps/docs/docs/plugins/lifecycle.md), and [credentials / vault rotation](apps/docs/docs/operations/credentials.md); v2.2 architecture diagram and the corrected **78-connector count** (now including Wazuh Indexer + auditd `file_tail`) rolled through every surface.+- **Operator-facing documentation refresh** — new pages for [notifications](apps/docs/docs/operations/notifications.md), [plugin lifecycle](apps/docs/docs/plugins/lifecycle.md), and [credentials / vault rotation](apps/docs/docs/operations/credentials.md); v2.2 architecture diagram and the corrected **83-connector count** (now including Wazuh Indexer + auditd `file_tail`) rolled through every surface.The full inventory (with file paths, env-var changes, and test counts) lives in the `[7.4.0]` section of [`CHANGELOG.md`](CHANGELOG.md).diff --git a/ROADMAP.md b/ROADMAP.mdindex a11e17199..0cc54b728 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -445,7 +445,7 @@ Terraform skeleton equivalent to the existing AWS module.off `auditd_key` for sudoers / SSH / kernel-module / systemdtampering. 444-test full connectors suite green (excluding`test_scheduler.py` which needs the `apscheduler` dev dep).-- [x] Connector registry now declares **78 first-party connectors**;+- [x] Connector registry now declares **83 first-party connectors**;`pnpm marketplace:sync` rebuilt `marketplace/index.json` +`apps/web/public/marketplace/index.json`.diff --git a/apps/docs/docs/architecture.md b/apps/docs/docs/architecture.mdindex 55bee68ec..76f6db3c2 100644--- a/apps/docs/docs/architecture.md+++ b/apps/docs/docs/architecture.md@@ -81,7 +81,7 @@ The v1.5 release ships from a review of G2, Gartner Peer Insights, and customer- **Automated compliance evidence** — `services/api/app/api/v1/endpoints/compliance.py` collects point-in-time evidence for SOC 2 / ISO 27001 / NIST CSF / PCI-DSS / HIPAA / DORA.- **AI-generated incident reports** — one-click "Export Report" on every case generates a PDF incident report from the Investigation Ledger.- **Air-gap deployment configuration** — `services/api/app/api/v1/endpoints/deployment.py` exposes air-gap mode toggles for tenants that disallow external feeds.-- **Connector catalog growth** — SentinelOne, Cortex XDR / XSIAM, Wiz, Snyk, Zscaler, Proofpoint, ServiceNow, Jira, 1Password, Duo Security, Carbon Black, Chronicle, Cisco Umbrella, CrowdStrike, Datadog Cloud SIEM, Elastic, Mimecast, Okta, Rapid7 InsightIDR, Salesforce, Microsoft Sentinel, Splunk, Sumo Logic, Tenable, Trellix Helix, Trend Vision One, and more. **The catalog is now 78 connectors** across EDR, SIEM, cloud, identity, SaaS, network, and email categories. See [Connectors](./connectors/).+- **Connector catalog growth** — SentinelOne, Cortex XDR / XSIAM, Wiz, Snyk, Zscaler, Proofpoint, ServiceNow, Jira, 1Password, Duo Security, Carbon Black, Chronicle, Cisco Umbrella, CrowdStrike, Datadog Cloud SIEM, Elastic, Mimecast, Okta, Rapid7 InsightIDR, Salesforce, Microsoft Sentinel, Splunk, Sumo Logic, Tenable, Trellix Helix, Trend Vision One, and more. **The catalog is now 83 connectors** across EDR, SIEM, cloud, identity, SaaS, network, and email categories. See [Connectors](./connectors/).## Connector polling and credential vaultdiff --git a/apps/docs/docs/connectors/api-coverage.md b/apps/docs/docs/connectors/api-coverage.mdindex b38e00fd4..92ace7b8f 100644--- a/apps/docs/docs/connectors/api-coverage.md+++ b/apps/docs/docs/connectors/api-coverage.md@@ -27,7 +27,7 @@ This page is the canonical "what works where" reference. It is generated from thWhen a capability is not listed for a connector, the connector simply does not support it today — it is **not** a misconfiguration to surface. Adding a capability requires an explicit code change in that connector's `capabilities()` classmethod and matching method implementation.-## Coverage table — 78 connectors+## Coverage table — 83 connectorsThe matrix below is grouped by category. `OAuth (hosted)` indicates the connector is wired into the hosted OAuth marketplace flow (no client secret in tenant config). `Federated search` means the connector participates in the federated-query planner.diff --git a/apps/docs/docs/connectors/endpoint-decision-matrix.md b/apps/docs/docs/connectors/endpoint-decision-matrix.mdindex d1d832b34..1bb58e21d 100644--- a/apps/docs/docs/connectors/endpoint-decision-matrix.md+++ b/apps/docs/docs/connectors/endpoint-decision-matrix.md@@ -189,7 +189,7 @@ can ingest today.## Related-- [Connectors overview](/docs/connectors) — the full 78-connector catalog.+- [Connectors overview](/docs/connectors) — the full 83-connector catalog.- [Hello, connector tutorial](/docs/connectors/hello-connector) — write yourown if none of these fit.- [Detection coverage](/docs/detections/coverage) — which endpoint detectionsdiff --git a/apps/docs/docs/connectors/index.md b/apps/docs/docs/connectors/index.mdindex 1b244846d..24092da6a 100644--- a/apps/docs/docs/connectors/index.md+++ b/apps/docs/docs/connectors/index.md@@ -18,7 +18,7 @@ If your tool isn't in the catalog, see [Universal capture](/docs/connectors/univ## Catalog-The catalog ships with **78 connectors** out of the box, registered in [`services/connectors/app/connectors/__init__.py`](https://github.com/beenuar/AiSOC/blob/main/services/connectors/app/connectors/__init__.py). The list below is grouped by category; only a subset has dedicated walkthrough pages today (linked entries) — the rest follow the same schema-driven wizard described under [Adding a connector](#adding-a-connector).+The catalog ships with **83 connectors** out of the box, registered in [`services/connectors/app/connectors/__init__.py`](https://github.com/beenuar/AiSOC/blob/main/services/connectors/app/connectors/__init__.py). The list below is grouped by category; only a subset has dedicated walkthrough pages today (linked entries) — the rest follow the same schema-driven wizard described under [Adding a connector](#adding-a-connector).### Identitydiff --git a/apps/docs/docs/intro.md b/apps/docs/docs/intro.mdindex 6a55ca71f..36fb22875 100644--- a/apps/docs/docs/intro.md+++ b/apps/docs/docs/intro.md@@ -47,7 +47,7 @@ for the full list.## Capabilities-- **Click-and-connect cloud connectors** — pick from a **78-connector** catalog spanning EDR, SIEM, cloud, IAM, SaaS, VCS, network, ITSM, vuln, and email-security sources (CrowdStrike, SentinelOne, Cortex XDR, Splunk, Microsoft Sentinel, AWS Security Hub, Defender XDR, GCP Cloud Audit, GCP SCC, M365, Entra ID, Azure Activity, Google Workspace, Okta, Duo Security, Cloudflare, Tailscale, GitHub, Wiz, Snyk, Zscaler, Proofpoint, ServiceNow, Jira, 1Password, **Wazuh Indexer**, **auditd `file_tail`**, and 25 more — see [Architecture](./architecture)). Fill a schema-driven form, click `Test connection` for a live auth round-trip, and `Save & enable`. Secrets are encrypted at the application layer with a Fernet [`CredentialVault`](./operations/credentials) before they hit Postgres; an in-process APScheduler polls each enabled instance and pushes normalized OCSF events through to the ingest spine. Setup walkthroughs: [docs/connectors](./connectors).+- **Click-and-connect cloud connectors** — pick from a **83-connector** catalog spanning EDR, SIEM, cloud, IAM, SaaS, VCS, network, ITSM, vuln, and email-security sources (CrowdStrike, SentinelOne, Cortex XDR, Splunk, Microsoft Sentinel, AWS Security Hub, Defender XDR, GCP Cloud Audit, GCP SCC, M365, Entra ID, Azure Activity, Google Workspace, Okta, Duo Security, Cloudflare, Tailscale, GitHub, Wiz, Snyk, Zscaler, Proofpoint, ServiceNow, Jira, 1Password, **Wazuh Indexer**, **auditd `file_tail`**, and 25 more — see [Architecture](./architecture)). Fill a schema-driven form, click `Test connection` for a live auth round-trip, and `Save & enable`. Secrets are encrypted at the application layer with a Fernet [`CredentialVault`](./operations/credentials) before they hit Postgres; an in-process APScheduler polls each enabled instance and pushes normalized OCSF events through to the ingest spine. Setup walkthroughs: [docs/connectors](./connectors).- **Investigation Ledger** — every prompt, response, evidence citation, and tool call the agent emits is logged step-by-step and replayable on each case.- **Public eval harness** — alert reduction (a real measurement on a fixed noisy stream) plus MITRE-tactic, investigation-completeness, and response-quality substrate self-consistency gates. Reproducible with one command and run in CI on every PR. The [eval harness page](./benchmark) documents what each suite does and does not measure.- **Ambient Copilot** — context-aware next-action suggestions on every alert, case, rule, and playbook page; one click runs the right agent tool with the right payload.diff --git a/apps/web/src/data/connector-count.json b/apps/web/src/data/connector-count.jsonindex 21ecb9571..00213c881 100644--- a/apps/web/src/data/connector-count.json+++ b/apps/web/src/data/connector-count.json@@ -1,12 +1,12 @@{- "count": 78,+ "count": 83,"categories": {- "cloud": 14,+ "cloud": 15,"edr": 10,- "iam": 6,- "ndr": 1,- "network": 6,- "saas": 21,+ "iam": 7,+ "ndr": 2,+ "network": 7,+ "saas": 22,"siem": 17,"vcs": 3},diff --git a/docs/architecture/SYSTEM_DESIGN.md b/docs/architecture/SYSTEM_DESIGN.mdindex 95caff05f..dc99f258a 100644--- a/docs/architecture/SYSTEM_DESIGN.md+++ b/docs/architecture/SYSTEM_DESIGN.md@@ -20,7 +20,7 @@ This document describes the end-to-end architecture of the AiSOC platform after┌─────────────────┐ ┌──────────────────────┐│ services/api │ │ services/connectors ││ inbox tokens + │ │ APScheduler poll │- │ HMAC webhooks │ │ 78 connector classes│+ │ HMAC webhooks │ │ 83 connector classes││ CEF / HEC / DNS│ │ push_case + status │└────────┬────────┘ └──────────┬───────────┘│ │@@ -91,7 +91,7 @@ This document describes the end-to-end architecture of the AiSOC platform after| `services/enrichment` | Go 1.21 | Per-IOC TTL-cached enrichment lookups | n/a || `services/fusion` | Python 3.11 | Simhash dedup → correlation → ML scoring → publish fused alerts | Background ML retrain on feedback || `services/api` | Python 3.11 | REST + WS, RBAC, case mgmt, rule engine, graph queries, ITSM webhook inbox, case fan-out | Schema migrations on boot |-| `services/connectors` | Python 3.11 | 78 connector classes, APScheduler poll, `push_case` / `push_status_change` for Jira & ServiceNow | CredentialVault decrypt at poll time |+| `services/connectors` | Python 3.11 | 83 connector classes, APScheduler poll, `push_case` / `push_status_change` for Jira & ServiceNow | CredentialVault decrypt at poll time || `services/agents` | Python 3.11 | LangGraph multi-agent investigation runs | Loads full ATT&CK STIX bundle on boot, optional Qdrant embed || `services/actions` | Python 3.11 | SOAR action execution with blast-radius gating | Approval workflows || `services/threatintel` | Python 3.11 | IOC/actor search API | APScheduler poll loop for TAXII/MISP/OTX/KEV |@@ -314,7 +314,7 @@ The following subsystems were added on top of the v2 design described above. The### 12.1 Connector Platform (`services/connectors`)-A first-class, in-process polling tier with **78 registered connector classes** spanning seven categories — `edr`, `siem`, `cloud`, `iam`, `saas`, `vcs`, `network`. Every connector subclasses `BaseConnector` and declares:+A first-class, in-process polling tier with **83 registered connector classes** spanning seven categories — `edr`, `siem`, `cloud`, `iam`, `saas`, `vcs`, `network`. Every connector subclasses `BaseConnector` and declares:* `schema()` — self-describing `ConnectorSchema(name, label, category, fields, oauth, default_poll_interval_seconds)` consumed by the web console for the connect form.* `capabilities()` — tuple of `Capability` enum values (`PULL_ALERTS`, `PUSH_CASE`, `PUSH_STATUS`, `FEDERATED_SEARCH`, …) that the orchestrator inspects at runtime.diff --git a/docs/connectors/conformance-matrix.md b/docs/connectors/conformance-matrix.mdindex 2e91f164c..ad6ab4ec0 100644--- a/docs/connectors/conformance-matrix.md+++ b/docs/connectors/conformance-matrix.md@@ -6,7 +6,7 @@> async coroutines, valid capabilities, secret fields marked `secret`).> Live-vendor sandbox smoke is a separate wave; this gates the contract.-**78 / 78 connectors conform** to the runtime contract.+**83 / 83 connectors conform** to the runtime contract.| connector | category | fields | vaulted | caps | test_connection | fetch_alerts | normalize ||-----------|----------|-------:|--------:|-----:|:---------------:|:------------:|:---------:|@@ -30,6 +30,7 @@| cortex_xdr | edr | 3 | 2 | 3 | ✅ | ✅ | ✅ || cortex_xsiam | siem | 3 | 2 | 5 | ✅ | ✅ | ✅ || crowdstrike | edr | 3 | 1 | 6 | ✅ | ✅ | ✅ |+| darktrace | ndr | 4 | 2 | 3 | ✅ | ✅ | ✅ || datadog | siem | 5 | 2 | 4 | ✅ | ✅ | ✅ || datadog_cloud_siem | siem | 3 | 2 | 5 | ✅ | ✅ | ✅ || devo | siem | 3 | 1 | 2 | ✅ | ✅ | ✅ |@@ -45,7 +46,10 @@| github | vcs | 2 | 1 | 2 | ✅ | ✅ | ✅ || gitlab | vcs | 3 | 1 | 2 | ✅ | ✅ | ✅ || google_workspace | saas | 2 | 1 | 1 | ✅ | ✅ | ✅ |+| greynoise | saas | 2 | 1 | 2 | ✅ | ✅ | ✅ |+| imperva | network | 3 | 1 | 3 | ✅ | ✅ | ✅ || jira | saas | 3 | 1 | 3 | ✅ | ✅ | ✅ |+| jumpcloud | iam | 1 | 1 | 2 | ✅ | ✅ | ✅ || kubernetes_audit | cloud | 5 | 1 | 2 | ✅ | ✅ | ✅ || lacework | cloud | 4 | 1 | 5 | ✅ | ✅ | ✅ || llm_usage | saas | 2 | 1 | 2 | ✅ | ✅ | ✅ |@@ -63,6 +67,7 @@| prisma_cloud | cloud | 4 | 1 | 1 | ✅ | ✅ | ✅ || proofpoint | saas | 2 | 1 | 1 | ✅ | ✅ | ✅ || qradar | siem | 3 | 1 | 2 | ✅ | ✅ | ✅ |+| qualys | cloud | 3 | 1 | 3 | ✅ | ✅ | ✅ || rapid7_insightidr | siem | 2 | 1 | 4 | ✅ | ✅ | ✅ || salesforce | saas | 4 | 2 | 4 | ✅ | ✅ | ✅ || securonix | siem | 3 | 1 | 2 | ✅ | ✅ | ✅ |diff --git a/services/connectors/app/connectors/__init__.py b/services/connectors/app/connectors/__init__.pyindex 9d7f41583..e1f0617db 100644--- a/services/connectors/app/connectors/__init__.py+++ b/services/connectors/app/connectors/__init__.py@@ -37,6 +37,7 @@ from app.connectors.confluence_audit import ConfluenceAuditConnectorfrom app.connectors.cortex_xdr import CortexXDRConnectorfrom app.connectors.cortex_xsiam import CortexXSIAMConnectorfrom app.connectors.crowdstrike import CrowdStrikeConnector+from app.connectors.darktrace import DarktraceConnectorfrom app.connectors.datadog import DatadogConnectorfrom app.connectors.datadog_cloud_siem import DatadogCloudSIEMConnectorfrom app.connectors.devo import DevoConnector@@ -52,7 +53,10 @@ from app.connectors.gcp_scc import GCPSCCConnectorfrom app.connectors.github import GitHubConnectorfrom app.connectors.gitlab import GitLabConnectorfrom app.connectors.google_workspace import GoogleWorkspaceConnector+from app.connectors.greynoise import GreyNoiseConnector+from app.connectors.imperva import ImpervaConnectorfrom app.connectors.jira_connector import JiraConnector+from app.connectors.jumpcloud import JumpCloudConnectorfrom app.connectors.kubernetes_audit import KubernetesAuditConnectorfrom app.connectors.lacework import LaceworkConnectorfrom app.connectors.llm_usage import LlmUsageConnector@@ -70,6 +74,7 @@ from app.connectors.pagerduty import PagerDutyConnectorfrom app.connectors.prisma_cloud import PrismaCloudConnectorfrom app.connectors.proofpoint import ProofpointConnectorfrom app.connectors.qradar import QRadarConnector+from app.connectors.qualys import QualysConnectorfrom app.connectors.rapid7_insightidr import Rapid7InsightIDRConnectorfrom app.connectors.salesforce import SalesforceConnectorfrom app.connectors.securonix import SecuronixConnector@@ -123,6 +128,7 @@ _CONNECTOR_CLASSES: tuple[type[BaseConnector], ...] = (CortexXDRConnector,CortexXSIAMConnector,CrowdStrikeConnector,+ DarktraceConnector,DatadogConnector,DatadogCloudSIEMConnector,DevoConnector,@@ -138,7 +144,10 @@ _CONNECTOR_CLASSES: tuple[type[BaseConnector], ...] = (GitHubConnector,GitLabConnector,GoogleWorkspaceConnector,+ GreyNoiseConnector,+ ImpervaConnector,JiraConnector,+ JumpCloudConnector,KubernetesAuditConnector,LaceworkConnector,LlmUsageConnector,@@ -156,6 +165,7 @@ _CONNECTOR_CLASSES: tuple[type[BaseConnector], ...] = (PrismaCloudConnector,ProofpointConnector,QRadarConnector,+ QualysConnector,Rapid7InsightIDRConnector,SalesforceConnector,SecuronixConnector,diff --git a/services/connectors/app/connectors/darktrace.py b/services/connectors/app/connectors/darktrace.pynew file mode 100644index 000000000..8451b6568--- /dev/null+++ b/services/connectors/app/connectors/darktrace.py@@ -0,0 +1,111 @@+"""Darktrace connector.++Pulls model breaches from the Darktrace Threat Visualizer API as an alert+stream. Darktrace signs each request with an HMAC-SHA1 of+``requestPath\\npublicToken\\ndate`` using the private token (DTAPI scheme).+"""++from __future__ import annotations++import hashlib+import hmac+from datetime import UTC, datetime+from typing import Any++import httpx+import structlog++from app.connectors.base import BaseConnector, Capability, ConnectorSchema, Field++logger = structlog.get_logger()+++class DarktraceConnector(BaseConnector):+ connector_id = "darktrace"+ connector_name = "Darktrace"+ connector_category = "ndr"++ @classmethod+ def schema(cls) -> ConnectorSchema:+ return ConnectorSchema(+ connector_id=cls.connector_id,+ connector_name=cls.connector_name,+ category=cls.connector_category,+ description="Darktrace NDR model breaches as alerts (Threat Visualizer API).",+ docs_url="/docs/connectors/darktrace",+ fields=[+ Field("base_url", "string", "Appliance URL", placeholder="https://darktrace.example.com"),+ Field("public_token", "secret", "Public Token"),+ Field("private_token", "secret", "Private Token"),+ Field(+ "ssl_verify",+ "boolean",+ "Verify SSL certificate",+ required=False,+ default=True,+ help_text="Disable only for self-signed certificates on a private appliance.",+ ),+ ],+ )++ @classmethod+ def capabilities(cls) -> tuple[Capability, ...]:+ return (Capability.PULL_ALERTS, Capability.PIVOT_HOST, Capability.PIVOT_IP)++ def __init__(self, base_url: str, public_token: str, private_token: str, ssl_verify: bool = True):+ self._base = base_url.rstrip("/")+ self._public = public_token+ self._private = private_token+ self._ssl_verify = ssl_verify++ def _signed_headers(self, request_path: str) -> dict[str, str]:+ date = datetime.now(UTC).strftime("%Y%m%dT%H%M%S")+ # DTAPI request signature — HMAC (not password hashing), the vendor scheme.+ message = f"{request_path}\n{self._public}\n{date}"+ signature = hmac.new(self._private.encode(), message.encode(), hashlib.sha1).hexdigest()+ return {"DTAPI-Token": self._public, "DTAPI-Date": date, "DTAPI-Signature": signature}++ async def test_connection(self) -> dict[str, Any]:+ path = "/status"+ try:+ async with httpx.AsyncClient(timeout=15.0, verify=self._ssl_verify) as client:+ resp = await client.get(f"{self._base}{path}", headers=self._signed_headers(path))+ return {"success": resp.status_code < 400, "connector": self.connector_id}+ except Exception as exc:+ logger.warning("darktrace.test_connection.failed", error=str(exc))+ return {"success": False, "connector": self.connector_id, "error": str(exc)}++ async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:+ path = "/modelbreaches"+ query = f"?minscore=0.3&starttime={int((datetime.now(UTC).timestamp() - max(1, since_seconds)) * 1000)}"+ try:+ async with httpx.AsyncClient(timeout=30.0, verify=self._ssl_verify) as client:+ resp = await client.get(f"{self._base}{path}{query}", headers=self._signed_headers(path + query))+ resp.raise_for_status()+ breaches = resp.json()+ except Exception as exc:+ logger.warning("darktrace.fetch_failed", error=str(exc))+ return []+ return [self.normalize(b) for b in breaches if isinstance(b, dict)]++ def normalize(self, raw: dict[str, Any]) -> dict[str, Any]:+ if isinstance(raw, dict) and "raw_event" in raw and raw.get("source") == self.connector_id:+ return raw+ try:+ score = float(raw.get("score", 0.0))+ except (TypeError, ValueError):+ score = 0.0+ severity = "critical" if score >= 0.9 else ("high" if score >= 0.7 else ("medium" if score >= 0.4 else "low"))+ model = (raw.get("model") or {}).get("then", {}) if isinstance(raw.get("model"), dict) else {}+ device = raw.get("device") or {}+ return {+ "source": self.connector_id,+ "external_id": str(raw.get("pbid") or ""),+ "title": model.get("name") or "Darktrace model breach",+ "description": model.get("description") or "",+ "severity": severity,+ "src_ip": device.get("ip") if isinstance(device, dict) else None,+ "hostname": device.get("hostname") if isinstance(device, dict) else None,+ "raw_event": raw,+ "created_at": raw.get("time"),+ }diff --git a/services/connectors/app/connectors/greynoise.py b/services/connectors/app/connectors/greynoise.pynew file mode 100644index 000000000..846621b2e--- /dev/null+++ b/services/connectors/app/connectors/greynoise.py@@ -0,0 +1,95 @@+"""GreyNoise connector.++Pulls recently-observed malicious IPs (GNQL query) from the GreyNoise API as an+alert/IOC stream, and provides IP reputation enrichment for the agent.+"""++from __future__ import annotations++from typing import Any++import httpx+import structlog++from app.connectors.base import BaseConnector, Capability, ConnectorSchema, Field++logger = structlog.get_logger()+++class GreyNoiseConnector(BaseConnector):+ connector_id = "greynoise"+ connector_name = "GreyNoise"+ connector_category = "saas"++ @classmethod+ def schema(cls) -> ConnectorSchema:+ return ConnectorSchema(+ connector_id=cls.connector_id,+ connector_name=cls.connector_name,+ category=cls.connector_category,+ description="GreyNoise threat intelligence — malicious IP observations (GNQL) as alerts.",+ docs_url="/docs/connectors/greynoise",+ fields=[+ Field("api_key", "secret", "API Key"),+ Field(+ "query",+ "string",+ "GNQL query",+ required=False,+ default="classification:malicious last_seen:1d",+ help_text="GreyNoise Query Language filter used to pull observations.",+ ),+ ],+ )++ @classmethod+ def capabilities(cls) -> tuple[Capability, ...]:+ return (Capability.PULL_ALERTS, Capability.ENRICH_IOC)++ def __init__(self, api_key: str, query: str = "classification:malicious last_seen:1d"):+ self._api_key = api_key+ self._query = query or "classification:malicious last_seen:1d"++ def _headers(self) -> dict[str, str]:+ return {"key": self._api_key, "Accept": "application/json"}++ async def test_connection(self) -> dict[str, Any]:+ try:+ async with httpx.AsyncClient(timeout=15.0) as client:+ resp = await client.get("https://api.greynoise.io/ping", headers=self._headers())+ return {"success": resp.status_code < 400, "connector": self.connector_id}+ except Exception as exc:+ logger.warning("greynoise.test_connection.failed", error=str(exc))+ return {"success": False, "connector": self.connector_id, "error": str(exc)}++ async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:+ try:+ async with httpx.AsyncClient(timeout=30.0) as client:+ resp = await client.get(+ "https://api.greynoise.io/v2/experimental/gnql",+ headers=self._headers(),+ params={"query": self._query, "size": 200},+ )+ resp.raise_for_status()+ data = resp.json().get("data", [])+ except Exception as exc:+ logger.warning("greynoise.fetch_failed", error=str(exc))+ return []+ return [self.normalize(d) for d in data if isinstance(d, dict)]++ def normalize(self, raw: dict[str, Any]) -> dict[str, Any]:+ if isinstance(raw, dict) and "raw_event" in raw and raw.get("source") == self.connector_id:+ return raw+ classification = str(raw.get("classification", "")).lower()+ severity = "high" if classification == "malicious" else ("medium" if classification == "unknown" else "low")+ ip = raw.get("ip")+ return {+ "source": self.connector_id,+ "external_id": str(ip) if ip else "",+ "title": f"GreyNoise {classification or 'observation'}: {ip}",+ "description": raw.get("name") or raw.get("metadata", {}).get("category", ""),+ "severity": severity,+ "src_ip": ip,+ "raw_event": raw,+ "created_at": raw.get("last_seen"),+ }diff --git a/services/connectors/app/connectors/imperva.py b/services/connectors/app/connectors/imperva.pynew file mode 100644index 000000000..8459af9f6--- /dev/null+++ b/services/connectors/app/connectors/imperva.py@@ -0,0 +1,102 @@+"""Imperva Cloud WAF connector.++Pulls security events (WAF incidents) from the Imperva Cloud Application+Security (Incapsula) API as an alert stream. Auth is an API ID + API key pair+passed as query parameters per the Imperva API convention.+"""++from __future__ import annotations++from typing import Any++import httpx+import structlog++from app.connectors.base import BaseConnector, Capability, ConnectorSchema, Field++logger = structlog.get_logger()++_SEVERITY_BY_THREAT = {+ "SQL Injection": "high",+ "Cross Site Scripting": "high",+ "Remote File Inclusion": "high",+ "Illegal Resource Access": "medium",+ "Backdoor": "critical",+ "DDoS": "high",+}+++class ImpervaConnector(BaseConnector):+ connector_id = "imperva"+ connector_name = "Imperva Cloud WAF"+ connector_category = "network"++ @classmethod+ def schema(cls) -> ConnectorSchema:+ return ConnectorSchema(+ connector_id=cls.connector_id,+ connector_name=cls.connector_name,+ category=cls.connector_category,+ description="Imperva Cloud WAF (Incapsula) security events / blocked attacks as alerts.",+ docs_url="/docs/connectors/imperva",+ fields=[+ Field("api_id", "string", "API ID"),+ Field("api_key", "secret", "API Key"),+ Field("site_id", "string", "Site ID", required=False, help_text="Optional. Limit to one protected site."),+ ],+ )++ @classmethod+ def capabilities(cls) -> tuple[Capability, ...]:+ return (Capability.PULL_ALERTS, Capability.PIVOT_IP, Capability.BLOCK_IP)++ def __init__(self, api_id: str, api_key: str, site_id: str | None = None):+ self._api_id = api_id+ self._api_key = api_key+ self._site_id = site_id or None+ self._base = "https://my.imperva.com/api/v1"++ async def test_connection(self) -> dict[str, Any]:+ try:+ async with httpx.AsyncClient(timeout=15.0) as client:+ resp = await client.post(f"{self._base}/sites/list", data={"api_id": self._api_id, "api_key": self._api_key})+ ok = resp.status_code < 400 and resp.json().get("res") == 0+ return {"success": bool(ok), "connector": self.connector_id}+ except Exception as exc:+ logger.warning("imperva.test_connection.failed", error=str(exc))+ return {"success": False, "connector": self.connector_id, "error": str(exc)}++ async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:+ data: dict[str, Any] = {"api_id": self._api_id, "api_key": self._api_key, "page_size": 200}+ if self._site_id:+ data["site_id"] = self._site_id+ try:+ async with httpx.AsyncClient(timeout=30.0) as client:+ resp = await client.post(f"{self._base}/infra/stats", data=data)+ resp.raise_for_status()+ payload = resp.json()+ except Exception as exc:+ logger.warning("imperva.fetch_failed", error=str(exc))+ return []+ events = payload.get("visits") or payload.get("events") or []+ return [self.normalize(e) for e in events if isinstance(e, dict)]++ def normalize(self, raw: dict[str, Any]) -> dict[str, Any]:+ if isinstance(raw, dict) and "raw_event" in raw and raw.get("source") == self.connector_id:+ return raw+ threat = (+ raw.get("threats", [{}])[0].get("attackType")+ if isinstance(raw.get("threats"), list) and raw["threats"]+ else raw.get("securitySummary")+ )+ severity = _SEVERITY_BY_THREAT.get(str(threat), "medium")+ return {+ "source": self.connector_id,+ "external_id": str(raw.get("id") or raw.get("clientIPAddress") or ""),+ "title": f"Imperva WAF: {threat or 'security event'}",+ "description": raw.get("securitySummary") or "",+ "severity": severity,+ "src_ip": raw.get("clientIPAddress"),+ "raw_event": raw,+ "created_at": raw.get("startTime"),+ }diff --git a/services/connectors/app/connectors/jumpcloud.py b/services/connectors/app/connectors/jumpcloud.pynew file mode 100644index 000000000..24a57d4dd--- /dev/null+++ b/services/connectors/app/connectors/jumpcloud.py@@ -0,0 +1,87 @@+"""JumpCloud connector.++Pulls Directory Insights events (auth + admin activity) from the JumpCloud API+as an alert stream. Auth is a simple API key header (x-api-key).+"""++from __future__ import annotations++from datetime import UTC, datetime, timedelta+from typing import Any++import httpx+import structlog++from app.connectors.base import BaseConnector, Capability, ConnectorSchema, Field++logger = structlog.get_logger()+++class JumpCloudConnector(BaseConnector):+ connector_id = "jumpcloud"+ connector_name = "JumpCloud"+ connector_category = "iam"++ @classmethod+ def schema(cls) -> ConnectorSchema:+ return ConnectorSchema(+ connector_id=cls.connector_id,+ connector_name=cls.connector_name,+ category=cls.connector_category,+ description="JumpCloud Directory Insights — authentication and admin events as alerts.",+ docs_url="/docs/connectors/jumpcloud",+ fields=[Field("api_key", "secret", "API Key")],+ )++ @classmethod+ def capabilities(cls) -> tuple[Capability, ...]:+ return (Capability.PULL_ALERTS, Capability.PIVOT_USER)++ def __init__(self, api_key: str):+ self._api_key = api_key++ def _headers(self) -> dict[str, str]:+ return {"x-api-key": self._api_key, "Content-Type": "application/json", "Accept": "application/json"}++ async def test_connection(self) -> dict[str, Any]:+ try:+ async with httpx.AsyncClient(timeout=15.0) as client:+ resp = await client.get("https://console.jumpcloud.com/api/systemusers", headers=self._headers(), params={"limit": 1})+ return {"success": resp.status_code < 400, "connector": self.connector_id}+ except Exception as exc:+ logger.warning("jumpcloud.test_connection.failed", error=str(exc))+ return {"success": False, "connector": self.connector_id, "error": str(exc)}++ async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:+ start = (datetime.now(UTC) - timedelta(seconds=max(1, since_seconds))).strftime("%Y-%m-%dT%H:%M:%SZ")+ body = {"service": ["all"], "start_time": start, "limit": 200, "sort": "DESC"}+ try:+ async with httpx.AsyncClient(timeout=30.0) as client:+ resp = await client.post("https://api.jumpcloud.com/insights/directory/v1/events", headers=self._headers(), json=body)+ resp.raise_for_status()+ events = resp.json()+ except Exception as exc:+ logger.warning("jumpcloud.fetch_failed", error=str(exc))+ return []+ if not isinstance(events, list):+ events = events.get("results", []) if isinstance(events, dict) else []+ return [self.normalize(e) for e in events if isinstance(e, dict)]++ def normalize(self, raw: dict[str, Any]) -> dict[str, Any]:+ if isinstance(raw, dict) and "raw_event" in raw and raw.get("source") == self.connector_id:+ return raw+ success = raw.get("success")+ event_type = str(raw.get("event_type", ""))+ # Failed auth / admin changes are the security-relevant ones.+ severity = "high" if success is False else ("medium" if "admin" in event_type else "low")+ return {+ "source": self.connector_id,+ "external_id": str(raw.get("id") or raw.get("_id") or ""),+ "title": event_type or "JumpCloud event",+ "description": raw.get("message") or "",+ "severity": severity,+ "src_ip": raw.get("client_ip"),+ "actor": (raw.get("initiated_by") or {}).get("username") if isinstance(raw.get("initiated_by"), dict) else None,+ "raw_event": raw,+ "created_at": raw.get("timestamp"),+ }diff --git a/services/connectors/app/connectors/qualys.py b/services/connectors/app/connectors/qualys.pynew file mode 100644index 000000000..9d02ec401--- /dev/null+++ b/services/connectors/app/connectors/qualys.py@@ -0,0 +1,126 @@+"""Qualys VMDR connector.++Pulls detected vulnerabilities (host detections) from the Qualys VMDR API as an+alert stream. Qualys uses HTTP Basic auth against a regional API gateway+(e.g. https://qualysapi.qg2.apps.qualys.com).+"""++from __future__ import annotations++from typing import Any++import httpx+import structlog++from app.connectors.base import BaseConnector, Capability, ConnectorSchema, Field++logger = structlog.get_logger()++# Qualys severity is 1..5 (5 = most severe). Map to the AiSOC five-tier ladder;+# a native 5 stays critical rather than collapsing into high.+_SEVERITY_MAP = {5: "critical", 4: "high", 3: "medium", 2: "low", 1: "info"}+++class QualysConnector(BaseConnector):+ connector_id = "qualys"+ connector_name = "Qualys VMDR"+ connector_category = "cloud"++ @classmethod+ def schema(cls) -> ConnectorSchema:+ return ConnectorSchema(+ connector_id=cls.connector_id,+ connector_name=cls.connector_name,+ category=cls.connector_category,+ description="Qualys Vulnerability Management (VMDR) host detections as alerts.",+ docs_url="/docs/connectors/qualys",+ fields=[+ Field("base_url", "string", "API URL", placeholder="https://qualysapi.qg2.apps.qualys.com"),+ Field("username", "string", "API Username"),+ Field("password", "secret", "API Password"),+ ],+ )++ @classmethod+ def capabilities(cls) -> tuple[Capability, ...]:+ return (Capability.PULL_ALERTS, Capability.ENRICH_VULN, Capability.ENRICH_ASSET)++ def __init__(self, base_url: str, username: str, password: str):+ self._base = base_url.rstrip("/")+ self._auth = (username, password)++ def _headers(self) -> dict[str, str]:+ return {"X-Requested-With": "AiSOC", "Accept": "application/json"}++ async def test_connection(self) -> dict[str, Any]:+ try:+ async with httpx.AsyncClient(timeout=15.0, auth=self._auth) as client:+ resp = await client.get(+ f"{self._base}/api/2.0/fo/activity_log/", headers=self._headers(), params={"action": "list", "truncation_limit": 1}+ )+ return {"success": resp.status_code < 400, "connector": self.connector_id}+ except Exception as exc:+ logger.warning("qualys.test_connection.failed", error=str(exc))+ return {"success": False, "connector": self.connector_id, "error": str(exc)}++ async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:+ try:+ async with httpx.AsyncClient(timeout=30.0, auth=self._auth) as client:+ resp = await client.get(+ f"{self._base}/api/2.0/fo/asset/host/vm/detection/",+ headers=self._headers(),+ params={"action": "list", "severities": "4,5", "output_format": "JSON", "truncation_limit": 200},+ )+ resp.raise_for_status()+ data = resp.json()+ except Exception as exc:+ logger.warning("qualys.fetch_failed", error=str(exc))+ return []+ hosts = _extract_host_list(data)+ return [self.normalize(d) for h in hosts for d in _host_detections(h)]++ def normalize(self, raw: dict[str, Any]) -> dict[str, Any]:+ if isinstance(raw, dict) and "raw_event" in raw and raw.get("source") == self.connector_id:+ return raw+ try:+ sev = _SEVERITY_MAP.get(int(raw.get("SEVERITY", raw.get("severity", 3))), "medium")+ except (TypeError, ValueError):+ sev = "medium"+ qid = raw.get("QID") or raw.get("qid")+ return {+ "source": self.connector_id,+ "external_id": str(qid) if qid else "",+ "title": raw.get("_title") or (f"Qualys QID {qid}" if qid else "Qualys detection"),+ "description": raw.get("RESULTS") or raw.get("results") or "",+ "severity": sev,+ "src_ip": raw.get("_ip"),+ "hostname": raw.get("_dns"),+ "raw_event": raw,+ "created_at": raw.get("LAST_FOUND_DATETIME") or raw.get("last_found_datetime"),+ }+++def _extract_host_list(data: Any) -> list[dict[str, Any]]:+ try:+ hosts = data["ServiceResponse"]["data"] # newer schema+ except (KeyError, TypeError):+ hosts = None+ if isinstance(hosts, list):+ return [h.get("HostAsset", h) if isinstance(h, dict) else {} for h in hosts]+ # Legacy: HOST_LIST_VM_DETECTION_OUTPUT+ try:+ raw_hosts = data["HOST_LIST_VM_DETECTION_OUTPUT"]["RESPONSE"]["HOST_LIST"]["HOST"]+ except (KeyError, TypeError):+ return []+ return raw_hosts if isinstance(raw_hosts, list) else [raw_hosts]+++def _host_detections(host: dict[str, Any]) -> list[dict[str, Any]]:+ ip = host.get("IP") or host.get("address")+ dns = host.get("DNS") or host.get("dnsHostName")+ det = host.get("DETECTION_LIST", {}).get("DETECTION") if isinstance(host.get("DETECTION_LIST"), dict) else None+ dets = det if isinstance(det, list) else ([det] if isinstance(det, dict) else [host])+ for d in dets:+ if isinstance(d, dict):+ d["_ip"], d["_dns"] = ip, dns+ return [d for d in dets if isinstance(d, dict)]diff --git a/services/connectors/tests/test_new_connectors_wave3.py b/services/connectors/tests/test_new_connectors_wave3.pynew file mode 100644index 000000000..5f992ffd1--- /dev/null+++ b/services/connectors/tests/test_new_connectors_wave3.py@@ -0,0 +1,44 @@+"""Wave 3a — new connectors emit the canonical envelope (so the ingest OCSF+path maps them to a Security Finding) and normalize idempotently."""++from __future__ import annotations++import pytest+from app.connectors.darktrace import DarktraceConnector+from app.connectors.greynoise import GreyNoiseConnector+from app.connectors.imperva import ImpervaConnector+from app.connectors.jumpcloud import JumpCloudConnector+from app.connectors.qualys import QualysConnector++_VALID_SEVERITIES = {"info", "low", "medium", "high", "critical"}++_CASES = [+ (QualysConnector(base_url="https://q", username="u", password="p"), {"QID": 42, "SEVERITY": 5, "_ip": "1.2.3.4", "_dns": "h1"}),+ (GreyNoiseConnector(api_key="k"), {"ip": "8.8.8.8", "classification": "malicious", "last_seen": "2026-08-01"}),+ (JumpCloudConnector(api_key="k"), {"id": "e1", "event_type": "admin_login_attempt", "success": False, "client_ip": "1.2.3.4"}),+ (+ DarktraceConnector(base_url="https://d", public_token="pub", private_token="priv"),+ {"pbid": 7, "score": 0.95, "model": {"then": {"name": "Beacon"}}, "device": {"ip": "10.0.0.9"}},+ ),+ (ImpervaConnector(api_id="id", api_key="k"), {"id": "v1", "clientIPAddress": "1.2.3.4", "threats": [{"attackType": "SQL Injection"}]}),+]++[email protected]("connector,raw", _CASES)+def test_normalize_emits_canonical_envelope(connector, raw):+ out = connector.normalize(raw)+ assert out["source"] == connector.connector_id+ assert out["raw_event"] == raw+ assert out["severity"] in _VALID_SEVERITIES+ assert "title" in out and out["title"]+ # Idempotent: re-normalizing the canonical envelope is a no-op.+ assert connector.normalize(out) == out+++def test_severity_ladders_preserve_critical():+ # Qualys native 5 -> critical (not collapsed to high).+ q = QualysConnector(base_url="https://q", username="u", password="p")+ assert q.normalize({"QID": 1, "SEVERITY": 5})["severity"] == "critical"+ # Darktrace score >= 0.9 -> critical.+ d = DarktraceConnector(base_url="https://d", public_token="a", private_token="b")+ assert d.normalize({"pbid": 1, "score": 0.95})["severity"] == "critical"