Skip to content

armgit / AiSOC

Public Imported from GitHub
0

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.

fix(connectors): preserve Lacework critical severity

Shreya Jha01d9a39ed93c
diff --git a/apps/docs/docs/connectors/lacework.md b/apps/docs/docs/connectors/lacework.md
index 7150ddaf4..56851f63d 100644
--- a/apps/docs/docs/connectors/lacework.md
+++ b/apps/docs/docs/connectors/lacework.md
@@ -68,11 +68,12 @@ the secret once.
## Severity mapping
Lacework alerts use a numeric severity (1 = critical, 5 = info). AiSOC
-maps these into the canonical 4-tier ladder:
+maps these into the canonical five-tier ladder without downgrading critical
+findings:
| Lacework severity | AiSOC severity |
|---|---|
-| `1` — Critical | `high` |
+| `1` — Critical | `critical` |
| `2` — High | `high` |
| `3` — Medium | `medium` |
| `4` — Low | `low` |
diff --git a/services/connectors/app/connectors/lacework.py b/services/connectors/app/connectors/lacework.py
index 0cf99d05a..500ade8bf 100644
--- a/services/connectors/app/connectors/lacework.py
+++ b/services/connectors/app/connectors/lacework.py
@@ -216,9 +216,7 @@ class LaceworkConnector(BaseConnector):
def _normalize_policy(self, raw: dict[str, Any]) -> dict[str, Any]:
sev_raw = (raw.get("severity") or "").lower()
- if sev_raw in ("critical",):
- sev = "high"
- elif sev_raw in ("info", "low", "medium", "high"):
+ if sev_raw in ("info", "low", "medium", "high", "critical"):
sev = sev_raw
else:
sev = "medium"
diff --git a/services/connectors/tests/test_wave3_connectors.py b/services/connectors/tests/test_wave3_connectors.py
index 22756d3e0..08c878352 100644
--- a/services/connectors/tests/test_wave3_connectors.py
+++ b/services/connectors/tests/test_wave3_connectors.py
@@ -398,6 +398,35 @@ def test_lacework_capabilities():
assert Capability.ENRICH_VULN in caps
+ "raw",
+ [
+ {
+ "_kind": "alert",
+ "id": "alert-1",
+ "alertName": "Cloud account compromise",
+ "severity": "critical",
+ },
+ {
+ "_kind": "policy",
+ "id": "policy-1",
+ "policyId": "lacework-global-1",
+ "policyTitle": "Public cloud storage",
+ "severity": "critical",
+ "resourceType": "AwsS3Bucket",
+ "resourceId": "bucket-1",
+ },
+ ],
+)
+def test_lacework_preserves_critical_severity(raw: dict[str, str]):
+ """Vendor-native critical alerts and policies must remain in the P1 tier."""
+ connector = LaceworkConnector(account="acme", key_id="key", secret="secret")
+ normalized = connector.normalize(raw)
+
+ assert normalized["severity"] == "critical"
+ assert normalized["raw_event"]["severity"] == "critical"
+
+
# ---------------------------------------------------------------------------
# OCI
# ---------------------------------------------------------------------------