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.

feat(pr6): AiSOC osquery extensions — 5 virtual tables + API + CI (#51)

Beenu Aroradc815e5521da
diff --git a/.github/workflows/build-extensions.yml b/.github/workflows/build-extensions.yml
new file mode 100644
index 000000000..2125b1dac
--- /dev/null
+++ b/.github/workflows/build-extensions.yml
@@ -0,0 +1,129 @@
+name: Build osquery extensions
+
+on:
+ push:
+ tags:
+ - "ext-v*" # e.g. ext-v1.0.0
+ paths:
+ - "services/osquery-extensions/**"
+ pull_request:
+ paths:
+ - "services/osquery-extensions/**"
+
+permissions:
+ contents: write # needed by softprops/action-gh-release
+ id-token: write # needed by cosign keyless signing
+
+jobs:
+ # --------------------------------------------------------------------------
+ # Unit tests (run on every PR and push)
+ # --------------------------------------------------------------------------
+ test:
+ name: Go unit tests
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: services/osquery-extensions
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: "1.26"
+ cache: true
+ cache-dependency-path: services/osquery-extensions/go.sum
+
+ - name: go vet
+ run: go vet ./...
+
+ - name: go test
+ run: go test -race -count=1 -coverprofile=coverage.out ./...
+
+ - name: Upload coverage
+ uses: actions/upload-artifact@v4
+ with:
+ name: coverage
+ path: services/osquery-extensions/coverage.out
+
+ # --------------------------------------------------------------------------
+ # Cross-platform release builds (tags only)
+ # --------------------------------------------------------------------------
+ release:
+ name: Release ${{ matrix.goos }}/${{ matrix.goarch }}
+ if: startsWith(github.ref, 'refs/tags/ext-v')
+ needs: test
+ runs-on: ${{ matrix.runner }}
+ strategy:
+ matrix:
+ include:
+ - goos: linux
+ goarch: amd64
+ runner: ubuntu-latest
+ - goos: linux
+ goarch: arm64
+ runner: ubuntu-latest
+ - goos: darwin
+ goarch: amd64
+ runner: macos-latest
+ - goos: darwin
+ goarch: arm64
+ runner: macos-latest
+ - goos: windows
+ goarch: amd64
+ runner: ubuntu-latest
+
+ defaults:
+ run:
+ working-directory: services/osquery-extensions
+
+ env:
+ GOOS: ${{ matrix.goos }}
+ GOARCH: ${{ matrix.goarch }}
+ CGO_ENABLED: "0"
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: "1.26"
+ cache: true
+ cache-dependency-path: services/osquery-extensions/go.sum
+
+ - name: Build
+ run: |
+ SUFFIX=""
+ if [ "$GOOS" = "windows" ]; then SUFFIX=".exe"; fi
+ OUTPUT="dist/aisoc-extension-${GOOS}-${GOARCH}${SUFFIX}"
+ mkdir -p dist
+ go build -trimpath -ldflags "-s -w \
+ -X main.version=${{ github.ref_name }} \
+ -X main.commit=${{ github.sha }}" \
+ -o "${OUTPUT}" .
+ echo "ARTIFACT=${OUTPUT}" >> "${GITHUB_ENV}"
+
+ # Sign the binary with cosign (keyless / OIDC)
+ - name: Install cosign
+ uses: sigstore/cosign-installer@v3
+
+ - name: Sign artifact
+ run: |
+ cosign sign-blob \
+ --yes \
+ --output-certificate "${ARTIFACT}.pem" \
+ --output-signature "${ARTIFACT}.sig" \
+ "${ARTIFACT}"
+
+ - name: Upload to release
+ uses: softprops/action-gh-release@v2
+ with:
+ files: |
+ services/osquery-extensions/${{ env.ARTIFACT }}
+ services/osquery-extensions/${{ env.ARTIFACT }}.pem
+ services/osquery-extensions/${{ env.ARTIFACT }}.sig
+ tag_name: ${{ github.ref_name }}
+ draft: false
+ generate_release_notes: true
diff --git a/.github/workflows/check-openapi.yml b/.github/workflows/check-openapi.yml
index 4320981b6..5bdec048c 100644
--- a/.github/workflows/check-openapi.yml
+++ b/.github/workflows/check-openapi.yml
@@ -27,6 +27,7 @@ env:
opentelemetry-exporter-otlp-proto-grpc
"opentelemetry-instrumentation-fastapi"
"strawberry-graphql[fastapi]" httpx email-validator PyJWT
+ sqlglot
jobs:
openapi-check:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 86edfd67a..28c45a877 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -143,6 +143,7 @@ jobs:
"opentelemetry-instrumentation-fastapi"
"strawberry-graphql[fastapi]"
neo4j redis celery httpx aiofiles email-validator PyJWT
+ "sqlglot>=23,<27" aiosqlite
pytest pytest-asyncio
steps:
- uses: actions/checkout@v4
diff --git a/apps/docs/docs/connectors/osquery-extensions.md b/apps/docs/docs/connectors/osquery-extensions.md
new file mode 100644
index 000000000..17b12f3f6
--- /dev/null
+++ b/apps/docs/docs/connectors/osquery-extensions.md
@@ -0,0 +1,236 @@
+---
+sidebar_position: 20
+title: osquery Extensions
+description: Custom osquery virtual tables that surface AiSOC data directly in the osquery shell.
+---
+
+# AiSOC osquery Extensions
+
+The `aisoc-extension` binary adds five osquery virtual tables that surface
+AiSOC operational data directly inside any osquery query, scheduled pack, or
+live investigation session.
+
+| Virtual table | Description |
+|---|---|
+| `aisoc_pending_actions` | HITL response actions queued for this host |
+| `aisoc_alert_cache` | Alerts fired against this host (last 24 h) |
+| `aisoc_attck_persistence` | Approved persistence baseline (MITRE T1547) |
+| `aisoc_kernel_modules_verified` | Loaded kernel modules with signing status (Linux) |
+| `aisoc_browser_extensions` | Installed browser extensions per user profile |
+
+---
+
+## Prerequisites
+
+- osquery ≥ 5.10
+- Network access from the host to the AiSOC osquery-tls service
+- An API token with the `extensions:read` scope
+
+---
+
+## Installation
+
+### 1 — Download the binary
+
+Pre-built binaries are published to GitHub Releases for every tag matching
+`ext-v*`. Binaries are signed with [cosign](https://docs.sigstore.dev/)
+keyless signing; signatures and certificates are released alongside each
+binary.
+
+```bash
+# Example: Linux amd64
+VERSION=ext-v1.0.0
+curl -fsSL -o /opt/aisoc/aisoc-extension \
+ "https://github.com/beenuar/AiSOC/releases/download/${VERSION}/aisoc-extension-linux-amd64"
+
+# Verify the signature (optional but recommended)
+cosign verify-blob \
+ --certificate "aisoc-extension-linux-amd64.pem" \
+ --signature "aisoc-extension-linux-amd64.sig" \
+ --certificate-identity-regexp "https://github.com/beenuar/AiSOC" \
+ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
+ "aisoc-extension-linux-amd64"
+
+chmod +x /opt/aisoc/aisoc-extension
+```
+
+### 2 — Configure environment variables
+
+| Variable | Default | Purpose |
+|---|---|---|
+| `AISOC_API_URL` | `http://localhost:8000` | Base URL of the osquery-tls service |
+| `AISOC_API_TOKEN` | _(empty)_ | Bearer token for authentication |
+| `AISOC_HOST_ID` | system hostname | Identifies the host in API calls |
+
+### 3a — Launch with osquery flags (daemon mode)
+
+Add the following to `/etc/osquery/osquery.flags` (or your equivalent):
+
+```
+--extensions_autoload=/opt/aisoc/extensions.load
+--extensions_timeout=10
+--extensions_interval=3
+```
+
+Create `/opt/aisoc/extensions.load` containing the absolute path to the binary:
+
+```
+/opt/aisoc/aisoc-extension
+```
+
+The extension is passed `--socket <path>` automatically by osqueryd.
+
+### 3b — Launch as a systemd service (Linux)
+
+```ini
+# /etc/systemd/system/aisoc-extension.service
+[Unit]
+Description=AiSOC osquery extension
+After=osqueryd.service
+Requires=osqueryd.service
+
+[Service]
+EnvironmentFile=/etc/aisoc/extension.env
+ExecStartPre=/bin/sleep 3
+ExecStart=/opt/aisoc/aisoc-extension \
+ --socket /var/osquery/osquery.em \
+ --timeout 30
+Restart=on-failure
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
+```
+
+```ini
+# /etc/aisoc/extension.env
+AISOC_API_URL=https://osquery-tls.internal.example.com
+AISOC_API_TOKEN=eyJ...
+AISOC_HOST_ID=web-prod-01
+```
+
+```bash
+systemctl daemon-reload
+systemctl enable --now aisoc-extension
+```
+
+### 3c — macOS (launchd)
+
+```xml
+<!-- /Library/LaunchDaemons/com.aisoc.extension.plist -->
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key> <string>com.aisoc.extension</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/opt/aisoc/aisoc-extension</string>
+ <string>--socket</string>
+ <string>/private/var/osquery/osquery.em</string>
+ <string>--timeout</string>
+ <string>30</string>
+ </array>
+ <key>EnvironmentVariables</key>
+ <dict>
+ <key>AISOC_API_URL</key> <string>https://osquery-tls.example.com</string>
+ <key>AISOC_API_TOKEN</key> <string>eyJ...</string>
+ </dict>
+ <key>RunAtLoad</key> <true/>
+ <key>KeepAlive</key> <true/>
+</dict>
+</plist>
+```
+
+```bash
+launchctl load /Library/LaunchDaemons/com.aisoc.extension.plist
+```
+
+---
+
+## Example queries
+
+```sql
+-- What response actions are waiting for this host?
+SELECT * FROM aisoc_pending_actions;
+
+-- High-severity alerts in the last 24 hours
+SELECT alert_id, severity, summary, fired_at
+FROM aisoc_alert_cache
+WHERE severity IN ('high', 'critical')
+ORDER BY fired_at DESC;
+
+-- Persistence entries not on the approved baseline
+SELECT s.name, s.path, s.args
+FROM startup_items s
+LEFT JOIN aisoc_attck_persistence p ON s.path = p.path
+WHERE p.entry_id IS NULL;
+
+-- Unsigned kernel modules (Linux)
+SELECT name, path
+FROM aisoc_kernel_modules_verified
+WHERE signed = 0;
+
+-- Browser extensions installed across all profiles
+SELECT browser, profile, name, version, extension_id
+FROM aisoc_browser_extensions
+ORDER BY browser, profile, name;
+```
+
+---
+
+## API endpoints
+
+The extension communicates with the following read-only endpoints on the
+osquery-tls service:
+
+| Method | Path | Description |
+|---|---|---|
+| GET | `/api/v1/osquery/extensions/pending-actions` | HITL action queue |
+| GET | `/api/v1/osquery/extensions/alert-cache` | Recent alert cache |
+| GET | `/api/v1/osquery/extensions/persistence-baseline` | Approved baseline |
+
+All endpoints accept `?host_identifier=<string>` and, for the alert cache,
+`?since=<ISO-8601>`.
+
+---
+
+## Building from source
+
+```bash
+git clone https://github.com/beenuar/AiSOC.git
+cd AiSOC/services/osquery-extensions
+
+# Run tests
+make test
+
+# Build for the current platform
+make build
+
+# Cross-platform release binaries (dist/)
+make release
+```
+
+---
+
+## Troubleshooting
+
+| Symptom | Likely cause | Fix |
+|---|---|---|
+| Extension not appearing in osquery | Socket path wrong | Verify `--extensions_autoload` path and socket location |
+| All tables return zero rows | API unreachable | Check `AISOC_API_URL`, firewall, and token |
+| `aisoc_kernel_modules_verified` empty | Non-Linux host | Expected; the table reads `/proc/modules` |
+| Slow query times | High `AISOC_HTTP_TIMEOUT` default | Set a shorter `HTTPTimeout` in config |
+
+---
+
+## Security notes
+
+- The extension binary should be owned `root:root` and mode `0755`.
+- Store `AISOC_API_TOKEN` in the systemd/launchd environment file with mode
+ `0600`, not in the unit file or command line.
+- Release binaries are signed with cosign keyless signing; verify before
+ deploying in production.
+- The extension communicates **outbound only**; it does not listen on any
+ port.
diff --git a/apps/docs/docs/detections/coverage.md b/apps/docs/docs/detections/coverage.md
index 49db9a9b9..01e408954 100644
--- a/apps/docs/docs/detections/coverage.md
+++ b/apps/docs/docs/detections/coverage.md
@@ -11,21 +11,21 @@ sidebar_position: 2
# Detection Coverage
-Generated: `2026-05-10T14:50:52Z`
+Generated: `2026-05-10T18:54:09Z`
## Headline numbers
-- **Curated v1.0 detections**: `411` (target: ≥ 300)
-- **Total rules considered**: `1011` (quality floor: 0.55)
-- **Unique MITRE techniques covered**: `113`
+- **Curated v1.0 detections**: `416` (target: ≥ 300)
+- **Total rules considered**: `1047` (quality floor: 0.55)
+- **Unique MITRE techniques covered**: `117`
## Coverage by buyer family
| Family | Count | Target | Covered |
|---|---|---|---|
-| **Ransomware** | 46 | ≥ 25 | ✅ |
+| **Ransomware** | 48 | ≥ 25 | ✅ |
| **Credential Access** | 83 | ≥ 25 | ✅ |
-| **Lateral Movement** | 32 | ≥ 25 | ✅ |
+| **Lateral Movement** | 33 | ≥ 25 | ✅ |
| **Data Exfiltration** | 41 | ≥ 25 | ✅ |
| **Cloud** | 100 | ≥ 25 | ✅ |
| **Identity** | 100 | ≥ 25 | ✅ |
@@ -36,23 +36,24 @@ Generated: `2026-05-10T14:50:52Z`
### By tier
-- `imported`: 41
-- `native`: 370
+- `imported`: 42
+- `native`: 374
### By severity
- `critical`: 99
-- `high`: 206
+- `high`: 208
- `low`: 6
-- `medium`: 100
+- `medium`: 103
### By category
+- `_migrated`: 1
- `application`: 29
-- `cloud`: 162
+- `cloud`: 164
- `data-exfil`: 20
-- `endpoint`: 112
-- `identity`: 76
+- `endpoint`: 115
+- `identity`: 75
- `network`: 12
## How to audit
diff --git a/apps/docs/sidebars.ts b/apps/docs/sidebars.ts
index 6d9fca6a6..d4bcd90cd 100644
--- a/apps/docs/sidebars.ts
+++ b/apps/docs/sidebars.ts
@@ -50,6 +50,7 @@ const sidebars: SidebarsConfig = {
"connectors/tailscale",
"connectors/osctrl",
"connectors/fleetdm",
+ "connectors/osquery-extensions",
],
},
{
diff --git a/apps/web/public/marketplace/curated.json b/apps/web/public/marketplace/curated.json
index 119fb750b..746e88ee3 100644
--- a/apps/web/public/marketplace/curated.json
+++ b/apps/web/public/marketplace/curated.json
@@ -1,38 +1,39 @@
{
"$schema": "https://aisoc.example.com/schemas/curated/v1.json",
"version": "1.0.0",
- "generated": "2026-05-10T14:50:52Z",
+ "generated": "2026-05-10T18:54:09Z",
"stats": {
- "considered": 1011,
- "eligible": 1008,
- "selected": 411,
+ "considered": 1047,
+ "eligible": 1043,
+ "selected": 416,
"min_per_family": 25,
"min_total": 300,
"quality_floor": 0.55,
- "unique_techniques": 113,
+ "unique_techniques": 117,
"selected_by_tier": {
- "imported": 41,
- "native": 370
+ "imported": 42,
+ "native": 374
},
"selected_by_severity": {
"critical": 99,
- "high": 206,
+ "high": 208,
"low": 6,
- "medium": 100
+ "medium": 103
},
"selected_by_category": {
+ "_migrated": 1,
"application": 29,
- "cloud": 162,
+ "cloud": 164,
"data-exfil": 20,
- "endpoint": 112,
- "identity": 76,
+ "endpoint": 115,
+ "identity": 75,
"network": 12
}
},
"families": {
"ransomware": {
"label": "Ransomware",
- "count": 46,
+ "count": 48,
"rule_ids": [
"det-application-050",
"det-cloud-004",
@@ -71,6 +72,7 @@
"det-endpoint-179",
"det-endpoint-181",
"det-endpoint-182",
+ "det-endpoint-286",
"det-identity-121",
"mitre-car-car-2021-01-009",
"mitre-car-car-2021-05-003",
@@ -79,7 +81,8 @@
"sigmahq-sigma-37222991-11e9-4b6d-8bdf-60fbe48f753e",
"sigmahq-sigma-87df9ee1-5416-453a-8a08-e8d4a51e9ce1",
"sigmahq-sigma-add64136-62e5-48ea-807e-88638d02df1e",
- "sigmahq-sigma-c947b146-0abc-4c87-9c64-b17e9d7274a2"
+ "sigmahq-sigma-c947b146-0abc-4c87-9c64-b17e9d7274a2",
+ "splunk-security-content-0c320fea-6e87-4b99-a884-74d09d4b655d"
],
"min_target": 25,
"covered": true
@@ -177,7 +180,7 @@
},
"lateral": {
"label": "Lateral Movement",
- "count": 32,
+ "count": 33,
"rule_ids": [
"det-endpoint-010",
"det-endpoint-111",
@@ -185,6 +188,7 @@
"det-endpoint-113",
"det-endpoint-114",
"det-endpoint-226",
+ "det-endpoint-298",
"det-identity-102",
"det-identity-103",
"det-identity-104",
@@ -226,13 +230,13 @@
"det-cloud-184",
"det-cloud-186",
"det-cloud-192",
- "det-cloud-192",
"det-cloud-195",
"det-cloud-196",
- "det-cloud-196",
"det-cloud-203",
"det-cloud-204",
"det-cloud-206",
+ "det-cloud-221",
+ "det-cloud-222",
"det-data-exfil-001",
"det-data-exfil-002",
"det-data-exfil-003",
@@ -354,7 +358,7 @@
"det-cloud-185",
"det-cloud-190",
"det-cloud-191",
- "det-cloud-194",
+ "det-cloud-225",
"det-endpoint-178",
"det-endpoint-245",
"det-endpoint-246",
@@ -444,6 +448,7 @@
"det-endpoint-263",
"det-endpoint-264",
"det-endpoint-265",
+ "det-endpoint-300",
"det-identity-001",
"det-identity-002",
"det-identity-003",
@@ -453,7 +458,6 @@
"det-identity-009",
"det-identity-011",
"det-identity-012",
- "det-identity-013",
"det-identity-020",
"det-identity-021",
"det-identity-027",
@@ -617,15 +621,17 @@
"T1012": 1,
"T1016": 1,
"T1018": 1,
- "T1020": 1,
+ "T1020": 2,
"T1021": 11,
"T1021.001": 1,
"T1021.002": 6,
"T1021.003": 1,
"T1021.004": 1,
"T1021.006": 4,
+ "T1027": 1,
"T1029": 1,
"T1033": 1,
+ "T1036.005": 1,
"T1039": 1,
"T1040": 3,
"T1041": 7,
@@ -635,15 +641,15 @@
"T1052": 1,
"T1053": 1,
"T1057": 1,
- "T1059": 2,
+ "T1059": 3,
"T1059.001": 2,
"T1059.004": 2,
"T1069": 1,
"T1069.003": 1,
"T1070": 4,
"T1071.001": 1,
- "T1078": 15,
- "T1078.001": 3,
+ "T1078": 16,
+ "T1078.001": 2,
"T1078.004": 27,
"T1082": 1,
"T1087": 1,
@@ -651,7 +657,7 @@
"T1098": 15,
"T1098.001": 13,
"T1098.003": 7,
- "T1098.004": 4,
+ "T1098.004": 5,
"T1098.007": 1,
"T1105": 1,
"T1110": 7,
@@ -660,8 +666,9 @@
"T1110.004": 2,
"T1112": 1,
"T1114.002": 3,
- "T1114.003": 2,
+ "T1114.003": 3,
"T1133": 3,
+ "T1136": 1,
"T1136.001": 2,
"T1187": 1,
"T1190": 6,
@@ -669,10 +676,11 @@
"T1199": 14,
"T1210": 1,
"T1212": 2,
+ "T1213.002": 1,
"T1484.002": 1,
"T1485": 30,
"T1486": 5,
- "T1489": 1,
+ "T1489": 3,
"T1490": 11,
"T1496": 6,
"T1505.003": 2,
@@ -681,7 +689,7 @@
"T1528": 5,
"T1530": 24,
"T1531": 2,
- "T1537": 9,
+ "T1537": 10,
"T1539": 2,
"T1543": 1,
"T1550": 4,
@@ -711,7 +719,7 @@
"T1567": 10,
"T1567.002": 2,
"T1569": 1,
- "T1570": 5,
+ "T1570": 6,
"T1574": 1,
"T1606": 1,
"T1606.002": 1,
@@ -5196,31 +5204,6 @@
"log_source_product": "m365",
"has_executable_body": true
},
- {
- "id": "det-cloud-194",
- "name": "M365 Unified Audit Log Disabled",
- "path": "detections/cloud/m365-unified-audit-log-disabled.yaml",
- "tier": "native",
- "source": "core",
- "category": "cloud",
- "severity": "critical",
- "mitre_techniques": [
- "T1562.008"
- ],
- "mitre_tactics": [],
- "families": [
- "cloud"
- ],
- "quality_score": 1.0,
- "quality_notes": [
- "tier:native(+0.5)",
- "mitre_techniques:1(+0.2)",
- "severity:critical(+0.150)",
- "executable(+0.15)"
- ],
- "log_source_product": "m365",
- "has_executable_body": true
- },
{
"id": "det-cloud-195",
"name": "M365 eDiscovery Search Results Exported",
@@ -5250,26 +5233,26 @@
},
{
"id": "det-cloud-196",
- "name": "M365 SharePoint External Sharing Enabled Tenant-Wide",
- "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-tenant.yaml",
+ "name": "M365 SharePoint External Sharing Enabled at Org Level",
+ "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-org.yaml",
"tier": "native",
"source": "core",
"category": "cloud",
- "severity": "high",
+ "severity": "medium",
"mitre_techniques": [
- "T1567",
- "T1537"
+ "T1537",
+ "T1213.002"
],
"mitre_tactics": [],
"families": [
"exfil",
"cloud"
],
- "quality_score": 0.977,
+ "quality_score": 0.955,
"quality_notes": [
"tier:native(+0.5)",
"mitre_techniques:2(+0.2)",
- "severity:high(+0.128)",
+ "severity:medium(+0.105)",
"executable(+0.15)"
],
"log_source_product": "m365",
@@ -5653,6 +5636,85 @@
"log_source_product": "azure",
"has_executable_body": true
},
+ {
+ "id": "det-cloud-221",
+ "name": "M365 Exchange Transport Rule Redirects Mail Externally",
+ "path": "detections/cloud/m365-exchange-transport-rule-redirect-external.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "cloud",
+ "severity": "high",
+ "mitre_techniques": [
+ "T1114.003",
+ "T1020"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "exfil",
+ "cloud"
+ ],
+ "quality_score": 0.977,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:2(+0.2)",
+ "severity:high(+0.128)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "m365",
+ "has_executable_body": true
+ },
+ {
+ "id": "det-cloud-222",
+ "name": "M365 SharePoint External Sharing Enabled Tenant-Wide",
+ "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-tenant.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "cloud",
+ "severity": "high",
+ "mitre_techniques": [
+ "T1567",
+ "T1537"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "exfil",
+ "cloud"
+ ],
+ "quality_score": 0.977,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:2(+0.2)",
+ "severity:high(+0.128)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "m365",
+ "has_executable_body": true
+ },
+ {
+ "id": "det-cloud-225",
+ "name": "M365 Unified Audit Log Disabled",
+ "path": "detections/cloud/m365-unified-audit-log-disabled.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "cloud",
+ "severity": "critical",
+ "mitre_techniques": [
+ "T1562.008"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "cloud"
+ ],
+ "quality_score": 1.0,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:1(+0.2)",
+ "severity:critical(+0.150)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "m365",
+ "has_executable_body": true
+ },
{
"id": "det-data-exfil-001",
"name": "Large Outbound Transfer to Personal Cloud Storage",
@@ -8004,6 +8066,86 @@
"log_source_product": "endpoint",
"has_executable_body": true
},
+ {
+ "id": "det-endpoint-286",
+ "name": "Linux osqueryd Service Stop Detected via auditd",
+ "path": "detections/endpoint/osquery-linux-auditd-service-stop.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "endpoint",
+ "severity": "high",
+ "mitre_techniques": [
+ "T1489"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "ransomware"
+ ],
+ "quality_score": 0.977,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:1(+0.2)",
+ "severity:high(+0.128)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "linux",
+ "has_executable_body": true
+ },
+ {
+ "id": "det-endpoint-298",
+ "name": "Executable Dropped in World-Writable Directory (FIM)",
+ "path": "detections/endpoint/fim-binary-dropped-writable-dir.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "endpoint",
+ "severity": "medium",
+ "mitre_techniques": [
+ "T1027",
+ "T1059",
+ "T1036.005",
+ "T1570"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "lateral"
+ ],
+ "quality_score": 0.955,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:4(+0.2)",
+ "severity:medium(+0.105)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "osquery",
+ "has_executable_body": true
+ },
+ {
+ "id": "det-endpoint-300",
+ "name": "SSH authorized_keys File Modified (FIM)",
+ "path": "detections/endpoint/fim-ssh-authorized-keys-changed.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "endpoint",
+ "severity": "high",
+ "mitre_techniques": [
+ "T1098.004",
+ "T1078",
+ "T1136"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "identity"
+ ],
+ "quality_score": 0.977,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:3(+0.2)",
+ "severity:high(+0.128)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "osquery",
+ "has_executable_body": true
+ },
{
"id": "det-identity-001",
"name": "Authentication Brute-Force Burst",
@@ -8266,31 +8408,6 @@
"log_source_product": "linux",
"has_executable_body": true
},
- {
- "id": "det-identity-013",
- "name": "Login with Vendor Default Credentials",
- "path": "detections/identity/default-credential-login.yaml",
- "tier": "native",
- "source": "core",
- "category": "identity",
- "severity": "high",
- "mitre_techniques": [
- "T1078.001"
- ],
- "mitre_tactics": [],
- "families": [
- "identity"
- ],
- "quality_score": 0.977,
- "quality_notes": [
- "tier:native(+0.5)",
- "mitre_techniques:1(+0.2)",
- "severity:high(+0.128)",
- "executable(+0.15)"
- ],
- "log_source_product": "linux",
- "has_executable_body": true
- },
{
"id": "det-identity-020",
"name": "Kubernetes ClusterRoleBinding to cluster-admin",
@@ -11336,6 +11453,31 @@
],
"log_source_product": "windows",
"has_executable_body": true
+ },
+ {
+ "id": "splunk-security-content-0c320fea-6e87-4b99-a884-74d09d4b655d",
+ "name": "Linux Auditd Osquery Service Stop",
+ "path": "detections/splunk-imports/_migrated/linux-auditd-osquery-service-stop.yaml",
+ "tier": "imported",
+ "source": "splunk-security-content",
+ "category": "_migrated",
+ "severity": "medium",
+ "mitre_techniques": [
+ "T1489"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "ransomware"
+ ],
+ "quality_score": 0.605,
+ "quality_notes": [
+ "tier:imported(+0.3)",
+ "mitre_techniques:1(+0.2)",
+ "severity:medium(+0.105)",
+ "no_executable_body(0)"
+ ],
+ "log_source_product": "splunk",
+ "has_executable_body": false
}
]
}
diff --git a/apps/web/public/marketplace/index.json b/apps/web/public/marketplace/index.json
index acb637e34..28752861d 100644
--- a/apps/web/public/marketplace/index.json
+++ b/apps/web/public/marketplace/index.json
@@ -1,7 +1,7 @@
{
"$schema": "https://example.com/schemas/marketplace/v1.json",
"version": "1.0.0",
- "generated": "2026-05-10T14:50:51Z",
+ "generated": "2026-05-10T18:54:21Z",
"categories": [
{
"id": "playbooks",
@@ -20,22 +20,22 @@
}
],
"stats": {
- "total": 7077,
+ "total": 7098,
"playbooks": 62,
- "detections": 6973,
- "plugins": 42,
- "verified": 962,
+ "detections": 6993,
+ "plugins": 43,
+ "verified": 982,
"community": 0,
"by_tier": {
- "beta": 2,
+ "beta": 3,
"imported": 6113,
- "stable": 962
+ "stable": 982
},
"detections_by_tier": {
"imported": 6113,
- "stable": 860
+ "stable": 880
},
- "quarantined": 5937
+ "quarantined": 5921
},
"mitre_coverage": {
"techniques": {
@@ -47,7 +47,7 @@
"T1003.004": 13,
"T1003.005": 9,
"T1003.006": 13,
- "T1003.008": 4,
+ "T1003.008": 5,
"T1005": 18,
"T1006": 1,
"T1007": 11,
@@ -55,7 +55,7 @@
"T1010": 2,
"T1011": 1,
"T1012": 24,
- "T1014": 6,
+ "T1014": 7,
"T1016": 20,
"T1016.001": 1,
"T1018": 42,
@@ -70,7 +70,7 @@
"T1021.006": 22,
"T1021.007": 5,
"T1025": 3,
- "T1027": 102,
+ "T1027": 103,
"T1027.001": 3,
"T1027.002": 1,
"T1027.003": 5,
@@ -81,20 +81,20 @@
"T1027.011": 3,
"T1027.013": 1,
"T1029": 1,
- "T1030": 5,
+ "T1030": 6,
"T1033": 45,
"T1036": 50,
"T1036.002": 5,
"T1036.003": 36,
"T1036.004": 2,
- "T1036.005": 20,
+ "T1036.005": 21,
"T1036.006": 1,
"T1036.007": 3,
"T1036.008": 3,
"T1036.009": 2,
- "T1037": 2,
+ "T1037": 3,
"T1037.001": 5,
- "T1037.002": 1,
+ "T1037.002": 2,
"T1037.004": 3,
"T1037.005": 1,
"T1039": 4,
@@ -111,7 +111,7 @@
"T1053": 22,
"T1053.001": 1,
"T1053.002": 12,
- "T1053.003": 20,
+ "T1053.003": 21,
"T1053.005": 58,
"T1053.006": 5,
"T1053.007": 2,
@@ -125,26 +125,26 @@
"T1055.012": 6,
"T1055.013": 1,
"T1056": 2,
- "T1056.001": 3,
+ "T1056.001": 4,
"T1056.002": 4,
"T1057": 8,
- "T1059": 120,
+ "T1059": 121,
"T1059.001": 243,
- "T1059.002": 10,
+ "T1059.002": 11,
"T1059.003": 41,
- "T1059.004": 28,
+ "T1059.004": 29,
"T1059.005": 31,
"T1059.006": 4,
"T1059.007": 25,
"T1059.009": 4,
"T1059.012": 9,
"T1059.013": 1,
- "T1068": 37,
+ "T1068": 38,
"T1069": 8,
"T1069.001": 29,
"T1069.002": 35,
"T1069.003": 4,
- "T1070": 34,
+ "T1070": 35,
"T1070.001": 8,
"T1070.002": 1,
"T1070.003": 13,
@@ -160,7 +160,7 @@
"T1072": 9,
"T1074": 3,
"T1074.001": 6,
- "T1078": 127,
+ "T1078": 128,
"T1078.001": 10,
"T1078.002": 14,
"T1078.003": 11,
@@ -181,7 +181,7 @@
"T1098.001": 26,
"T1098.002": 6,
"T1098.003": 34,
- "T1098.004": 10,
+ "T1098.004": 11,
"T1098.005": 7,
"T1098.007": 1,
"T1102": 17,
@@ -218,9 +218,9 @@
"T1134.003": 3,
"T1134.004": 3,
"T1134.005": 5,
- "T1135": 14,
- "T1136": 10,
- "T1136.001": 31,
+ "T1135": 15,
+ "T1136": 11,
+ "T1136.001": 32,
"T1136.002": 7,
"T1136.003": 24,
"T1137": 11,
@@ -288,7 +288,7 @@
"T1485": 83,
"T1485.001": 2,
"T1486": 27,
- "T1489": 37,
+ "T1489": 38,
"T1490": 48,
"T1491": 2,
"T1491.001": 4,
@@ -326,8 +326,8 @@
"T1542.001": 4,
"T1542.003": 2,
"T1542.005": 1,
- "T1543": 24,
- "T1543.001": 7,
+ "T1543": 25,
+ "T1543.001": 8,
"T1543.002": 4,
"T1543.003": 60,
"T1543.004": 4,
@@ -359,7 +359,7 @@
"T1547.014": 3,
"T1547.015": 3,
"T1548": 34,
- "T1548.001": 10,
+ "T1548.001": 12,
"T1548.002": 76,
"T1548.003": 38,
"T1548.004": 1,
@@ -377,14 +377,14 @@
"T1552.006": 7,
"T1552.007": 9,
"T1553": 4,
- "T1553.001": 6,
+ "T1553.001": 7,
"T1553.002": 2,
"T1553.003": 4,
"T1553.004": 13,
"T1553.005": 11,
"T1554": 10,
"T1555": 13,
- "T1555.001": 6,
+ "T1555.001": 7,
"T1555.003": 15,
"T1555.004": 6,
"T1555.005": 5,
@@ -422,7 +422,7 @@
"T1562.012": 5,
"T1563.002": 4,
"T1564": 14,
- "T1564.001": 9,
+ "T1564.001": 10,
"T1564.002": 4,
"T1564.003": 11,
"T1564.004": 25,
@@ -444,7 +444,7 @@
"T1569": 5,
"T1569.001": 1,
"T1569.002": 50,
- "T1570": 9,
+ "T1570": 10,
"T1571": 9,
"T1572": 38,
"T1573": 7,
@@ -453,7 +453,7 @@
"T1574.001": 95,
"T1574.002": 4,
"T1574.005": 2,
- "T1574.006": 9,
+ "T1574.006": 10,
"T1574.007": 2,
"T1574.008": 1,
"T1574.009": 1,
@@ -514,7 +514,7 @@
"T1620": 6,
"T1621": 25,
"T1622": 1,
- "T1647": 1,
+ "T1647": 2,
"T1649": 22,
"T1653": 1,
"T1654": 1,
@@ -534,7 +534,7 @@
"T1690": 1
},
"unique_techniques": 493,
- "total_with_mitre": 5757,
+ "total_with_mitre": 5777,
"by_tier": {
"stable": {
"T1003": 2,
@@ -542,8 +542,9 @@
"T1003.002": 1,
"T1003.003": 2,
"T1003.006": 3,
- "T1003.008": 1,
+ "T1003.008": 2,
"T1011": 1,
+ "T1014": 1,
"T1018": 5,
"T1020": 2,
"T1021": 1,
@@ -551,9 +552,12 @@
"T1021.002": 7,
"T1021.004": 1,
"T1021.006": 3,
- "T1027": 4,
- "T1037": 1,
+ "T1027": 5,
+ "T1030": 1,
+ "T1036.005": 1,
+ "T1037": 2,
"T1037.001": 1,
+ "T1037.002": 1,
"T1037.004": 2,
"T1040": 2,
"T1041": 8,
@@ -564,20 +568,21 @@
"T1052": 2,
"T1052.001": 1,
"T1053.001": 1,
- "T1053.003": 4,
+ "T1053.003": 5,
"T1053.005": 4,
"T1053.006": 1,
"T1055": 2,
"T1055.001": 1,
"T1055.012": 1,
- "T1059": 7,
+ "T1056.001": 1,
+ "T1059": 8,
"T1059.001": 5,
- "T1059.002": 2,
- "T1059.004": 7,
+ "T1059.002": 3,
+ "T1059.004": 8,
"T1059.005": 1,
- "T1068": 2,
+ "T1068": 3,
"T1069.003": 1,
- "T1070": 2,
+ "T1070": 3,
"T1070.001": 3,
"T1070.002": 1,
"T1070.003": 2,
@@ -585,7 +590,7 @@
"T1071.001": 10,
"T1071.004": 5,
"T1074.001": 1,
- "T1078": 36,
+ "T1078": 37,
"T1078.001": 4,
"T1078.002": 3,
"T1078.003": 1,
@@ -600,7 +605,7 @@
"T1098": 28,
"T1098.001": 21,
"T1098.003": 8,
- "T1098.004": 6,
+ "T1098.004": 7,
"T1098.007": 1,
"T1105": 3,
"T1110": 9,
@@ -614,9 +619,9 @@
"T1127.001": 1,
"T1133": 13,
"T1134": 1,
- "T1135": 2,
- "T1136": 2,
- "T1136.001": 4,
+ "T1135": 3,
+ "T1136": 3,
+ "T1136.001": 5,
"T1136.003": 2,
"T1140": 1,
"T1176": 1,
@@ -647,7 +652,7 @@
"T1484.002": 2,
"T1485": 28,
"T1486": 8,
- "T1489": 1,
+ "T1489": 2,
"T1490": 7,
"T1496": 2,
"T1498": 4,
@@ -663,7 +668,8 @@
"T1537": 10,
"T1539": 4,
"T1542.001": 1,
- "T1543.001": 3,
+ "T1543": 1,
+ "T1543.001": 4,
"T1543.002": 2,
"T1543.003": 3,
"T1543.004": 2,
@@ -683,7 +689,7 @@
"T1547.010": 1,
"T1547.015": 2,
"T1548": 1,
- "T1548.001": 4,
+ "T1548.001": 6,
"T1548.002": 4,
"T1548.003": 2,
"T1548.004": 1,
@@ -697,12 +703,12 @@
"T1552.005": 2,
"T1552.007": 1,
"T1553": 1,
- "T1553.001": 4,
+ "T1553.001": 5,
"T1553.002": 1,
"T1553.004": 2,
"T1554": 1,
"T1555": 1,
- "T1555.001": 4,
+ "T1555.001": 5,
"T1555.003": 3,
"T1555.004": 1,
"T1555.005": 1,
@@ -728,6 +734,7 @@
"T1562.007": 1,
"T1562.008": 13,
"T1562.012": 2,
+ "T1564.001": 1,
"T1564.008": 1,
"T1565.001": 4,
"T1565.002": 1,
@@ -739,13 +746,13 @@
"T1567.002": 7,
"T1568.001": 2,
"T1568.002": 2,
- "T1570": 2,
+ "T1570": 3,
"T1572": 9,
"T1573": 1,
"T1573.002": 7,
"T1574": 1,
"T1574.002": 4,
- "T1574.006": 2,
+ "T1574.006": 3,
"T1578.002": 1,
"T1583.001": 4,
"T1592": 2,
@@ -759,6 +766,7 @@
"T1612": 1,
"T1620": 2,
"T1621": 5,
+ "T1647": 1,
"T1656": 1,
"T1659": 1
},
@@ -34638,30 +34646,6 @@
"enabled": true,
"path": "detections/cloud/m365-exchange-transport-rule-external-redirect.yaml"
},
- {
- "id": "det-cloud-192",
- "type": "detection",
- "name": "M365 Exchange Transport Rule Redirects Mail Externally",
- "description": "A transport rule was created or modified to redirect or BCC mail to an external domain. Attackers use this for persistent email exfiltration that survives password resets.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "high",
- "category": "cloud",
- "mitre_techniques": [
- "T1114.003",
- "T1020"
- ],
- "log_source": "m365",
- "playbook": "tpl-collection",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-exchange-transport-rule-redirect-external.yaml"
- },
{
"id": "det-cloud-193",
"type": "detection",
@@ -34685,30 +34669,6 @@
"enabled": true,
"path": "detections/cloud/m365-exchange-audit-bypass-enabled.yaml"
},
- {
- "id": "det-cloud-193",
- "type": "detection",
- "name": "M365 eDiscovery Compliance Search Created",
- "description": "Detects creation of an eDiscovery compliance search in Microsoft Purview. Insider threats and compromised admin accounts abuse eDiscovery to search and export mailbox contents at scale.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "high",
- "category": "cloud",
- "mitre_techniques": [
- "T1114.002",
- "T1213"
- ],
- "log_source": "m365",
- "playbook": "tpl-collection",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-exchange-ediscovery-search-created.yaml"
- },
{
"id": "det-cloud-194",
"type": "detection",
@@ -34733,29 +34693,6 @@
"enabled": true,
"path": "detections/cloud/m365-exchange-ediscovery-search-all-mailboxes.yaml"
},
- {
- "id": "det-cloud-194",
- "type": "detection",
- "name": "M365 Unified Audit Log Disabled",
- "description": "Detects disabling of the Microsoft 365 unified audit log. Attackers disable auditing early in a compromise to erase their trail across Exchange, SharePoint, Teams, and Entra ID.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "critical",
- "category": "cloud",
- "mitre_techniques": [
- "T1562.008"
- ],
- "log_source": "m365",
- "playbook": "tpl-defense-evasion",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-unified-audit-log-disabled.yaml"
- },
{
"id": "det-cloud-195",
"type": "detection",
@@ -34780,29 +34717,6 @@
"enabled": true,
"path": "detections/cloud/m365-exchange-ediscovery-export.yaml"
},
- {
- "id": "det-cloud-195",
- "type": "detection",
- "name": "M365 Exchange Inbound Connector From Untrusted Domain",
- "description": "Detects creation of an Exchange Online inbound connector that accepts mail from a specific external sender domain. Adversaries create connectors to bypass spam filters for phishing infrastructure.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "medium",
- "category": "cloud",
- "mitre_techniques": [
- "T1566"
- ],
- "log_source": "m365",
- "playbook": "tpl-initial-access",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-exchange-mail-connector-external-domain.yaml"
- },
{
"id": "det-cloud-196",
"type": "detection",
@@ -34827,30 +34741,6 @@
"enabled": true,
"path": "detections/cloud/m365-sharepoint-external-sharing-enabled-org.yaml"
},
- {
- "id": "det-cloud-196",
- "type": "detection",
- "name": "M365 SharePoint External Sharing Enabled Tenant-Wide",
- "description": "Detects tenant-level SharePoint sharing policy changed to allow external or anonymous sharing. Widens the data-loss attack surface across all sites.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "high",
- "category": "cloud",
- "mitre_techniques": [
- "T1567",
- "T1537"
- ],
- "log_source": "m365",
- "playbook": "tpl-exfiltration",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-tenant.yaml"
- },
{
"id": "det-cloud-197",
"type": "detection",
@@ -34874,29 +34764,6 @@
"enabled": true,
"path": "detections/cloud/m365-sharepoint-site-admin-external-user.yaml"
},
- {
- "id": "det-cloud-197",
- "type": "detection",
- "name": "M365 SharePoint Site Collection Admin Added",
- "description": "A new site collection administrator was added. Site collection admins bypass item-level permissions and can access all content including OneDrive for Business sites.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "medium",
- "category": "cloud",
- "mitre_techniques": [
- "T1098.003"
- ],
- "log_source": "m365",
- "playbook": "tpl-persistence",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-sharepoint-site-collection-admin-added.yaml"
- },
{
"id": "det-cloud-198",
"type": "detection",
@@ -34920,29 +34787,6 @@
"enabled": true,
"path": "detections/cloud/m365-teams-external-access-domain-added.yaml"
},
- {
- "id": "det-cloud-198",
- "type": "detection",
- "name": "M365 Teams External Access Policy Enabled",
- "description": "Teams external access was changed to allow federation with all external domains or specific unblocked domains. Attackers leverage external access to phish internal users via Teams chat.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "medium",
- "category": "cloud",
- "mitre_techniques": [
- "T1566.003"
- ],
- "log_source": "m365",
- "playbook": "tpl-initial-access",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-teams-external-access-enabled.yaml"
- },
{
"id": "det-cloud-199",
"type": "detection",
@@ -35415,6 +35259,170 @@
"enabled": true,
"path": "detections/cloud/gcp-audit-log-sink-deleted.yaml"
},
+ {
+ "id": "det-cloud-219",
+ "type": "detection",
+ "name": "M365 eDiscovery Compliance Search Created",
+ "description": "Detects creation of an eDiscovery compliance search in Microsoft Purview. Insider threats and compromised admin accounts abuse eDiscovery to search and export mailbox contents at scale.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1114.002",
+ "T1213"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-collection",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-exchange-ediscovery-search-created.yaml"
+ },
+ {
+ "id": "det-cloud-220",
+ "type": "detection",
+ "name": "M365 Exchange Inbound Connector From Untrusted Domain",
+ "description": "Detects creation of an Exchange Online inbound connector that accepts mail from a specific external sender domain. Adversaries create connectors to bypass spam filters for phishing infrastructure.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1566"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-initial-access",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-exchange-mail-connector-external-domain.yaml"
+ },
+ {
+ "id": "det-cloud-221",
+ "type": "detection",
+ "name": "M365 Exchange Transport Rule Redirects Mail Externally",
+ "description": "A transport rule was created or modified to redirect or BCC mail to an external domain. Attackers use this for persistent email exfiltration that survives password resets.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1114.003",
+ "T1020"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-collection",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-exchange-transport-rule-redirect-external.yaml"
+ },
+ {
+ "id": "det-cloud-222",
+ "type": "detection",
+ "name": "M365 SharePoint External Sharing Enabled Tenant-Wide",
+ "description": "Detects tenant-level SharePoint sharing policy changed to allow external or anonymous sharing. Widens the data-loss attack surface across all sites.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1567",
+ "T1537"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-exfiltration",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-tenant.yaml"
+ },
+ {
+ "id": "det-cloud-223",
+ "type": "detection",
+ "name": "M365 SharePoint Site Collection Admin Added",
+ "description": "A new site collection administrator was added. Site collection admins bypass item-level permissions and can access all content including OneDrive for Business sites.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1098.003"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-sharepoint-site-collection-admin-added.yaml"
+ },
+ {
+ "id": "det-cloud-224",
+ "type": "detection",
+ "name": "M365 Teams External Access Policy Enabled",
+ "description": "Teams external access was changed to allow federation with all external domains or specific unblocked domains. Attackers leverage external access to phish internal users via Teams chat.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1566.003"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-initial-access",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-teams-external-access-enabled.yaml"
+ },
+ {
+ "id": "det-cloud-225",
+ "type": "detection",
+ "name": "M365 Unified Audit Log Disabled",
+ "description": "Detects disabling of the Microsoft 365 unified audit log. Attackers disable auditing early in a compromise to erase their trail across Exchange, SharePoint, Teams, and Entra ID.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "critical",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1562.008"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-unified-audit-log-disabled.yaml"
+ },
{
"id": "det-data-exfil-001",
"type": "detection",
@@ -42326,6 +42334,484 @@
"enabled": true,
"path": "detections/endpoint/host-sccm-client-untrusted.yaml"
},
+ {
+ "id": "det-endpoint-281",
+ "type": "detection",
+ "name": "AMoS Stealer Virtual Machine Detection via osquery",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'AMoS Stealer Virtual Machine Detection via osquery'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1059.002"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-malware-execution",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-amos-stealer-vm-check.yaml"
+ },
+ {
+ "id": "det-endpoint-282",
+ "type": "detection",
+ "name": "macOS Data Chunking via dd or split",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Data Chunking via dd or split'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1030"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-data-exfil",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-data-chunking.yaml"
+ },
+ {
+ "id": "det-endpoint-283",
+ "type": "detection",
+ "name": "macOS Gatekeeper Bypass Attempt",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Gatekeeper Bypass Attempt'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1553.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-gatekeeper-bypass.yaml"
+ },
+ {
+ "id": "det-endpoint-284",
+ "type": "detection",
+ "name": "Suspicious PlistBuddy LaunchAgent Modification",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'Suspicious PlistBuddy LaunchAgent Modification'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1543.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-suspicious-plistbuddy.yaml"
+ },
+ {
+ "id": "det-endpoint-285",
+ "type": "detection",
+ "name": "Baron Samedit CVE-2021-3156 Exploit Attempt",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'Baron Samedit CVE-2021-3156 Exploit Attempt'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1068"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-privilege-escalation",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-linux-baron-samedit-cve-2021-3156.yaml"
+ },
+ {
+ "id": "det-endpoint-286",
+ "type": "detection",
+ "name": "Linux osqueryd Service Stop Detected via auditd",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'Linux osqueryd Service Stop Detected via auditd'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1489"
+ ],
+ "log_source": "linux",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-linux-auditd-service-stop.yaml"
+ },
+ {
+ "id": "det-endpoint-287",
+ "type": "detection",
+ "name": "macOS Local User Account Created",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Local User Account Created'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1136.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-account-anomaly",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-account-created.yaml"
+ },
+ {
+ "id": "det-endpoint-288",
+ "type": "detection",
+ "name": "macOS Hidden File or Directory Created",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Hidden File or Directory Created'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1564.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-hidden-file-directory.yaml"
+ },
+ {
+ "id": "det-endpoint-289",
+ "type": "detection",
+ "name": "macOS Kernel Extension Loaded via kextload",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Kernel Extension Loaded via kextload'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1543"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-kextload.yaml"
+ },
+ {
+ "id": "det-endpoint-290",
+ "type": "detection",
+ "name": "macOS Keychain Dumping Attempt",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Keychain Dumping Attempt'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1555.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-credential-theft",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-keychain-dump.yaml"
+ },
+ {
+ "id": "det-endpoint-291",
+ "type": "detection",
+ "name": "macOS System Log Removed or Manually Rotated",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS System Log Removed or Manually Rotated'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1070"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-log-removal.yaml"
+ },
+ {
+ "id": "det-endpoint-292",
+ "type": "detection",
+ "name": "macOS LoginHook Persistence via defaults write",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS LoginHook Persistence via defaults write'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1037.002"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-loginhook-persistence.yaml"
+ },
+ {
+ "id": "det-endpoint-293",
+ "type": "detection",
+ "name": "macOS Suspicious Living-Off-The-Land Binary Execution",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Suspicious Living-Off-The-Land Binary Execution'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "low",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1059.004"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-execution",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-lolbin-execution.yaml"
+ },
+ {
+ "id": "det-endpoint-294",
+ "type": "detection",
+ "name": "macOS Network Share Discovery via showmount or smbutil",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Network Share Discovery via showmount or smbutil'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "low",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1135"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-discovery",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-network-share-discovery.yaml"
+ },
+ {
+ "id": "det-endpoint-295",
+ "type": "detection",
+ "name": "macOS Plist Modification via plutil",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Plist Modification via plutil'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1647"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-plutil-plist-modification.yaml"
+ },
+ {
+ "id": "det-endpoint-296",
+ "type": "detection",
+ "name": "Process Tapping macOS Keyboard Events",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'Process Tapping macOS Keyboard Events'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1056.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-collection",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-keyboard-event-tap.yaml"
+ },
+ {
+ "id": "det-endpoint-297",
+ "type": "detection",
+ "name": "Sensitive System File Modified (FIM)",
+ "description": "A file in a sensitive system path (/etc/passwd, /etc/shadow, /etc/sudoers, /etc/crontab, /etc/hosts, /etc/ssh/sshd_config, /etc/ld.so.*) was created, deleted, or modified as reported by osquery file_events via the AiSOC FIM pipeline. Adversaries commonly target these files for credential theft (T1003.008), persistence (T1037, T1053.003), lateral movement, and privilege escalation (T1548.001).",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white",
+ "data_source.osquery",
+ "data_source.fim"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1003.008",
+ "T1037",
+ "T1053.003",
+ "T1548.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-credential-access",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/fim-sensitive-file-modified.yaml"
+ },
+ {
+ "id": "det-endpoint-298",
+ "type": "detection",
+ "name": "Executable Dropped in World-Writable Directory (FIM)",
+ "description": "An osquery file_events CREATED event was recorded for a file with a common executable extension (.sh, .py, .pl, .rb, .elf, .bin, no extension + executable path) under a world-writable path (/tmp, /var/tmp, /dev/shm, /run/shm). This is a classic indicator of malware staging, web shell deployment, or attacker tool transfer (T1027, T1059, T1036.005).",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white",
+ "data_source.osquery",
+ "data_source.fim"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1027",
+ "T1059",
+ "T1036.005",
+ "T1570"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/fim-binary-dropped-writable-dir.yaml"
+ },
+ {
+ "id": "det-endpoint-299",
+ "type": "detection",
+ "name": "LD_PRELOAD / ld.so.preload Tampered (FIM)",
+ "description": "The dynamic linker preload file /etc/ld.so.preload or any shared library under /etc/ld.so.conf.d/ was created or modified, as detected by osquery file_events via the AiSOC FIM pipeline. Attackers use ld.so.preload to inject arbitrary shared libraries into every process at startup, achieving rootkit-level stealth, credential capture, or privilege escalation (T1574.006 \u2013 Dynamic Linker Hijacking).",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white",
+ "data_source.osquery",
+ "data_source.fim"
+ ],
+ "severity": "critical",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1574.006",
+ "T1014",
+ "T1548.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/fim-ld-preload-modified.yaml"
+ },
+ {
+ "id": "det-endpoint-300",
+ "type": "detection",
+ "name": "SSH authorized_keys File Modified (FIM)",
+ "description": "An osquery file_events event recorded a change (CREATED, UPDATED, or ATTRIBUTES_MODIFIED) to any ~/.ssh/authorized_keys file across the fleet. Adversaries add their own public keys to authorized_keys files to establish persistent SSH backdoors that survive password resets and remain invisible to normal login monitoring (T1098.004 \u2013 Account Manipulation: SSH Authorized Keys).",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white",
+ "data_source.osquery",
+ "data_source.fim"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1098.004",
+ "T1078",
+ "T1136"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/fim-ssh-authorized-keys-changed.yaml"
+ },
{
"id": "det-identity-001",
"type": "detection",
@@ -158003,7 +158489,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1489"
],
@@ -158013,8 +158499,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/linux-auditd-osquery-service-stop.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/linux-auditd-osquery-service-stop.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "0c320fea-6e87-4b99-a884-74d09d4b655d",
@@ -163150,7 +163635,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1068"
],
@@ -163160,8 +163645,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/detect-baron-samedit-cve-2021-3156-via-osquery.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/detect-baron-samedit-cve-2021-3156-via-osquery.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "1de31d5d-8fa6-4ee0-af89-17069134118a",
@@ -163985,7 +164469,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1543.001"
],
@@ -163995,8 +164479,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/suspicious-plistbuddy-usage-via-osquery.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/suspicious-plistbuddy-usage-via-osquery.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "20ba6c32-c733-4a32-b64e-2688cf231399",
@@ -166285,7 +166768,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [],
"log_source": null,
"playbook": null,
@@ -166293,8 +166776,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/processes-tapping-keyboard-events.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/processes-tapping-keyboard-events.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "2a371608-331d-4034-ae2c-21dda8f1d0ec",
@@ -166942,7 +167424,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1553.001"
],
@@ -166952,8 +167434,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-gatekeeper-bypass.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-gatekeeper-bypass.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "2c9346f3-bbeb-48ce-8411-fc13d09d83a5",
@@ -173571,7 +174052,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1136"
],
@@ -173581,8 +174062,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-account-created.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-account-created.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "491004ae-694f-453e-b1e0-fc1e65daeea1",
@@ -174936,7 +175416,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1059.002"
],
@@ -174946,8 +175426,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-amos-stealer-virtual-machine-check-activity.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-amos-stealer-virtual-machine-check-activity.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "4e41ad21-9761-426d-8aa1-083712ff9f30",
@@ -175700,7 +176179,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1564.001"
],
@@ -175710,8 +176189,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-hidden-files-and-directories.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-hidden-files-and-directories.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "51c43b7b-e406-45d2-9bad-5c67f07e6528",
@@ -177528,7 +178006,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1059.004"
],
@@ -177538,8 +178016,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-lolbin.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-lolbin.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "58d270fb-5b39-418e-a855-4b8ac046805e",
@@ -186656,7 +187133,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1030"
],
@@ -186666,8 +187143,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-data-chunking.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-data-chunking.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "7f1c8bed-9bd4-40b0-a1df-c262cbade0fc",
@@ -195025,7 +195501,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1543"
],
@@ -195035,8 +195511,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-kextload-usage.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-kextload-usage.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "9d680775-84a6-4625-a8ea-8182b9427ce4",
@@ -195760,7 +196235,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1037.002"
],
@@ -195770,8 +196245,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-loginhook-persistence.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-loginhook-persistence.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "a04832e7-9d1d-49b1-a684-e31bcd775c77",
@@ -197590,7 +198064,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1135"
],
@@ -197600,8 +198074,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-network-share-discovery.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-network-share-discovery.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "a5f5fe52-8e50-4fb0-ad1b-780be6c0d857",
@@ -197956,7 +198429,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1070"
],
@@ -197966,8 +198439,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-log-removal.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-log-removal.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "a7f2e891-3c4d-4a1b-9e6f-2b8d0c5a1f3e",
@@ -204859,7 +205331,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1647"
],
@@ -204869,8 +205341,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-plutil.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-plutil.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "c11f2b57-92c1-4cd2-b46c-064eafb833ac",
@@ -212577,7 +213048,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1555.001"
],
@@ -212587,8 +213058,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-keychains-dumped.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-keychains-dumped.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "dcb45a09-5e6f-441e-b2f8-cbbf923e36d9",
@@ -223376,6 +223846,25 @@
"enabled": true,
"path": "playbooks/packs/v1/web-compromise/web-compromise-response.playbook.json"
},
+ {
+ "id": "aisoc-direct",
+ "type": "plugin",
+ "name": "AiSOC Direct (osquery TLS)",
+ "description": "Virtual connector that receives osquery telemetry from agents enrolled directly against AiSOC's built-in TLS endpoint (services/osquery-tls). No external fleet manager is required.",
+ "version": "0.1.0",
+ "author": "AiSOC Community",
+ "tags": [],
+ "plugin_type": null,
+ "license": "MIT",
+ "homepage": null,
+ "min_aisoc_version": null,
+ "sdks": [],
+ "mitre_techniques": [],
+ "verified": false,
+ "source": "core",
+ "tier": "beta",
+ "path": "plugins/aisoc-direct/plugin.yaml"
+ },
{
"id": "auth0",
"type": "plugin",
diff --git a/apps/web/src/app/(app)/onboarding/page.tsx b/apps/web/src/app/(app)/onboarding/page.tsx
index 0fed69566..8a2bfeda5 100644
--- a/apps/web/src/app/(app)/onboarding/page.tsx
+++ b/apps/web/src/app/(app)/onboarding/page.tsx
@@ -1,3 +1,4 @@
+import { Suspense } from 'react';
import { OnboardingView } from '@/components/onboarding/OnboardingView';
export const metadata = {
@@ -12,5 +13,9 @@ export const revalidate = 0;
export const fetchCache = 'force-no-store';
export default function OnboardingPage() {
- return <OnboardingView />;
+ return (
+ <Suspense fallback={null}>
+ <OnboardingView />
+ </Suspense>
+ );
}
diff --git a/apps/web/src/components/analytics/TeamAnalyticsView.tsx b/apps/web/src/components/analytics/TeamAnalyticsView.tsx
index 489ce95c0..96f959c26 100644
--- a/apps/web/src/components/analytics/TeamAnalyticsView.tsx
+++ b/apps/web/src/components/analytics/TeamAnalyticsView.tsx
@@ -167,7 +167,7 @@ export function TeamAnalyticsView() {
{sorted.length === 0 ? (
<EmptyState
- icon={<EmptyStateIcons.search />}
+ icon={EmptyStateIcons.search}
title="No analysts match your search"
description="Try a different name or clear the search to see all analysts."
action={
diff --git a/apps/web/src/components/coverage/CoverageAdvisorView.tsx b/apps/web/src/components/coverage/CoverageAdvisorView.tsx
index efa962518..b436d2a71 100644
--- a/apps/web/src/components/coverage/CoverageAdvisorView.tsx
+++ b/apps/web/src/components/coverage/CoverageAdvisorView.tsx
@@ -125,7 +125,7 @@ export default function CoverageAdvisorView() {
<tr>
<td colSpan={7} className="py-0">
<EmptyState
- icon={<EmptyStateIcons.shield />}
+ icon={EmptyStateIcons.shield}
title="No techniques match this filter"
description="Try selecting a different coverage status or view all techniques."
action={
diff --git a/apps/web/src/components/dashboard/DashboardView.tsx b/apps/web/src/components/dashboard/DashboardView.tsx
index 20aa4dec9..7511827fb 100644
--- a/apps/web/src/components/dashboard/DashboardView.tsx
+++ b/apps/web/src/components/dashboard/DashboardView.tsx
@@ -14,7 +14,7 @@
* Author: Beenu <[email protected]>
*/
-import React, { Component, type ErrorInfo, type ReactNode, useState, useEffect, useRef, useCallback } from 'react';
+import React, { Component, Suspense, type ErrorInfo, type ReactNode, useState, useEffect, useRef, useCallback } from 'react';
import useSWR from 'swr';
import { metricsApi, type DashboardMetrics } from '@/lib/api';
import { clsx } from 'clsx';
@@ -398,7 +398,7 @@ export function DashboardView() {
/** Map each widget ID to its rendered section. */
const widgetContent: Record<WidgetId, ReactNode> = {
- welcome: <DashboardWelcome />,
+ welcome: <Suspense fallback={null}><DashboardWelcome /></Suspense>,
'top-metrics': (
<div>
diff --git a/apps/web/src/components/easm/EASMView.tsx b/apps/web/src/components/easm/EASMView.tsx
index 8d19b6f1c..463a9804c 100644
--- a/apps/web/src/components/easm/EASMView.tsx
+++ b/apps/web/src/components/easm/EASMView.tsx
@@ -152,7 +152,7 @@ export function EASMView() {
<tr>
<td colSpan={5} className="py-0">
<EmptyState
- icon={<EmptyStateIcons.shield />}
+ icon={EmptyStateIcons.shield}
title="No assets match this filter"
description="Try selecting a different status filter or view all assets."
action={
diff --git a/apps/web/src/components/mssp/MSSPDashboardView.tsx b/apps/web/src/components/mssp/MSSPDashboardView.tsx
index 3aa7dad82..2903f5e7f 100644
--- a/apps/web/src/components/mssp/MSSPDashboardView.tsx
+++ b/apps/web/src/components/mssp/MSSPDashboardView.tsx
@@ -105,7 +105,7 @@ export default function MSSPDashboardView() {
</div>
{filteredTenants.length === 0 ? (
<EmptyState
- icon={<EmptyStateIcons.shield />}
+ icon={EmptyStateIcons.shield}
title="No tenants match this SLA filter"
description="Try a different status filter to view tenants."
action={
diff --git a/apps/web/src/components/noise/NoiseTuningView.tsx b/apps/web/src/components/noise/NoiseTuningView.tsx
index 1c09c18d5..8fc1b8d03 100644
--- a/apps/web/src/components/noise/NoiseTuningView.tsx
+++ b/apps/web/src/components/noise/NoiseTuningView.tsx
@@ -130,7 +130,7 @@ export default function NoiseTuningView() {
<tr>
<td colSpan={7} className="py-0">
<EmptyState
- icon={<EmptyStateIcons.search />}
+ icon={EmptyStateIcons.search}
title="No rules match your search"
description="Try a different rule name or clear the search field."
action={
diff --git a/apps/web/src/components/settings/RBACView.tsx b/apps/web/src/components/settings/RBACView.tsx
index 9c397972f..45ae32f23 100644
--- a/apps/web/src/components/settings/RBACView.tsx
+++ b/apps/web/src/components/settings/RBACView.tsx
@@ -299,7 +299,7 @@ export function RBACView() {
{roles && roles.length === 0 && (
<EmptyState
- icon={<EmptyStateIcons.shield />}
+ icon={EmptyStateIcons.shield}
title="No roles defined yet"
description="Create your first role to start managing access control for your organization."
action={
diff --git a/apps/web/src/components/shifts/ShiftsView.tsx b/apps/web/src/components/shifts/ShiftsView.tsx
index a4ccc41fc..7fe354816 100644
--- a/apps/web/src/components/shifts/ShiftsView.tsx
+++ b/apps/web/src/components/shifts/ShiftsView.tsx
@@ -157,7 +157,7 @@ export function ShiftsView() {
<tr>
<td colSpan={5} className="py-0">
<EmptyState
- icon={<EmptyStateIcons.search />}
+ icon={EmptyStateIcons.search}
title="No items match this priority"
description="Try selecting a different priority level or view all open handoff items."
action={
diff --git a/apps/web/src/lib/osquery-api.ts b/apps/web/src/lib/osquery-api.ts
index e371278a5..a17a75760 100644
--- a/apps/web/src/lib/osquery-api.ts
+++ b/apps/web/src/lib/osquery-api.ts
@@ -91,5 +91,5 @@ export function getFimEvents(params: FimEventsParams): Promise<FimEventsPage> {
}
export function getFimSummary(params: FimSummaryParams): Promise<FimSummary> {
- return get<FimSummary>('/fim/summary', params as Record<string, string>);
+ return get<FimSummary>('/fim/summary', { ...params });
}
diff --git a/detections/endpoint/fim-binary-dropped-writable-dir.yaml b/detections/endpoint/fim-binary-dropped-writable-dir.yaml
index 6ecd8a4aa..9daec4929 100644
--- a/detections/endpoint/fim-binary-dropped-writable-dir.yaml
+++ b/detections/endpoint/fim-binary-dropped-writable-dir.yaml
@@ -1,4 +1,4 @@
-id: det-endpoint-282
+id: det-endpoint-298
name: Executable Dropped in World-Writable Directory (FIM)
description: >
An osquery file_events CREATED event was recorded for a file with a common
diff --git a/detections/endpoint/fim-ld-preload-modified.yaml b/detections/endpoint/fim-ld-preload-modified.yaml
index fd8a49d08..511dc9ddd 100644
--- a/detections/endpoint/fim-ld-preload-modified.yaml
+++ b/detections/endpoint/fim-ld-preload-modified.yaml
@@ -1,4 +1,4 @@
-id: det-endpoint-283
+id: det-endpoint-299
name: LD_PRELOAD / ld.so.preload Tampered (FIM)
description: >
The dynamic linker preload file /etc/ld.so.preload or any shared library
diff --git a/detections/endpoint/fim-sensitive-file-modified.yaml b/detections/endpoint/fim-sensitive-file-modified.yaml
index c43843288..3fb4e26ab 100644
--- a/detections/endpoint/fim-sensitive-file-modified.yaml
+++ b/detections/endpoint/fim-sensitive-file-modified.yaml
@@ -1,4 +1,4 @@
-id: det-endpoint-281
+id: det-endpoint-297
name: Sensitive System File Modified (FIM)
description: >
A file in a sensitive system path (/etc/passwd, /etc/shadow, /etc/sudoers,
diff --git a/detections/endpoint/fim-ssh-authorized-keys-changed.yaml b/detections/endpoint/fim-ssh-authorized-keys-changed.yaml
index e51f359b9..c08cc6889 100644
--- a/detections/endpoint/fim-ssh-authorized-keys-changed.yaml
+++ b/detections/endpoint/fim-ssh-authorized-keys-changed.yaml
@@ -1,4 +1,4 @@
-id: det-endpoint-284
+id: det-endpoint-300
name: SSH authorized_keys File Modified (FIM)
description: >
An osquery file_events event recorded a change (CREATED, UPDATED, or
diff --git a/docs/openapi.yaml b/docs/openapi.yaml
index 7d951f9a1..e1bb22919 100644
--- a/docs/openapi.yaml
+++ b/docs/openapi.yaml
@@ -1,50 +1,9 @@
openapi: 3.1.0
info:
title: AiSOC Platform API
- description: |
- Open-source AI Security Operations Center (v5.2.0).
-
- Autonomous threat detection, investigation, and response — with UEBA behavioral
- analytics, honeytoken deception, purple-team adversary emulation, enterprise RBAC,
- immutable audit logging, the v5.2 Investigation Ledger (signed agent actions),
- Ambient Copilot, Responder PWA, public evaluation harness, MCP server, and
- SOC 2 / ISO 27001 / NIST CSF compliance dashboards.
-
- ## Authentication
- Most endpoints require a JWT Bearer token obtained from `POST /api/v1/auth/login`.
- Service-to-service calls may use an API key via `X-API-Key` header.
-
- ## Multi-tenancy
- All data is isolated via PostgreSQL Row-Level Security. The `tenant_id` is derived
- from the authenticated token and cannot be overridden by the caller.
-
- ## Rate limiting
- Default: 1000 req/min per API key; 100 req/min per user token.
- Limits are surfaced via `X-RateLimit-*` response headers.
- version: 5.2.0
- contact:
- name: AiSOC Community
- url: https://github.com/beenuar/AiSOC/security/advisories/new
- license:
- name: MIT
- url: https://opensource.org/licenses/MIT
-x-tagGroups:
- - name: Identity & Access
- tags: [auth, api-keys, rbac]
- - name: Detection & Hunting
- tags: [alerts, rules, detections]
- - name: Cases & Response
- tags: [cases, playbooks, actions]
- - name: Threat Intelligence
- tags: [intel, enrichment]
- - name: Advanced Detection
- tags: [ueba, honeytokens, purple-team]
- - name: Plugins & Marketplace
- tags: [plugins, marketplace]
- - name: Governance
- tags: [compliance, audit, sla]
- - name: Graph
- tags: [graph]
+ description: AiSOC — open-source AI Security Operations Center. Autonomous threat
+ detection, investigation, and response.
+ version: 0.1.0
paths:
/api/v1/auth/login:
post:
@@ -114,6 +73,41 @@ paths:
$ref: '#/components/schemas/UserMeResponse'
security:
- HTTPBearer: []
+ /api/v1/auth/me/preferences:
+ patch:
+ tags:
+ - auth
+ summary: Patch Me Preferences
+ description: 'Merge user preferences (e.g. theme) into the stored JSONB column.
+
+
+ Only the keys supplied in the request body are updated; all other
+
+ existing keys are preserved. This lets the frontend evolve independent
+
+ preference namespaces without overwriting each other.'
+ operationId: patch_me_preferences_api_v1_auth_me_preferences_patch
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PreferencesPatch'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserMeResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
/api/v1/api-keys:
post:
tags:
@@ -454,63 +448,107 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/alerts/{alert_id}/snooze:
+ post:
+ tags:
+ - alerts
+ summary: Snooze Alert
+ description: 'Defer an alert for a fixed window from the mobile responder PWA.
+
+
+ Either ``duration_minutes`` or ``until`` must be supplied. The alert
+
+ re-surfaces in the queue once ``snoozed_until`` is in the past.'
+ operationId: snooze_alert_api_v1_alerts__alert_id__snooze_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: alert_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Alert Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlertSnoozeRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlertResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
/api/v1/cases:
get:
tags:
- cases
- summary: List Cases
- description: List cases with filtering.
+ summary: List cases
operationId: list_cases_api_v1_cases_get
security:
- HTTPBearer: []
parameters:
- - name: page
- in: query
- required: false
- schema:
- type: integer
- minimum: 1
- default: 1
- title: Page
- - name: page_size
+ - name: status
in: query
required: false
schema:
- type: integer
- maximum: 100
- minimum: 1
- default: 25
- title: Page Size
- - name: status
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ - name: severity
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
- title: Status
- - name: priority
+ title: Severity
+ - name: assignee
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
- title: Priority
- - name: assigned_to_me
+ title: Assignee
+ - name: limit
in: query
required: false
schema:
- type: boolean
- default: false
- title: Assigned To Me
+ type: integer
+ maximum: 500
+ minimum: 1
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/CaseListResponse'
+ type: array
+ items:
+ $ref: '#/components/schemas/CaseResponse'
+ title: Response List Cases Api V1 Cases Get
'422':
description: Validation Error
content:
@@ -520,8 +558,7 @@ paths:
post:
tags:
- cases
- summary: Create Case
- description: Create a new security case.
+ summary: Create case
operationId: create_case_api_v1_cases_post
security:
- HTTPBearer: []
@@ -548,8 +585,7 @@ paths:
get:
tags:
- cases
- summary: Get Case
- description: Get a case by ID.
+ summary: Get case
operationId: get_case_api_v1_cases__case_id__get
security:
- HTTPBearer: []
@@ -559,7 +595,6 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
responses:
'200':
@@ -577,8 +612,7 @@ paths:
patch:
tags:
- cases
- summary: Update Case
- description: Update a case.
+ summary: Update case
operationId: update_case_api_v1_cases__case_id__patch
security:
- HTTPBearer: []
@@ -588,7 +622,6 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
requestBody:
required: true
@@ -609,13 +642,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/cases/{case_id}/timeline:
+ /api/v1/cases/{case_id}/alerts:
post:
tags:
- cases
- summary: Add Timeline Event
- description: Add a comment or event to the case timeline.
- operationId: add_timeline_event_api_v1_cases__case_id__timeline_post
+ summary: Link alerts to a case
+ operationId: add_alerts_api_v1_cases__case_id__alerts_post
security:
- HTTPBearer: []
parameters:
@@ -624,33 +656,32 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/AddTimelineEventRequest'
+ $ref: '#/components/schemas/AddAlertsRequest'
responses:
- '201':
+ '200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/TimelineEventResponse'
+ $ref: '#/components/schemas/CaseResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- get:
+ /api/v1/cases/{case_id}/observables:
+ post:
tags:
- cases
- summary: Get Timeline
- description: Get the full timeline for a case.
- operationId: get_timeline_api_v1_cases__case_id__timeline_get
+ summary: Update observable graph
+ operationId: update_observables_api_v1_cases__case_id__observables_post
security:
- HTTPBearer: []
parameters:
@@ -659,33 +690,32 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateObservablesRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- type: array
- items:
- $ref: '#/components/schemas/TimelineEventResponse'
- title: Response Get Timeline Api V1 Cases Case Id Timeline Get
+ $ref: '#/components/schemas/CaseResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/cases/{case_id}/investigate:
+ /api/v1/cases/{case_id}/comments:
post:
tags:
- cases
- summary: Investigate Case
- description: 'Trigger an autonomous AI investigation for this case.
-
- Proxies to the agents service Pillar-1 orchestrator.'
- operationId: investigate_case_api_v1_cases__case_id__investigate_post
+ summary: Add comment
+ operationId: add_comment_api_v1_cases__case_id__comments_post
security:
- HTTPBearer: []
parameters:
@@ -694,34 +724,31 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/InvestigateRequest'
+ $ref: '#/components/schemas/AddCommentRequest'
responses:
- '202':
+ '201':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/InvestigateResponse'
+ $ref: '#/components/schemas/CommentResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/cases/{case_id}/investigations/{run_id}:
get:
tags:
- cases
- summary: Get Case Investigation
- description: 'Proxy: poll investigation run status from the agents service.'
- operationId: get_case_investigation_api_v1_cases__case_id__investigations__run_id__get
+ summary: List case comments
+ operationId: list_comments_api_v1_cases__case_id__comments_get
security:
- HTTPBearer: []
parameters:
@@ -730,37 +757,29 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
- - name: run_id
- in: path
- required: true
- schema:
- type: string
- title: Run Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- type: object
- additionalProperties: true
- title: Response Get Case Investigation Api V1 Cases Case Id Investigations Run
- Id Get
+ type: array
+ items:
+ $ref: '#/components/schemas/CommentResponse'
+ title: Response List Comments Api V1 Cases Case Id Comments Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/cases/{case_id}/investigations/{run_id}/report.md:
+ /api/v1/cases/{case_id}/notes:
get:
tags:
- cases
- summary: Get Case Report Md
- description: 'Proxy: download Markdown incident report from the agents service.'
- operationId: get_case_report_md_api_v1_cases__case_id__investigations__run_id__report_md_get
+ summary: List case notes (alias of /comments)
+ operationId: list_notes_api_v1_cases__case_id__notes_get
security:
- HTTPBearer: []
parameters:
@@ -769,35 +788,28 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
- - name: run_id
- in: path
- required: true
- schema:
- type: string
- title: Run Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- title: Response Get Case Report Md Api V1 Cases Case Id Investigations Run
- Id Report Md Get
+ type: array
+ items:
+ $ref: '#/components/schemas/CommentResponse'
+ title: Response List Notes Api V1 Cases Case Id Notes Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/cases/{case_id}/investigations/{run_id}/report.html:
- get:
+ post:
tags:
- cases
- summary: Get Case Report Html
- description: 'Proxy: download HTML incident report from the agents service.'
- operationId: get_case_report_html_api_v1_cases__case_id__investigations__run_id__report_html_get
+ summary: Add case note (alias of /comments)
+ operationId: add_note_api_v1_cases__case_id__notes_post
security:
- HTTPBearer: []
parameters:
@@ -806,36 +818,32 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
- - name: run_id
- in: path
+ requestBody:
required: true
- schema:
- type: string
- title: Run Id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AddCommentRequest'
responses:
- '200':
+ '201':
description: Successful Response
content:
application/json:
schema:
- title: Response Get Case Report Html Api V1 Cases Case Id Investigations Run
- Id Report Html Get
+ $ref: '#/components/schemas/CommentResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/cases/{case_id}/investigations/{run_id}/report.pdf:
+ /api/v1/cases/{case_id}/evidence:
get:
tags:
- cases
- summary: Get Case Report Pdf
- description: 'Proxy: download PDF incident report (rendered by weasyprint in
- agents service).'
- operationId: get_case_report_pdf_api_v1_cases__case_id__investigations__run_id__report_pdf_get
+ summary: Export evidence chain report
+ operationId: evidence_report_api_v1_cases__case_id__evidence_get
security:
- HTTPBearer: []
parameters:
@@ -844,182 +852,174 @@ paths:
required: true
schema:
type: string
- format: uuid
title: Case Id
- - name: run_id
- in: path
- required: true
- schema:
- type: string
- title: Run Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- title: Response Get Case Report Pdf Api V1 Cases Case Id Investigations Run
- Id Report Pdf Get
+ $ref: '#/components/schemas/EvidenceReport'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/connectors:
+ /api/v1/cases/{case_id}/timeline:
get:
tags:
- - connectors
- summary: List Connectors
- description: List all connectors for the tenant.
- operationId: list_connectors_api_v1_connectors_get
- responses:
- '200':
- description: Successful Response
- content:
- application/json:
- schema:
- items:
- $ref: '#/components/schemas/ConnectorResponse'
- type: array
- title: Response List Connectors Api V1 Connectors Get
+ - cases
+ summary: Case activity timeline
+ operationId: case_timeline_api_v1_cases__case_id__timeline_get
security:
- HTTPBearer: []
- post:
- tags:
- - connectors
- summary: Create Connector
- description: Create a new connector.
- operationId: create_connector_api_v1_connectors_post
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateConnectorRequest'
+ parameters:
+ - name: case_id
+ in: path
required: true
+ schema:
+ type: string
+ title: Case Id
responses:
- '201':
+ '200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/ConnectorResponse'
+ $ref: '#/components/schemas/app__api__v1__endpoints__cases__TimelineResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- security:
- - HTTPBearer: []
- /api/v1/connectors/{connector_id}:
+ /api/v1/cases/{case_id}/tasks:
get:
tags:
- - connectors
- summary: Get Connector
- description: Get a connector by ID.
- operationId: get_connector_api_v1_connectors__connector_id__get
+ - cases
+ summary: List case tasks
+ operationId: list_tasks_api_v1_cases__case_id__tasks_get
security:
- HTTPBearer: []
parameters:
- - name: connector_id
+ - name: case_id
in: path
required: true
schema:
type: string
- format: uuid
- title: Connector Id
+ title: Case Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/ConnectorResponse'
+ type: array
+ items:
+ $ref: '#/components/schemas/TaskResponse'
+ title: Response List Tasks Api V1 Cases Case Id Tasks Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- patch:
+ post:
tags:
- - connectors
- summary: Update Connector
- description: Update a connector's configuration or state.
- operationId: update_connector_api_v1_connectors__connector_id__patch
+ - cases
+ summary: Create task
+ operationId: create_task_api_v1_cases__case_id__tasks_post
security:
- HTTPBearer: []
parameters:
- - name: connector_id
+ - name: case_id
in: path
required: true
schema:
type: string
- format: uuid
- title: Connector Id
+ title: Case Id
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/UpdateConnectorRequest'
+ $ref: '#/components/schemas/CreateTaskRequest'
responses:
- '200':
+ '201':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/ConnectorResponse'
+ $ref: '#/components/schemas/TaskResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- delete:
+ /api/v1/cases/{case_id}/tasks/{task_id}:
+ patch:
tags:
- - connectors
- summary: Delete Connector
- description: Delete a connector.
- operationId: delete_connector_api_v1_connectors__connector_id__delete
+ - cases
+ summary: Update task
+ operationId: update_task_api_v1_cases__case_id__tasks__task_id__patch
security:
- HTTPBearer: []
parameters:
- - name: connector_id
+ - name: case_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Case Id
+ - name: task_id
in: path
required: true
schema:
type: string
format: uuid
- title: Connector Id
+ title: Task Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateTaskRequest'
responses:
- '204':
+ '200':
description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaskResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/connectors/{connector_id}/test:
+ /api/v1/cases/{case_id}/investigate:
post:
tags:
- - connectors
- summary: Test Connector
- description: Test connectivity for a connector (stub - to be implemented per
- connector type).
- operationId: test_connector_api_v1_connectors__connector_id__test_post
+ - cases
+ summary: Launch investigation for case
+ operationId: case_investigate_api_v1_cases__case_id__investigate_post
security:
- HTTPBearer: []
parameters:
- - name: connector_id
+ - name: case_id
in: path
required: true
schema:
type: string
- format: uuid
- title: Connector Id
+ title: Case Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InvestigateRequest'
responses:
'200':
description: Successful Response
@@ -1028,7 +1028,7 @@ paths:
schema:
type: object
additionalProperties: true
- title: Response Test Connector Api V1 Connectors Connector Id Test
+ title: Response Case Investigate Api V1 Cases Case Id Investigate
Post
'422':
description: Validation Error
@@ -1036,360 +1036,336 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/tenants/me:
+ /api/v1/cases/{case_id}/investigations:
get:
tags:
- - tenants
- summary: Get My Tenant
- description: Get the current user's tenant details.
- operationId: get_my_tenant_api_v1_tenants_me_get
- responses:
- '200':
- description: Successful Response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TenantResponse'
+ - cases
+ summary: List investigation runs for a case
+ description: 'List all investigation runs for a case.
+
+
+ The agents service is the source of truth. When it''s unreachable we return
+
+ an empty list rather than 503 so the case detail page still renders.'
+ operationId: list_case_investigations_api_v1_cases__case_id__investigations_get
security:
- HTTPBearer: []
- /api/v1/tenants/me/settings:
- patch:
- tags:
- - tenants
- summary: Update Tenant Settings
- description: Update tenant settings.
- operationId: update_tenant_settings_api_v1_tenants_me_settings_patch
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateTenantSettingsRequest'
+ parameters:
+ - name: case_id
+ in: path
required: true
+ schema:
+ type: string
+ title: Case Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/TenantResponse'
+ type: object
+ additionalProperties: true
+ title: Response List Case Investigations Api V1 Cases Case Id Investigations
+ Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- security:
- - HTTPBearer: []
- /api/v1/tenants/me/users:
+ /api/v1/cases/{case_id}/investigations/{run_id}:
get:
tags:
- - tenants
- summary: List Users
- description: List all users in the current tenant.
- operationId: list_users_api_v1_tenants_me_users_get
- responses:
- '200':
- description: Successful Response
- content:
- application/json:
- schema:
- items:
- $ref: '#/components/schemas/UserResponse'
- type: array
- title: Response List Users Api V1 Tenants Me Users Get
- security:
- - HTTPBearer: []
- post:
- tags:
- - tenants
- summary: Create User
- description: Create a new user in the current tenant.
- operationId: create_user_api_v1_tenants_me_users_post
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateUserRequest'
- required: true
- responses:
- '201':
- description: Successful Response
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UserResponse'
- '422':
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HTTPValidationError'
- security:
- - HTTPBearer: []
- /api/v1/tenants/me/users/{user_id}:
- patch:
- tags:
- - tenants
- summary: Update User
- description: Update a user.
- operationId: update_user_api_v1_tenants_me_users__user_id__patch
+ - cases
+ summary: Get investigation run
+ operationId: case_investigation_run_api_v1_cases__case_id__investigations__run_id__get
security:
- HTTPBearer: []
parameters:
- - name: user_id
+ - name: case_id
in: path
required: true
schema:
type: string
- format: uuid
- title: User Id
- requestBody:
+ title: Case Id
+ - name: run_id
+ in: path
required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateUserRequest'
+ schema:
+ type: string
+ title: Run Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/UserResponse'
+ type: object
+ additionalProperties: true
+ title: Response Case Investigation Run Api V1 Cases Case Id Investigations Run
+ Id Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/rules:
+ /api/v1/cases/{case_id}/summary:
get:
tags:
- - detection_rules
- summary: List Rules
- description: List detection rules for the tenant (includes built-in platform
- rules).
- operationId: list_rules_api_v1_rules_get
+ - cases
+ summary: Download the per-case auto-summary (JSON or HTML)
+ operationId: case_auto_summary_api_v1_cases__case_id__summary_get
security:
- HTTPBearer: []
parameters:
- - name: category
- in: query
- required: false
- schema:
- anyOf:
- - type: string
- - type: 'null'
- title: Category
- - name: rule_language
- in: query
- required: false
+ - name: case_id
+ in: path
+ required: true
schema:
- anyOf:
- - type: string
- - type: 'null'
- title: Rule Language
- - name: include_builtin
+ type: string
+ title: Case Id
+ - name: format
in: query
required: false
schema:
- type: boolean
- default: true
- title: Include Builtin
+ enum:
+ - json
+ - html
+ type: string
+ description: Response format. ``json`` returns the structured CaseAutoSummary;
+ ``html`` returns a print-ready report (use the browser's Save-as-PDF affordance
+ for archival).
+ default: json
+ title: Format
+ description: Response format. ``json`` returns the structured CaseAutoSummary;
+ ``html`` returns a print-ready report (use the browser's Save-as-PDF affordance
+ for archival).
responses:
'200':
description: Successful Response
content:
application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/DetectionRuleResponse'
- title: Response List Rules Api V1 Rules Get
+ schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- post:
+ /api/v1/cases/{case_id}/investigations/{run_id}/report.pdf:
+ get:
tags:
- - detection_rules
- summary: Create Rule
- description: Create a new detection rule.
- operationId: create_rule_api_v1_rules_post
+ - cases
+ summary: Download investigation PDF report
+ operationId: case_investigation_pdf_api_v1_cases__case_id__investigations__run_id__report_pdf_get
security:
- HTTPBearer: []
- requestBody:
+ parameters:
+ - name: case_id
+ in: path
required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateRuleRequest'
+ schema:
+ type: string
+ title: Case Id
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Run Id
responses:
- '201':
+ '200':
description: Successful Response
content:
application/json:
- schema:
- $ref: '#/components/schemas/DetectionRuleResponse'
+ schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/rules/{rule_id}:
+ /api/v1/cases/{case_id}/related:
get:
tags:
- - detection_rules
- summary: Get Rule
- description: Get a detection rule by ID.
- operationId: get_rule_api_v1_rules__rule_id__get
+ - cases
+ summary: List related cases (by alert/observable overlap)
+ description: 'Return other cases that share alerts or observables with this
+ case.
+
+
+ This is intentionally a lightweight heuristic — we look for cases that
+
+ overlap on `alert_ids` or share an observable IP/host. It''s the smallest
+
+ thing the case detail page needs to stop 404''ing.'
+ operationId: list_related_cases_api_v1_cases__case_id__related_get
security:
- HTTPBearer: []
parameters:
- - name: rule_id
+ - name: case_id
in: path
required: true
schema:
type: string
- format: uuid
- title: Rule Id
+ title: Case Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/DetectionRuleResponse'
+ type: object
+ additionalProperties: true
+ title: Response List Related Cases Api V1 Cases Case Id Related
+ Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- patch:
+ /api/v1/connectors/catalog:
+ get:
tags:
- - detection_rules
- summary: Update Rule
- description: Update a detection rule (only tenant-owned rules).
- operationId: update_rule_api_v1_rules__rule_id__patch
+ - connectors
+ summary: List Catalog
+ description: 'Return the catalog of available connectors with their schemas.
+
+
+ The wizard calls this once on open to populate the connector picker
+
+ and to render the schema-driven configuration form. It is tenant-agnostic
+
+ — every tenant in this build sees the same catalog — but still gated
+
+ behind authentication.'
+ operationId: list_catalog_api_v1_connectors_catalog_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response List Catalog Api V1 Connectors Catalog Get
security:
- HTTPBearer: []
- parameters:
- - name: rule_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- title: Rule Id
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateRuleRequest'
+ /api/v1/connectors/health:
+ get:
+ tags:
+ - connectors
+ summary: Connector Health Summary
+ description: 'Aggregate per-tenant connector health for the dashboard tile.
+
+
+ Single SELECT scan; we deliberately do *not* group in SQL because
+
+ Postgres'' filter expressions over a few hundred rows are negligible
+
+ compared to the round-trip, and the resulting Python is a lot easier
+
+ to read than five COUNT(*) FILTER clauses.'
+ operationId: connector_health_summary_api_v1_connectors_health_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/DetectionRuleResponse'
- '422':
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HTTPValidationError'
- delete:
- tags:
- - detection_rules
- summary: Delete Rule
- description: Delete a tenant-owned detection rule.
- operationId: delete_rule_api_v1_rules__rule_id__delete
+ $ref: '#/components/schemas/ConnectorHealthSummary'
security:
- HTTPBearer: []
- parameters:
- - name: rule_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- title: Rule Id
- responses:
- '204':
- description: Successful Response
- '422':
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HTTPValidationError'
- /api/v1/rules/{rule_id}/execute:
+ /api/v1/connectors/test:
post:
tags:
- - detection_rules
- summary: Execute a detection rule against provided events
- description: 'Execute a single detection rule against a set of events and return
- matches.
+ - connectors
+ summary: Test Connection
+ description: 'Wizard-side "Test connection" before saving.
- Useful for testing rules in the detection IDE before enabling them.'
- operationId: execute_detection_rule_api_v1_rules__rule_id__execute_post
- security:
- - HTTPBearer: []
- parameters:
- - name: rule_id
- in: path
- required: true
- schema:
- type: string
- format: uuid
- title: Rule Id
+
+ The wizard sends plaintext credentials directly here. We validate the
+
+ connector type against the catalog, then forward the payload to the
+
+ connectors microservice''s stateless test endpoint. **Nothing is
+
+ persisted** — these credentials never touch Postgres or the vault.'
+ operationId: test_connection_api_v1_connectors_test_post
requestBody:
- required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/ExecuteRuleRequest'
+ $ref: '#/components/schemas/TestConnectionRequest'
+ required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/ExecuteRuleResponse'
+ additionalProperties: true
+ type: object
+ title: Response Test Connection Api V1 Connectors Test Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/rules/hunt:
+ security:
+ - HTTPBearer: []
+ /api/v1/connectors:
+ get:
+ tags:
+ - connectors
+ summary: List Connectors
+ description: List all connector instances for the caller's tenant.
+ operationId: list_connectors_api_v1_connectors_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/ConnectorResponse'
+ type: array
+ title: Response List Connectors Api V1 Connectors Get
+ security:
+ - HTTPBearer: []
post:
tags:
- - detection_rules
- summary: 'Threat hunt: run detection rules against a set of events'
- description: 'Run multiple detection rules against provided events (threat hunting).
+ - connectors
+ summary: Create Connector
+ description: 'Create a new connector instance.
- If rule_ids is omitted, all active tenant rules are used.'
- operationId: hunt_api_v1_rules_hunt_post
+
+ ``connector_type`` is validated against the live catalog. ``category``
+
+ defaults to the catalog entry''s category if the caller doesn''t override
+
+ it — that''s the common case and keeps the wizard payload small.
+
+ ``auth_config`` is encrypted with the credential vault before it
+
+ touches Postgres.'
+ operationId: create_connector_api_v1_connectors_post
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/HuntRequest'
+ $ref: '#/components/schemas/CreateConnectorRequest'
required: true
responses:
- '200':
+ '201':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/HuntResponse'
+ $ref: '#/components/schemas/ConnectorResponse'
'422':
description: Validation Error
content:
@@ -1398,237 +1374,265 @@ paths:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
- /api/v1/graph/attack-path/{case_id}:
+ /api/v1/connectors/{connector_id}:
get:
tags:
- - graph
- summary: Get attack path graph for a case
- description: 'Traverse the knowledge graph from a Case node to reconstruct the
- full
-
- attack path: Case → Alerts → Hosts/Users → IOCs → MITRE Techniques.'
- operationId: get_attack_path_api_v1_graph_attack_path__case_id__get
+ - connectors
+ summary: Get Connector
+ description: Get a connector instance by ID, scoped to the caller's tenant.
+ operationId: get_connector_api_v1_connectors__connector_id__get
security:
- HTTPBearer: []
parameters:
- - name: case_id
+ - name: connector_id
in: path
required: true
schema:
type: string
- title: Case Id
- - name: max_depth
- in: query
- required: false
- schema:
- type: integer
- maximum: 10
- minimum: 1
- default: 6
- title: Max Depth
+ format: uuid
+ title: Connector Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/AttackPathResponse'
+ $ref: '#/components/schemas/ConnectorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/graph/blast-radius/{entity_type}/{entity_id}:
- get:
+ patch:
tags:
- - graph
- summary: Compute blast radius from an entity
- description: 'Compute the blast radius starting from a Host, User, or IOC node.
+ - connectors
+ summary: Update Connector
+ description: 'Update a connector''s configuration or state.
- Returns all entities reachable within `hops` and a severity score.'
- operationId: get_blast_radius_api_v1_graph_blast_radius__entity_type___entity_id__get
+
+ The PATCH semantics here are deliberately conservative: only fields
+
+ the caller actually supplies are touched. Notably, sending an empty
+
+ ``auth_config`` dict will overwrite all secrets — the wizard must
+
+ therefore omit the field entirely when the operator hasn''t re-typed
+
+ credentials.'
+ operationId: update_connector_api_v1_connectors__connector_id__patch
security:
- HTTPBearer: []
parameters:
- - name: entity_type
+ - name: connector_id
in: path
required: true
schema:
type: string
- title: Entity Type
- - name: entity_id
- in: path
+ format: uuid
+ title: Connector Id
+ requestBody:
required: true
- schema:
- type: string
- title: Entity Id
- - name: hops
- in: query
- required: false
- schema:
- type: integer
- maximum: 6
- minimum: 1
- default: 3
- title: Hops
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateConnectorRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/BlastRadiusResponse'
+ $ref: '#/components/schemas/ConnectorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/graph/neighbors/{entity_type}/{entity_id}:
- get:
+ delete:
tags:
- - graph
- summary: Get immediate graph neighbors of an entity
- description: Return all nodes directly connected (depth 1) to the specified
- entity.
- operationId: get_entity_neighbors_api_v1_graph_neighbors__entity_type___entity_id__get
+ - connectors
+ summary: Delete Connector
+ description: Delete a connector instance.
+ operationId: delete_connector_api_v1_connectors__connector_id__delete
security:
- HTTPBearer: []
parameters:
- - name: entity_type
+ - name: connector_id
in: path
required: true
schema:
type: string
- title: Entity Type
- - name: entity_id
+ format: uuid
+ title: Connector Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/connectors/{connector_id}/capabilities:
+ put:
+ tags:
+ - connectors
+ summary: Update Connector Capabilities
+ description: "Downscope which capabilities the agent may invoke against this\
+ \ instance.\n\nThe contract:\n\n* ``allowed_capabilities = None`` clears the\
+ \ downscope. The agent reverts\n to the connector class's full ``capabilities()``\
+ \ declaration.\n* ``allowed_capabilities = []`` is a *legitimate* operator\
+ \ action: it\n pins the agent to zero capabilities for this instance. Polling\
+ \ and\n data ingestion are unaffected — only agent-initiated actions are\n\
+ \ gated by this column.\n* Any string in the list MUST appear in the connector\
+ \ class's declared\n capabilities. We validate against the live catalog so\
+ \ a tampered\n request can't widen the agent's reach beyond what the connector\
+ \ code\n actually implements.\n\nThe narrowing happens at the read path\n\
+ (``BaseConnector.effective_capabilities()``), not here, so the column\nis\
+ \ purely a per-instance allow-list — flipping it back to ``None``\ninstantly\
+ \ restores the class default with no migration."
+ operationId: update_connector_capabilities_api_v1_connectors__connector_id__capabilities_put
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: connector_id
in: path
required: true
schema:
type: string
- title: Entity Id
+ format: uuid
+ title: Connector Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateCapabilitiesRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/EntityNeighborsResponse'
+ $ref: '#/components/schemas/ConnectorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/graph/mitre-coverage:
- get:
+ /api/v1/connectors/{connector_id}/test:
+ post:
tags:
- - graph
- summary: MITRE ATT&CK technique coverage for tenant
- description: Return MITRE ATT&CK technique coverage aggregated from all tenant
- alerts.
- operationId: get_mitre_coverage_api_v1_graph_mitre_coverage_get
- responses:
- '200':
- description: Successful Response
- content:
- application/json:
- schema:
- items:
- $ref: '#/components/schemas/MitreCoverageItem'
- type: array
- title: Response Get Mitre Coverage Api V1 Graph Mitre Coverage Get
+ - connectors
+ summary: Test Existing Connector
+ description: "Run a live ``test_connection`` against a saved connector instance.\n\
+ \nFlow:\n\n1. Fetch the row, scoped to the caller's tenant.\n2. Decrypt ``auth_config``\
+ \ via the vault.\n3. Forward to the connectors microservice with both the\
+ \ decrypted\n credentials and the non-secret ``connector_config``.\n4. Update\
+ \ the row's ``health_status`` / ``last_health_check`` based on\n the verdict\
+ \ so the dashboard reflects reality."
+ operationId: test_existing_connector_api_v1_connectors__connector_id__test_post
security:
- HTTPBearer: []
- /api/v1/graph/entities/host:
- post:
- tags:
- - graph
- summary: Upsert a Host node in the graph
- description: Create or update a Host node in the knowledge graph.
- operationId: upsert_host_api_v1_graph_entities_host_post
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpsertHostRequest'
+ parameters:
+ - name: connector_id
+ in: path
required: true
+ schema:
+ type: string
+ format: uuid
+ title: Connector Id
responses:
- '201':
+ '200':
description: Successful Response
content:
application/json:
schema:
- additionalProperties:
- type: string
type: object
- title: Response Upsert Host Api V1 Graph Entities Host Post
+ additionalProperties: true
+ title: Response Test Existing Connector Api V1 Connectors Connector
+ Id Test Post
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- security:
- - HTTPBearer: []
- /api/v1/graph/entities/user:
- post:
+ /api/v1/connectors/{connector_id}/last_event_at:
+ get:
tags:
- - graph
- summary: Upsert a User node in the graph
- description: Create or update a User node in the knowledge graph.
- operationId: upsert_user_api_v1_graph_entities_user_post
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpsertUserRequest'
+ - connectors
+ summary: Get Last Event At
+ description: 'Return event-arrival watermark for the onboarding verify screen.
+
+
+ Polled by the wizard''s "verify data flowing" panel every few seconds
+
+ after a connector is saved. Returns 200 with ``data_flowing=false``
+
+ rather than a 404 so the polling loop has stable shape until the
+
+ first event lands. The ``data_flowing`` boolean is computed server
+
+ side from a fixed window (see ``_DATA_FLOWING_WINDOW_SECONDS``) so
+
+ every client agrees on the rule.'
+ operationId: get_last_event_at_api_v1_connectors__connector_id__last_event_at_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: connector_id
+ in: path
required: true
+ schema:
+ type: string
+ format: uuid
+ title: Connector Id
responses:
- '201':
+ '200':
description: Successful Response
content:
application/json:
schema:
- additionalProperties:
- type: string
- type: object
- title: Response Upsert User Api V1 Graph Entities User Post
+ $ref: '#/components/schemas/LastEventResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- security:
- - HTTPBearer: []
- /api/v1/graph/entities/alert:
+ /api/v1/connectors/troubleshoot:
post:
tags:
- - graph
- summary: Upsert an Alert node and its relationships in the graph
- description: 'Create or update an Alert node and link it to Host, User, IOC,
- and Technique nodes.
+ - connectors
+ summary: Troubleshoot Connection
+ description: 'Return structured fix suggestions for a failed connector test.
- Called automatically after alert creation to keep the graph in sync.'
- operationId: upsert_alert_graph_api_v1_graph_entities_alert_post
+
+ The wizard calls this when ``test_connection`` returns ``success=false``.
+
+ Auth-config keys (not values) are forwarded so future LLM-backed
+
+ versions can hint about which field to revisit, while keeping the
+
+ request safe to log.'
+ operationId: troubleshoot_connection_api_v1_connectors_troubleshoot_post
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/UpsertAlertGraphRequest'
+ $ref: '#/components/schemas/TroubleshootRequest'
required: true
responses:
- '201':
+ '200':
description: Successful Response
content:
application/json:
schema:
- additionalProperties:
- type: string
- type: object
- title: Response Upsert Alert Graph Api V1 Graph Entities Alert Post
+ $ref: '#/components/schemas/TroubleshootResponse'
'422':
description: Validation Error
content:
@@ -1637,144 +1641,68 @@ paths:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
- /api/v1/graph/entities/case:
+ /api/v1/connectors/{connector_id}/push/refresh:
post:
tags:
- - graph
- summary: Upsert a Case node and link to alerts in the graph
- description: Create or update a Case node and link it to Alert nodes.
- operationId: upsert_case_graph_api_v1_graph_entities_case_post
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpsertCaseGraphRequest'
- required: true
- responses:
- '201':
- description: Successful Response
- content:
- application/json:
- schema:
- additionalProperties:
- type: string
- type: object
- title: Response Upsert Case Graph Api V1 Graph Entities Case Post
- '422':
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HTTPValidationError'
+ - connectors
+ summary: Refresh Ingest Token
+ description: 'Generate (or rotate) the per-connector push-ingest token.
+
+
+ Operators click "Reveal push URL" in the wizard, which calls this and
+
+ renders the resulting curl example. Re-calling rotates the token and
+
+ invalidates the old one — the typical use case is "I think this URL
+
+ leaked into a Slack message, give me a new one".'
+ operationId: refresh_ingest_token_api_v1_connectors__connector_id__push_refresh_post
security:
- HTTPBearer: []
- /api/v1/playbooks:
- get:
- tags:
- - playbooks
- summary: List playbooks
- operationId: list_playbooks_api_v1_playbooks_get
- parameters:
- - name: enabled_only
- in: query
- required: false
- schema:
- type: boolean
- default: false
- title: Enabled Only
- responses:
- '200':
- description: Successful Response
- content:
- application/json:
- schema: {}
- '422':
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HTTPValidationError'
- post:
- tags:
- - playbooks
- summary: Create playbook
- operationId: create_playbook_api_v1_playbooks_post
- responses:
- '201':
- description: Successful Response
- content:
- application/json:
- schema: {}
- /api/v1/playbooks/runs:
- get:
- tags:
- - playbooks
- summary: List playbook runs
- operationId: list_runs_api_v1_playbooks_runs_get
- parameters:
- - name: limit
- in: query
- required: false
- schema:
- type: integer
- default: 50
- title: Limit
- responses:
- '200':
- description: Successful Response
- content:
- application/json:
- schema: {}
- '422':
- description: Validation Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HTTPValidationError'
- /api/v1/playbooks/runs/{run_id}:
- get:
- tags:
- - playbooks
- summary: Get a playbook run
- operationId: get_run_api_v1_playbooks_runs__run_id__get
parameters:
- - name: run_id
+ - name: connector_id
in: path
required: true
schema:
type: string
- title: Run Id
+ format: uuid
+ title: Connector Id
responses:
'200':
description: Successful Response
content:
application/json:
- schema: {}
+ schema:
+ $ref: '#/components/schemas/IngestTokenResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/playbooks/{playbook_id}:
+ /api/v1/oauth/app/{connector_type}:
get:
tags:
- - playbooks
- summary: Get a playbook
- operationId: get_playbook_api_v1_playbooks__playbook_id__get
+ - oauth
+ summary: Get Oauth App
+ description: Return the tenant's registered OAuth app (without the secret).
+ operationId: get_oauth_app_api_v1_oauth_app__connector_type__get
+ security:
+ - HTTPBearer: []
parameters:
- - name: playbook_id
+ - name: connector_type
in: path
required: true
schema:
type: string
- title: Playbook Id
+ title: Connector Type
responses:
'200':
description: Successful Response
content:
application/json:
- schema: {}
+ schema:
+ $ref: '#/components/schemas/OAuthAppView'
'422':
description: Validation Error
content:
@@ -1783,22 +1711,33 @@ paths:
$ref: '#/components/schemas/HTTPValidationError'
put:
tags:
- - playbooks
- summary: Update a playbook
- operationId: update_playbook_api_v1_playbooks__playbook_id__put
+ - oauth
+ summary: Upsert Oauth App
+ description: Register or rotate the tenant's OAuth client for this connector
+ class.
+ operationId: upsert_oauth_app_api_v1_oauth_app__connector_type__put
+ security:
+ - HTTPBearer: []
parameters:
- - name: playbook_id
+ - name: connector_type
in: path
required: true
schema:
type: string
- title: Playbook Id
+ title: Connector Type
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OAuthAppRegistration'
responses:
'200':
description: Successful Response
content:
application/json:
- schema: {}
+ schema:
+ $ref: '#/components/schemas/OAuthAppView'
'422':
description: Validation Error
content:
@@ -1807,16 +1746,19 @@ paths:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- - playbooks
- summary: Delete a playbook
- operationId: delete_playbook_api_v1_playbooks__playbook_id__delete
+ - oauth
+ summary: Delete Oauth App
+ description: Unregister the tenant's OAuth app for this connector class.
+ operationId: delete_oauth_app_api_v1_oauth_app__connector_type__delete
+ security:
+ - HTTPBearer: []
parameters:
- - name: playbook_id
+ - name: connector_type
in: path
required: true
schema:
type: string
- title: Playbook Id
+ title: Connector Type
responses:
'204':
description: Successful Response
@@ -1826,21 +1768,78 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/playbooks/{playbook_id}/run:
- post:
+ /api/v1/oauth/start:
+ get:
tags:
- - playbooks
- summary: Execute a playbook
- operationId: run_playbook_api_v1_playbooks__playbook_id__run_post
+ - oauth
+ summary: Oauth Start
+ description: Mint a state nonce and bounce the operator to the provider's authorize
+ URL.
+ operationId: oauth_start_api_v1_oauth_start_get
+ security:
+ - HTTPBearer: []
parameters:
- - name: playbook_id
- in: path
+ - name: connector_type
+ in: query
required: true
schema:
type: string
- title: Playbook Id
+ description: Connector class to OAuth into
+ title: Connector Type
+ description: Connector class to OAuth into
+ - name: connector_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ description: Re-auth target; omit to mint a new connector
+ title: Connector Id
+ description: Re-auth target; omit to mint a new connector
+ - name: return_to
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Where to land after callback (defaults to /onboarding)
+ title: Return To
+ description: Where to land after callback (defaults to /onboarding)
+ - name: name
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Operator-supplied display name for new connectors
+ title: Name
+ description: Operator-supplied display name for new connectors
+ - name: extras
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: JSON dict of provider-specific extras (e.g. organization for
+ GitHub)
+ title: Extras
+ description: JSON dict of provider-specific extras (e.g. organization for
+ GitHub)
+ - name: response_mode
+ in: query
+ required: false
+ schema:
+ type: string
+ pattern: ^(redirect|json)$
+ default: redirect
+ title: Response Mode
responses:
- '202':
+ '200':
description: Successful Response
content:
application/json:
@@ -1851,1638 +1850,20520 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/plugins:
+ /api/v1/oauth/callback:
get:
tags:
- - plugins
- summary: List Plugins
- description: List all currently loaded plugins, optionally filtered by type.
- operationId: list_plugins_api_v1_plugins_get
- security:
- - HTTPBearer: []
+ - oauth
+ summary: Oauth Callback
+ description: 'Handle the provider''s redirect after the operator consents.
+
+
+ No auth dependency: this endpoint is invoked by the *browser* after
+
+ a third-party redirect, not by an authenticated console session.
+
+ The CSRF defence is the ``state`` nonce, which we issued ourselves
+
+ at /oauth/start under an authenticated session.'
+ operationId: oauth_callback_api_v1_oauth_callback_get
parameters:
- - name: plugin_type
+ - name: code
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
- title: Plugin Type
+ title: Code
+ - name: state
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: State
+ - name: error
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ - name: error_description
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error Description
responses:
'200':
description: Successful Response
content:
application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/PluginOut'
- title: Response List Plugins Api V1 Plugins Get
+ schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/plugins/discover:
- post:
+ /api/v1/tenants/me:
+ get:
tags:
- - plugins
- summary: Discover Plugins
- description: Re-scan the plugins directory and load any new plugins found.
- operationId: discover_plugins_api_v1_plugins_discover_post
+ - tenants
+ summary: Get My Tenant
+ description: Get the current user's tenant details.
+ operationId: get_my_tenant_api_v1_tenants_me_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/DiscoverResponse'
+ $ref: '#/components/schemas/TenantResponse'
security:
- HTTPBearer: []
- /api/v1/plugins/{plugin_id}:
+ /api/v1/tenants/me/settings:
+ patch:
+ tags:
+ - tenants
+ summary: Update Tenant Settings
+ description: Update tenant settings.
+ operationId: update_tenant_settings_api_v1_tenants_me_settings_patch
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateTenantSettingsRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TenantResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/tenants/me/users:
get:
tags:
- - plugins
- summary: Get Plugin
- description: Get details for a specific plugin.
- operationId: get_plugin_api_v1_plugins__plugin_id__get
+ - tenants
+ summary: List Users
+ description: List all users in the current tenant.
+ operationId: list_users_api_v1_tenants_me_users_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/UserResponse'
+ type: array
+ title: Response List Users Api V1 Tenants Me Users Get
security:
- HTTPBearer: []
- parameters:
- - name: plugin_id
- in: path
+ post:
+ tags:
+ - tenants
+ summary: Create User
+ description: Create a new user in the current tenant.
+ operationId: create_user_api_v1_tenants_me_users_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateUserRequest'
required: true
- schema:
- type: string
- title: Plugin Id
responses:
- '200':
+ '201':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/PluginOut'
+ $ref: '#/components/schemas/UserResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- delete:
+ security:
+ - HTTPBearer: []
+ /api/v1/tenants/me/users/{user_id}:
+ patch:
tags:
- - plugins
- summary: Unload Plugin
- description: Unload a plugin from memory (does not remove files from disk).
- operationId: unload_plugin_api_v1_plugins__plugin_id__delete
+ - tenants
+ summary: Update User
+ description: Update a user.
+ operationId: update_user_api_v1_tenants_me_users__user_id__patch
security:
- HTTPBearer: []
parameters:
- - name: plugin_id
+ - name: user_id
in: path
required: true
schema:
type: string
- title: Plugin Id
+ format: uuid
+ title: User Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateUserRequest'
responses:
- '204':
+ '200':
description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/plugins/{plugin_id}/enable:
- post:
+ /api/v1/rules:
+ get:
tags:
- - plugins
- summary: Enable Plugin
- description: Enable a loaded plugin.
- operationId: enable_plugin_api_v1_plugins__plugin_id__enable_post
+ - detection_rules
+ summary: List Rules
+ description: 'List detection rules for the tenant.
+
+
+ Returns the tenant''s own rules, plus optionally platform-wide built-in
+
+ rules and rules sourced from MSSP-assigned rule packs (with excluded
+
+ overrides removed).'
+ operationId: list_rules_api_v1_rules_get
security:
- HTTPBearer: []
parameters:
- - name: plugin_id
- in: path
- required: true
+ - name: category
+ in: query
+ required: false
schema:
- type: string
- title: Plugin Id
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ - name: rule_language
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Rule Language
+ - name: include_builtin
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: true
+ title: Include Builtin
+ - name: include_packs
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: true
+ title: Include Packs
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/PluginOut'
+ type: array
+ items:
+ $ref: '#/components/schemas/DetectionRuleResponse'
+ title: Response List Rules Api V1 Rules Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/plugins/{plugin_id}/disable:
post:
tags:
- - plugins
- summary: Disable Plugin
- description: Disable a loaded plugin (keeps it in memory but blocks invocations).
- operationId: disable_plugin_api_v1_plugins__plugin_id__disable_post
+ - detection_rules
+ summary: Create Rule
+ description: Create a new detection rule.
+ operationId: create_rule_api_v1_rules_post
security:
- HTTPBearer: []
- parameters:
- - name: plugin_id
- in: path
+ requestBody:
required: true
- schema:
- type: string
- title: Plugin Id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateRuleRequest'
responses:
- '200':
+ '201':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/PluginOut'
+ $ref: '#/components/schemas/DetectionRuleResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/plugins/{plugin_id}/reload:
- post:
+ /api/v1/rules/{rule_id}:
+ get:
tags:
- - plugins
- summary: Reload Plugin
- description: Unload and re-import a plugin from disk (hot-reload).
- operationId: reload_plugin_api_v1_plugins__plugin_id__reload_post
+ - detection_rules
+ summary: Get Rule
+ description: Get a detection rule by ID.
+ operationId: get_rule_api_v1_rules__rule_id__get
security:
- HTTPBearer: []
parameters:
- - name: plugin_id
+ - name: rule_id
in: path
required: true
schema:
type: string
- title: Plugin Id
+ format: uuid
+ title: Rule Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/PluginOut'
+ $ref: '#/components/schemas/DetectionRuleResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /api/v1/plugins/{plugin_id}/run:
- post:
+ patch:
tags:
- - plugins
- summary: Run Plugin
- description: 'Directly invoke a plugin.
-
- Supports enrichers, actions, and connectors.'
- operationId: run_plugin_api_v1_plugins__plugin_id__run_post
+ - detection_rules
+ summary: Update Rule
+ description: Update a detection rule (only tenant-owned rules).
+ operationId: update_rule_api_v1_rules__rule_id__patch
security:
- HTTPBearer: []
parameters:
- - name: plugin_id
+ - name: rule_id
in: path
required: true
schema:
type: string
- title: Plugin Id
+ format: uuid
+ title: Rule Id
requestBody:
required: true
content:
application/json:
schema:
- $ref: '#/components/schemas/RunRequest'
+ $ref: '#/components/schemas/UpdateRuleRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- $ref: '#/components/schemas/RunResponse'
+ $ref: '#/components/schemas/DetectionRuleResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
- /graphql:
- get:
+ delete:
tags:
- - graphql
- summary: Handle Http Get
- operationId: handle_http_get_graphql_get
+ - detection_rules
+ summary: Delete Rule
+ description: Delete a tenant-owned detection rule.
+ operationId: delete_rule_api_v1_rules__rule_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: rule_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Rule Id
responses:
- '200':
- description: The GraphiQL integrated development environment.
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
content:
application/json:
- schema: {}
- '404':
- description: Not found if GraphiQL or query via GET are not enabled.
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/rules/{rule_id}/execute:
+ post:
+ tags:
+ - detection_rules
+ summary: Execute a detection rule against provided events
+ description: 'Execute a single detection rule against a set of events and return
+ matches.
+
+ Useful for testing rules in the detection IDE before enabling them.'
+ operationId: execute_detection_rule_api_v1_rules__rule_id__execute_post
security:
- HTTPBearer: []
+ parameters:
+ - name: rule_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Rule Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExecuteRuleRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExecuteRuleResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/rules/hunt:
post:
tags:
- - graphql
- summary: Handle Http Post
- operationId: handle_http_post_graphql_post
+ - detection_rules
+ summary: 'Threat hunt: run detection rules against a set of events'
+ description: "Run multiple detection rules against provided events (threat hunting).\n\
+ \nThe effective rule set is resolved through\n:func:`app.services.mssp_rule_resolver.resolve_effective_rules`,\
+ \ which layers:\n\n 1. Tenant-owned rules\n 2. Platform-wide built-in rules\n\
+ \ 3. Rules sourced from MSSP-assigned rule packs\n 4. Per-tenant exclude\
+ \ / customize overrides\n\nIf ``rule_ids`` is omitted, all active rules in\
+ \ the resolved set are used."
+ operationId: hunt_api_v1_rules_hunt_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HuntRequest'
+ required: true
responses:
'200':
description: Successful Response
content:
application/json:
- schema: {}
+ schema:
+ $ref: '#/components/schemas/app__api__v1__endpoints__detection_rules__HuntResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: []
- /health:
+ /api/v1/detection/rules:
get:
tags:
- - system
- summary: Health Check
- description: Health check endpoint.
- operationId: health_check_health_get
+ - detection_rules
+ summary: List Rules Compat
+ description: List detection rules visible to the current tenant (built-ins +
+ tenant-owned).
+ operationId: list_rules_compat_api_v1_detection_rules_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
- additionalProperties: true
- type: object
- title: Response Health Check Health Get
- /metrics:
+ $ref: '#/components/schemas/ListResponse'
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - detection_rules
+ summary: Create Rule Compat
+ description: Create a tenant-owned detection rule using the frontend shape.
+ operationId: create_rule_compat_api_v1_detection_rules_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateBody'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FrontendDetectionRule'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection/rules/{rule_id}:
get:
tags:
- - system
- summary: Metrics
- description: Prometheus metrics endpoint.
- operationId: metrics_metrics_get
+ - detection_rules
+ summary: Get Rule Compat
+ description: Fetch a single rule by ID in the frontend shape.
+ operationId: get_rule_compat_api_v1_detection_rules__rule_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: rule_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Rule Id
responses:
'200':
description: Successful Response
content:
application/json:
- schema: {}
-components:
- schemas:
- AddTimelineEventRequest:
- properties:
- content:
- type: string
- title: Content
- event_type:
- type: string
- title: Event Type
- default: comment
- metadata:
- additionalProperties: true
- type: object
- title: Metadata
- default: {}
- type: object
- required:
- - content
- title: AddTimelineEventRequest
- AlertListResponse:
- properties:
- items:
- items:
- $ref: '#/components/schemas/AlertResponse'
- type: array
- title: Items
- total:
- type: integer
- title: Total
- page:
- type: integer
- title: Page
- page_size:
- type: integer
- title: Page Size
- pages:
- type: integer
- title: Pages
- type: object
- required:
- - items
- - total
- - page
- - page_size
- - pages
- title: AlertListResponse
- AlertResponse:
- properties:
- id:
+ schema:
+ $ref: '#/components/schemas/FrontendDetectionRule'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ patch:
+ tags:
+ - detection_rules
+ summary: Update Rule Compat
+ description: Update a tenant-owned rule using the frontend shape.
+ operationId: update_rule_compat_api_v1_detection_rules__rule_id__patch
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: rule_id
+ in: path
+ required: true
+ schema:
type: string
format: uuid
- title: Id
- tenant_id:
+ title: Rule Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateBody'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FrontendDetectionRule'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - detection_rules
+ summary: Delete Rule Compat
+ description: Delete a tenant-owned rule.
+ operationId: delete_rule_compat_api_v1_detection_rules__rule_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: rule_id
+ in: path
+ required: true
+ schema:
type: string
format: uuid
- title: Tenant Id
- title:
- type: string
- title: Title
- description:
- anyOf:
- - type: string
- - type: 'null'
- title: Description
- severity:
- type: string
- title: Severity
- status:
- type: string
- title: Status
- priority:
- type: integer
- title: Priority
- category:
- anyOf:
- - type: string
- - type: 'null'
- title: Category
- mitre_tactics:
- items: {}
+ title: Rule Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/detection/test:
+ post:
+ tags:
+ - detection_rules
+ summary: Test Rule Compat
+ description: 'Run an ad-hoc rule body against an optional sample event blob.
+
+
+ The detection IDE in the analyst console hits this with the rule body
+
+ the user is actively editing, which has not been persisted yet, so the
+
+ rule never needs to live in the database.'
+ operationId: test_rule_compat_api_v1_detection_test_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestBody'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection/coverage:
+ get:
+ tags:
+ - detection_rules
+ summary: Get Detection Coverage
+ description: 'Rule-centric MITRE ATT&CK coverage for the current tenant.
+
+
+ Distinct from ``/api/v1/graph/mitre/coverage`` which derives coverage
+
+ from *alerts* — this one is what an analyst opens before a tuning
+
+ sprint to answer "which techniques is my rule library blind to?".'
+ operationId: get_detection_coverage_api_v1_detection_coverage_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CoverageResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection/rules/bulk-toggle:
+ post:
+ tags:
+ - detection_rules
+ summary: Bulk Toggle Rules
+ description: 'Enable or disable many tenant-owned rules in one round-trip.
+
+
+ Built-in / cross-tenant rules are silently skipped (returned in
+
+ ``skipped``) so an MSSP analyst toggling a whole category from the UI
+
+ doesn''t get a 403 just because one of the rules is platform-provided.'
+ operationId: bulk_toggle_rules_api_v1_detection_rules_bulk_toggle_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BulkToggleBody'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BulkToggleResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection/drift:
+ get:
+ tags:
+ - detection_rules
+ summary: Get Detection Drift
+ description: 'Detection drift inbox — rules that need an analyst''s attention.
+
+
+ Surfaces rules with elevated FP rate, low confidence, or stale (no
+
+ recent triggers despite being enabled). The UI renders this as a tab
+
+ on the Detections page so analysts have a single queue to work
+
+ instead of paginating the full library hunting for noise.'
+ operationId: get_detection_drift_api_v1_detection_drift_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DriftResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection/confidence:
+ get:
+ tags:
+ - detection_rules
+ summary: Get Detection Confidence
+ description: 'Rule-confidence trend panel for the WS-B3 Detections UI.
+
+
+ Returns a 4-bucket histogram of rule confidence, the per-tactic
+
+ average, and the top/bottom rules so analysts can see at a glance
+
+ where the rule library is brittle and which tactics need the most
+
+ tuning love.
+
+
+ No history table is needed — this view derives its trend signal from
+
+ the current confidence/FP-rate columns set by the rule engine and
+
+ operator review on every match.'
+ operationId: get_detection_confidence_api_v1_detection_confidence_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ConfidenceResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection-proposals:
+ get:
+ tags:
+ - detection_rules
+ - dac
+ summary: List Proposals
+ description: List detection rule proposals visible to the caller.
+ operationId: list_proposals_api_v1_detection_proposals_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ minimum: 1
+ default: 100
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ProposalResponse'
+ title: Response List Proposals Api V1 Detection Proposals Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - detection_rules
+ - dac
+ summary: Create Proposal
+ description: Open a new detection proposal in `proposed` state.
+ operationId: create_proposal_api_v1_detection_proposals_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateProposalRequest'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProposalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/detection-proposals/baselines:
+ get:
+ tags:
+ - detection_rules
+ - dac
+ summary: List Baselines
+ description: List eval baselines (most recent active baseline per suite is what
+ we gate on).
+ operationId: list_baselines_api_v1_detection_proposals_baselines_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: suite
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Suite
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/BaselineResponse'
+ title: Response List Baselines Api V1 Detection Proposals Baselines
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - detection_rules
+ - dac
+ summary: Record Baseline
+ description: Record a new eval baseline and deactivate older entries for the
+ same suite.
+ operationId: record_baseline_api_v1_detection_proposals_baselines_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateBaselineRequest'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BaselineResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/detection-proposals/{proposal_id}:
+ get:
+ tags:
+ - detection_rules
+ - dac
+ summary: Get Proposal
+ description: Get a proposal by id.
+ operationId: get_proposal_api_v1_detection_proposals__proposal_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: proposal_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Proposal Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProposalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/detection-proposals/{proposal_id}/comment:
+ post:
+ tags:
+ - detection_rules
+ - dac
+ summary: Comment On Proposal
+ description: Append a review comment and move the proposal into `in_review`.
+ operationId: comment_on_proposal_api_v1_detection_proposals__proposal_id__comment_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: proposal_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Proposal Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReviewCommentRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProposalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/detection-proposals/run-eval:
+ post:
+ tags:
+ - detection_rules
+ - dac
+ summary: Run the offline eval harness (`scripts/run_evals.py`) and return the
+ JSON report
+ description: 'Execute the offline eval harness and return its JSON output.
+
+
+ This is the "eval-harness regression on save" hook for the in-app rule editor.
+
+ The harness is deterministic and offline, but takes 5–15s, so the editor
+
+ surfaces it as an explicit "Propose for review" action rather than firing
+ on
+
+ every keystroke.'
+ operationId: run_eval_harness_api_v1_detection_proposals_run_eval_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RunEvalRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RunEvalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection-proposals/{proposal_id}/eval:
+ post:
+ tags:
+ - detection_rules
+ - dac
+ summary: Attach Eval Result
+ description: 'Attach the run_evals.py output and compute the gate verdict.
+
+
+ Reads the active MITRE accuracy baseline for the tenant (falling back
+
+ to the platform-wide baseline) and stores ``eval_result.passed=True``
+
+ only when MITRE accuracy regression is < ``max_regression_pp``.'
+ operationId: attach_eval_result_api_v1_detection_proposals__proposal_id__eval_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: proposal_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Proposal Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EvalAttachRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProposalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/detection-proposals/{proposal_id}/decide:
+ post:
+ tags:
+ - detection_rules
+ - dac
+ summary: Decide Proposal
+ description: Approve or reject a proposal. Approving requires the eval gate
+ to have passed.
+ operationId: decide_proposal_api_v1_detection_proposals__proposal_id__decide_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: proposal_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Proposal Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DecisionRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProposalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/detection-proposals/{proposal_id}/promote:
+ post:
+ tags:
+ - detection_rules
+ - dac
+ summary: Materialise an approved proposal into the detection_rules table
+ description: 'Promote an approved proposal: create or update the linked detection
+ rule.'
+ operationId: promote_proposal_api_v1_detection_proposals__proposal_id__promote_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: proposal_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Proposal Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProposalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/federated/backends:
+ get:
+ tags:
+ - federated-search
+ summary: List Federated Backends
+ description: 'List the connector instances that ``POST /search`` would fan out
+ to.
+
+
+ Useful for the wizard preview ("you''ll search 1 Splunk + 1 Elastic")
+
+ and for the SDK to build sensible default ``connector_ids`` lists.'
+ operationId: list_federated_backends_api_v1_federated_backends_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FederatedBackendsResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/federated/search:
+ post:
+ tags:
+ - federated-search
+ summary: Federated Search
+ description: 'Run a unified query across every federated-capable connector.
+
+
+ Per-backend errors do not fail the call. The response always
+
+ carries a ``sources[]`` array describing the verdict for each
+
+ backend that was attempted; the merged ``rows[]`` only contains
+
+ rows from the ``ok`` sources.'
+ operationId: federated_search_api_v1_federated_search_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FederatedSearchRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FederatedSearchResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/graph/attack-path/{case_id}:
+ get:
+ tags:
+ - graph
+ summary: Get attack path graph for a case
+ description: 'Traverse the knowledge graph from a Case node to reconstruct the
+ full
+
+ attack path: Case → Alerts → Hosts/Users → IOCs → MITRE Techniques.
+
+
+ Falls back to a relational reconstruction (Case → Alerts → Techniques)
+
+ when the Neo4j graph backend is offline so the demo Attack Path UI
+
+ keeps working without a graph database deployed.'
+ operationId: get_attack_path_api_v1_graph_attack_path__case_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: case_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Case Id
+ - name: max_depth
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 10
+ minimum: 1
+ default: 6
+ title: Max Depth
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AttackPathResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/graph/blast-radius/{entity_type}/{entity_id}:
+ get:
+ tags:
+ - graph
+ summary: Compute blast radius from an entity
+ description: 'Compute the blast radius starting from a Host, User, or IOC node.
+
+ Returns all entities reachable within `hops` and a severity score.'
+ operationId: get_blast_radius_api_v1_graph_blast_radius__entity_type___entity_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: entity_type
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Entity Type
+ - name: entity_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Entity Id
+ - name: hops
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 6
+ minimum: 1
+ default: 3
+ title: Hops
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BlastRadiusResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/graph/neighbors/{entity_type}/{entity_id}:
+ get:
+ tags:
+ - graph
+ summary: Get immediate graph neighbors of an entity
+ description: Return all nodes directly connected (depth 1) to the specified
+ entity.
+ operationId: get_entity_neighbors_api_v1_graph_neighbors__entity_type___entity_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: entity_type
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Entity Type
+ - name: entity_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Entity Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EntityNeighborsResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/graph/mitre-coverage:
+ get:
+ tags:
+ - graph
+ summary: MITRE ATT&CK technique coverage for tenant
+ description: 'Return MITRE ATT&CK technique coverage aggregated from all tenant
+ alerts.
+
+
+ When the Neo4j knowledge graph is unreachable (e.g. in the public demo),
+
+ this endpoint returns an empty list rather than 503-ing, so the Coverage
+
+ UI degrades gracefully instead of breaking the whole page.'
+ operationId: get_mitre_coverage_api_v1_graph_mitre_coverage_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/MitreCoverageItem'
+ type: array
+ title: Response Get Mitre Coverage Api V1 Graph Mitre Coverage Get
+ security:
+ - HTTPBearer: []
+ /api/v1/graph/mitre/coverage:
+ get:
+ tags:
+ - graph
+ summary: MITRE ATT&CK coverage (frontend shape)
+ description: 'Aggregated MITRE coverage in the shape the analyst console expects.
+
+
+ The console''s :code:`graph.getMitreCoverage()` call hits this URL and
+
+ expects ``{ tactics, cells, generatedAt }``. We aggregate the
+
+ per-technique records returned by the same Neo4j-backed service used by
+
+ ``/graph/mitre-coverage`` and degrade gracefully (empty set) when the
+
+ knowledge graph is offline, mirroring that endpoint''s behaviour.'
+ operationId: get_mitre_coverage_compat_api_v1_graph_mitre_coverage_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MitreCoverageResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/graph/entities/host:
+ post:
+ tags:
+ - graph
+ summary: Upsert a Host node in the graph
+ description: Create or update a Host node in the knowledge graph.
+ operationId: upsert_host_api_v1_graph_entities_host_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpsertHostRequest'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ type: string
+ type: object
+ title: Response Upsert Host Api V1 Graph Entities Host Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/graph/entities/user:
+ post:
+ tags:
+ - graph
+ summary: Upsert a User node in the graph
+ description: Create or update a User node in the knowledge graph.
+ operationId: upsert_user_api_v1_graph_entities_user_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpsertUserRequest'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ type: string
+ type: object
+ title: Response Upsert User Api V1 Graph Entities User Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/graph/entities/alert:
+ post:
+ tags:
+ - graph
+ summary: Upsert an Alert node and its relationships in the graph
+ description: 'Create or update an Alert node and link it to Host, User, IOC,
+ and Technique nodes.
+
+ Called automatically after alert creation to keep the graph in sync.'
+ operationId: upsert_alert_graph_api_v1_graph_entities_alert_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpsertAlertGraphRequest'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ type: string
+ type: object
+ title: Response Upsert Alert Graph Api V1 Graph Entities Alert Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/graph/entities/case:
+ post:
+ tags:
+ - graph
+ summary: Upsert a Case node and link to alerts in the graph
+ description: Create or update a Case node and link it to Alert nodes.
+ operationId: upsert_case_graph_api_v1_graph_entities_case_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpsertCaseGraphRequest'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ type: string
+ type: object
+ title: Response Upsert Case Graph Api V1 Graph Entities Case Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/playbooks:
+ get:
+ tags:
+ - playbooks
+ summary: List playbooks
+ operationId: list_playbooks_api_v1_playbooks_get
+ parameters:
+ - name: enabled_only
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: false
+ title: Enabled Only
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - playbooks
+ summary: Create playbook
+ operationId: create_playbook_api_v1_playbooks_post
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ /api/v1/playbooks/runs:
+ get:
+ tags:
+ - playbooks
+ summary: List playbook runs
+ operationId: list_runs_api_v1_playbooks_runs_get
+ parameters:
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ default: 50
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/playbooks/runs/{run_id}:
+ get:
+ tags:
+ - playbooks
+ summary: Get a playbook run
+ operationId: get_run_api_v1_playbooks_runs__run_id__get
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Run Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/playbooks/{playbook_id}:
+ get:
+ tags:
+ - playbooks
+ summary: Get a playbook
+ operationId: get_playbook_api_v1_playbooks__playbook_id__get
+ parameters:
+ - name: playbook_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Playbook Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ put:
+ tags:
+ - playbooks
+ summary: Update a playbook
+ operationId: update_playbook_api_v1_playbooks__playbook_id__put
+ parameters:
+ - name: playbook_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Playbook Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - playbooks
+ summary: Delete a playbook
+ operationId: delete_playbook_api_v1_playbooks__playbook_id__delete
+ parameters:
+ - name: playbook_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Playbook Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/playbooks/{playbook_id}/run:
+ post:
+ tags:
+ - playbooks
+ summary: Execute a playbook
+ operationId: run_playbook_api_v1_playbooks__playbook_id__run_post
+ parameters:
+ - name: playbook_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Playbook Id
+ responses:
+ '202':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/plugins:
+ get:
+ tags:
+ - plugins
+ summary: List Plugins
+ description: List all currently loaded plugins, optionally filtered by type.
+ operationId: list_plugins_api_v1_plugins_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Plugin Type
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/PluginOut'
+ title: Response List Plugins Api V1 Plugins Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/plugins/discover:
+ post:
+ tags:
+ - plugins
+ summary: Discover Plugins
+ description: Re-scan the plugins directory and load any new plugins found.
+ operationId: discover_plugins_api_v1_plugins_discover_post
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DiscoverResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/plugins/{plugin_id}:
+ get:
+ tags:
+ - plugins
+ summary: Get Plugin
+ description: Get details for a specific plugin.
+ operationId: get_plugin_api_v1_plugins__plugin_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PluginOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - plugins
+ summary: Unload Plugin
+ description: Unload a plugin from memory (does not remove files from disk).
+ operationId: unload_plugin_api_v1_plugins__plugin_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/plugins/{plugin_id}/enable:
+ post:
+ tags:
+ - plugins
+ summary: Enable Plugin
+ description: Enable a loaded plugin.
+ operationId: enable_plugin_api_v1_plugins__plugin_id__enable_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PluginOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/plugins/{plugin_id}/disable:
+ post:
+ tags:
+ - plugins
+ summary: Disable Plugin
+ description: Disable a loaded plugin (keeps it in memory but blocks invocations).
+ operationId: disable_plugin_api_v1_plugins__plugin_id__disable_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PluginOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/plugins/{plugin_id}/reload:
+ post:
+ tags:
+ - plugins
+ summary: Reload Plugin
+ description: Unload and re-import a plugin from disk (hot-reload).
+ operationId: reload_plugin_api_v1_plugins__plugin_id__reload_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PluginOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/plugins/{plugin_id}/run:
+ post:
+ tags:
+ - plugins
+ summary: Run Plugin
+ description: 'Directly invoke a plugin.
+
+ Supports enrichers, actions, and connectors.'
+ operationId: run_plugin_api_v1_plugins__plugin_id__run_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RunRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RunResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/plugins/publish:
+ post:
+ tags:
+ - community
+ summary: Publish Plugin
+ description: Submit a signed plugin tarball for community review.
+ operationId: publish_plugin_api_v1_community_plugins_publish_post
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Publish Plugin Api V1 Community Plugins Publish Post
+ security:
+ - HTTPBearer: []
+ /api/v1/community/plugins:
+ get:
+ tags:
+ - community
+ summary: List Community Plugins
+ description: Browse approved community plugins.
+ operationId: list_community_plugins_api_v1_community_plugins_get
+ parameters:
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ - name: plugin_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Plugin Type
+ - name: tags
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Comma-separated tags
+ title: Tags
+ description: Comma-separated tags
+ - name: sort
+ in: query
+ required: false
+ schema:
+ type: string
+ pattern: ^(install_count|rating|submitted_at|name)$
+ default: install_count
+ title: Sort
+ - name: order
+ in: query
+ required: false
+ schema:
+ type: string
+ pattern: ^(asc|desc)$
+ default: desc
+ title: Order
+ - name: page
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 1
+ default: 1
+ title: Page
+ - name: page_size
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 100
+ minimum: 1
+ default: 20
+ title: Page Size
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CommunityPluginListOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/plugins/{plugin_id}:
+ get:
+ tags:
+ - community
+ summary: Get Community Plugin
+ description: Get community plugin detail.
+ operationId: get_community_plugin_api_v1_community_plugins__plugin_id__get
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CommunityPluginOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/plugins/{plugin_id}/install:
+ post:
+ tags:
+ - community
+ summary: Install Community Plugin
+ description: Install a community plugin to the current instance.
+ operationId: install_community_plugin_api_v1_community_plugins__plugin_id__install_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ title: Response Install Community Plugin Api V1 Community Plugins Plugin
+ Id Install Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/plugins/{plugin_id}/rate:
+ post:
+ tags:
+ - community
+ summary: Rate Community Plugin
+ description: Rate a community plugin.
+ operationId: rate_community_plugin_api_v1_community_plugins__plugin_id__rate_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RatingIn'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response Rate Community Plugin Api V1 Community Plugins Plugin
+ Id Rate Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/plugins/{plugin_id}/review:
+ put:
+ tags:
+ - community
+ summary: Review Community Plugin
+ description: 'Admin: approve or reject a plugin submission.'
+ operationId: review_community_plugin_api_v1_community_plugins__plugin_id__review_put
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: plugin_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Plugin Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReviewAction'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ title: Response Review Community Plugin Api V1 Community Plugins Plugin
+ Id Review Put
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/detections/publish:
+ post:
+ tags:
+ - community
+ summary: Publish Detection
+ description: Submit a Sigma detection rule for community review.
+ operationId: publish_detection_api_v1_community_detections_publish_post
+ requestBody:
+ content:
+ text/plain:
+ schema:
+ type: string
+ title: Content
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Publish Detection Api V1 Community Detections Publish
+ Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/community/detections:
+ get:
+ tags:
+ - community
+ summary: List Community Detections
+ description: Browse community Sigma detection rules with pagination and filtering.
+ operationId: list_community_detections_api_v1_community_detections_get
+ parameters:
+ - name: page
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 1
+ default: 1
+ title: Page
+ - name: page_size
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 100
+ minimum: 1
+ default: 20
+ title: Page Size
+ - name: search
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Search
+ - name: logsource_category
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Logsource Category
+ - name: logsource_product
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Logsource Product
+ - name: level
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Level
+ - name: sort_by
+ in: query
+ required: false
+ schema:
+ type: string
+ pattern: ^(install_count|rating|name)$
+ default: install_count
+ title: Sort By
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response List Community Detections Api V1 Community Detections
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/detections/{detection_id}:
+ get:
+ tags:
+ - community
+ summary: Get Community Detection
+ description: Get Sigma rule detail including full YAML content (sigma_yaml field).
+ operationId: get_community_detection_api_v1_community_detections__detection_id__get
+ parameters:
+ - name: detection_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Detection Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response Get Community Detection Api V1 Community Detections Detection
+ Id Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/detections/{detection_id}/install:
+ post:
+ tags:
+ - community
+ summary: Install Community Detection
+ description: Install a community detection rule to the tenant.
+ operationId: install_community_detection_api_v1_community_detections__detection_id__install_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: detection_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Detection Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ title: Response Install Community Detection Api V1 Community Detections Detection
+ Id Install Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/playbooks/submit:
+ post:
+ tags:
+ - community
+ summary: Submit Playbook
+ description: Submit a community playbook.
+ operationId: submit_playbook_api_v1_community_playbooks_submit_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Definition
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Submit Playbook Api V1 Community Playbooks Submit
+ Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/community/playbooks:
+ get:
+ tags:
+ - community
+ summary: List Community Playbooks
+ description: Browse approved community playbooks with optional search and sort.
+ operationId: list_community_playbooks_api_v1_community_playbooks_get
+ parameters:
+ - name: page
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 1
+ default: 1
+ title: Page
+ - name: page_size
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 100
+ minimum: 1
+ default: 20
+ title: Page Size
+ - name: search
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Search
+ - name: sort_by
+ in: query
+ required: false
+ schema:
+ type: string
+ pattern: ^(install_count|rating|name)$
+ default: install_count
+ title: Sort By
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response List Community Playbooks Api V1 Community Playbooks
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/playbooks/{playbook_id}/install:
+ post:
+ tags:
+ - community
+ summary: Install Community Playbook
+ description: Install a community playbook to the tenant.
+ operationId: install_community_playbook_api_v1_community_playbooks__playbook_id__install_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: playbook_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Playbook Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ title: Response Install Community Playbook Api V1 Community Playbooks Playbook
+ Id Install Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/community/playbooks/{playbook_id}/curate:
+ put:
+ tags:
+ - community
+ summary: Curate Community Playbook
+ description: 'Admin: approve or reject a playbook submission.'
+ operationId: curate_community_playbook_api_v1_community_playbooks__playbook_id__curate_put
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: playbook_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Playbook Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReviewAction'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ title: Response Curate Community Playbook Api V1 Community Playbooks Playbook
+ Id Curate Put
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/marketplace:
+ get:
+ tags:
+ - marketplace
+ summary: List Marketplace
+ description: Return the marketplace index with the same filters the UI exposes.
+ operationId: list_marketplace_api_v1_marketplace_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - enum:
+ - detection
+ - playbook
+ - plugin
+ type: string
+ - type: 'null'
+ title: Type
+ - name: mitre
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: MITRE ATT&CK technique ID, e.g. T1078 or T1078.004
+ title: Mitre
+ description: MITRE ATT&CK technique ID, e.g. T1078 or T1078.004
+ - name: severity
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ - name: category
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ - name: source
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - enum:
+ - core
+ - community
+ type: string
+ - type: 'null'
+ title: Source
+ - name: sdk
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - enum:
+ - python
+ - go
+ - both
+ type: string
+ - type: 'null'
+ title: Sdk
+ - name: search
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ maxLength: 200
+ - type: 'null'
+ title: Search
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MarketplaceListResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/marketplace/install:
+ post:
+ tags:
+ - marketplace
+ summary: Install Marketplace Item
+ description: 'Activate a marketplace item for the caller''s tenant.
+
+
+ For core (on-disk) items this records that the item is "enabled"
+
+ for the tenant — the underlying detection/playbook/plugin file is
+
+ already present on the AiSOC instance and is read straight from disk
+
+ by the relevant subsystem. The install marker is what the UI needs
+
+ in order to show ``✓ Installed`` and what tenants can later disable.'
+ operationId: install_marketplace_item_api_v1_marketplace_install_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InstallRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InstallResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - marketplace
+ summary: Uninstall Marketplace Item
+ description: Remove a previously installed marketplace item from the tenant.
+ operationId: uninstall_marketplace_item_api_v1_marketplace_install_delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: type
+ in: query
+ required: true
+ schema:
+ enum:
+ - detection
+ - playbook
+ - plugin
+ type: string
+ title: Type
+ - name: id
+ in: query
+ required: true
+ schema:
+ type: string
+ title: Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response Uninstall Marketplace Item Api V1 Marketplace Install
+ Delete
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/marketplace/installed:
+ get:
+ tags:
+ - marketplace
+ summary: List Installed
+ description: List all marketplace items installed for the caller's tenant.
+ operationId: list_installed_api_v1_marketplace_installed_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response List Installed Api V1 Marketplace Installed Get
+ security:
+ - HTTPBearer: []
+ /api/v1/marketplace/mitre:
+ get:
+ tags:
+ - marketplace
+ summary: Mitre Coverage
+ description: 'Return the MITRE ATT&CK coverage block from the marketplace index.
+
+
+ Useful for the marketplace UI to render its MITRE filter without
+
+ walking every item on the client.'
+ operationId: mitre_coverage_api_v1_marketplace_mitre_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Mitre Coverage Api V1 Marketplace Mitre Get
+ security:
+ - HTTPBearer: []
+ /api/v1/rbac/permissions:
+ get:
+ tags:
+ - rbac
+ summary: List Permissions
+ description: List all available permissions.
+ operationId: list_permissions_api_v1_rbac_permissions_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: category
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/PermissionOut'
+ title: Response List Permissions Api V1 Rbac Permissions Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/rbac/roles:
+ get:
+ tags:
+ - rbac
+ summary: List Roles
+ description: List all roles for the current tenant.
+ operationId: list_roles_api_v1_rbac_roles_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/RoleOut'
+ type: array
+ title: Response List Roles Api V1 Rbac Roles Get
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - rbac
+ summary: Create Role
+ description: Create a custom role for the current tenant.
+ operationId: create_role_api_v1_rbac_roles_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleIn'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/rbac/roles/{role_id}:
+ get:
+ tags:
+ - rbac
+ summary: Get Role
+ operationId: get_role_api_v1_rbac_roles__role_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: role_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Role Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ patch:
+ tags:
+ - rbac
+ summary: Update Role
+ operationId: update_role_api_v1_rbac_roles__role_id__patch
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: role_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Role Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleUpdate'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - rbac
+ summary: Delete Role
+ operationId: delete_role_api_v1_rbac_roles__role_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: role_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Role Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/rbac/users/{user_id}/roles:
+ get:
+ tags:
+ - rbac
+ summary: Get User Roles
+ description: List roles assigned to a user within the current tenant.
+ operationId: get_user_roles_api_v1_rbac_users__user_id__roles_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: user_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: User Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UserRoleOut'
+ title: Response Get User Roles Api V1 Rbac Users User Id Roles Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - rbac
+ summary: Assign Role
+ description: Assign a role to a user.
+ operationId: assign_role_api_v1_rbac_users__user_id__roles_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: user_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: User Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserRoleAssignment'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserRoleOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/rbac/users/{user_id}/roles/{role_id}:
+ delete:
+ tags:
+ - rbac
+ summary: Revoke Role
+ description: Revoke a role from a user.
+ operationId: revoke_role_api_v1_rbac_users__user_id__roles__role_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: user_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: User Id
+ - name: role_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Role Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/audit:
+ get:
+ tags:
+ - audit
+ summary: List Audit Events
+ description: Return a paginated, tenant-scoped audit trail.
+ operationId: list_audit_events_api_v1_audit_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: page
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 1
+ default: 1
+ title: Page
+ - name: page_size
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 200
+ minimum: 1
+ default: 50
+ title: Page Size
+ - name: action
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Filter by action prefix, e.g. 'cases:'
+ title: Action
+ description: Filter by action prefix, e.g. 'cases:'
+ - name: resource
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Resource
+ - name: actor_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Actor Id
+ - name: search
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Search actor_email or action
+ title: Search
+ description: Search actor_email or action
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AuditListResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/audit/export:
+ get:
+ tags:
+ - audit
+ summary: Export the (filtered) audit trail as CSV or print-ready HTML
+ description: "Return the filtered audit trail as a downloadable artefact.\n\n\
+ * ``format=csv`` (default) — RFC 4180 CSV, suitable for SIEM ingest\n and\
+ \ compliance binders.\n* ``format=html`` — self-contained HTML the browser\
+ \ can save to PDF.\n\nThe same filters as ``GET /audit`` apply, so the exported\
+ \ bundle\nmatches what the analyst is looking at in the UI. A hard ``limit``\n\
+ of 10 000 rows keeps a single export bounded — narrow the filters\nfor very\
+ \ long-running tenants."
+ operationId: export_audit_events_api_v1_audit_export_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: format
+ in: query
+ required: false
+ schema:
+ type: string
+ pattern: ^(csv|html)$
+ default: csv
+ title: Format
+ - name: action
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Filter by action prefix, e.g. 'cases:'
+ title: Action
+ description: Filter by action prefix, e.g. 'cases:'
+ - name: resource
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Resource
+ - name: actor_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Actor Id
+ - name: search
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Search actor_email or action
+ title: Search
+ description: Search actor_email or action
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 10000
+ minimum: 1
+ default: 10000
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/compliance/frameworks:
+ get:
+ tags:
+ - compliance
+ summary: List frameworks and controls
+ operationId: list_frameworks_api_v1_compliance_frameworks_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FrameworksResponse'
+ /api/v1/compliance/frameworks/{framework_id}/controls:
+ get:
+ tags:
+ - compliance
+ summary: List controls for a framework
+ operationId: list_framework_controls_api_v1_compliance_frameworks__framework_id__controls_get
+ parameters:
+ - name: framework_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Framework Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ControlsResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/compliance/evidence/collect:
+ post:
+ tags:
+ - compliance
+ summary: Trigger evidence collection job
+ operationId: trigger_evidence_collection_api_v1_compliance_evidence_collect_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CollectJobRequest'
+ required: true
+ responses:
+ '202':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CollectJobResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/compliance/evidence:
+ post:
+ tags:
+ - compliance
+ summary: Collect evidence item
+ operationId: collect_evidence_api_v1_compliance_evidence_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CollectEvidenceRequest'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EvidenceResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ get:
+ tags:
+ - compliance
+ summary: List evidence items
+ operationId: list_evidence_api_v1_compliance_evidence_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: framework
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Framework
+ - name: control_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Control Id
+ - name: case_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Case Id
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 1000
+ minimum: 1
+ default: 100
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/EvidenceResponse'
+ title: Response List Evidence Api V1 Compliance Evidence Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/compliance/evidence/{evidence_id}:
+ get:
+ tags:
+ - compliance
+ summary: Get evidence item
+ operationId: get_evidence_api_v1_compliance_evidence__evidence_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: evidence_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Evidence Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EvidenceResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/compliance/evidence/{evidence_id}/review:
+ post:
+ tags:
+ - compliance
+ summary: Accept or reject evidence
+ operationId: review_evidence_api_v1_compliance_evidence__evidence_id__review_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: evidence_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Evidence Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReviewEvidenceRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EvidenceResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/compliance/report:
+ get:
+ tags:
+ - compliance
+ summary: Generate compliance posture report
+ operationId: compliance_report_api_v1_compliance_report_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: framework
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Filter to a single framework.
+ title: Framework
+ description: Filter to a single framework.
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/CompliancePosture'
+ title: Response Compliance Report Api V1 Compliance Report Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/metrics/dashboard:
+ get:
+ tags:
+ - metrics
+ summary: Get Dashboard Metrics
+ description: Return aggregated KPI metrics for the dashboard overview tiles.
+ operationId: get_dashboard_metrics_api_v1_metrics_dashboard_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DashboardMetrics'
+ security:
+ - HTTPBearer: []
+ /api/v1/metrics/soc:
+ get:
+ tags:
+ - metrics
+ summary: Get Soc Metrics
+ description: "Return SOC-level KPIs, ATT&CK heatmap, and confidence calibration\
+ \ curve.\n\nTier 1.4 metrics:\n - MTTD, MTTR, MTTC, FPR, escalation rate,\
+ \ analyst overrides\n - ATT&CK technique × tactic heatmap\n - Confidence\
+ \ calibration over time (reliability curve)"
+ operationId: get_soc_metrics_api_v1_metrics_soc_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SOCMetrics'
+ security:
+ - HTTPBearer: []
+ /api/v1/metrics/alerts/trend:
+ get:
+ tags:
+ - metrics
+ summary: Get Alert Trend
+ description: Return alert count trend data bucketed by time period.
+ operationId: get_alert_trend_api_v1_metrics_alerts_trend_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: period
+ in: query
+ required: false
+ schema:
+ type: string
+ default: 24h
+ title: Period
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response Get Alert Trend Api V1 Metrics Alerts Trend Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/sla/metrics:
+ get:
+ tags:
+ - sla
+ summary: Get Sla Metrics
+ description: Return aggregated MTTD / MTTR / MTTC metrics for the tenant.
+ operationId: get_sla_metrics_api_v1_sla_metrics_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: days
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 365
+ minimum: 1
+ description: Look-back window in days
+ default: 30
+ title: Days
+ description: Look-back window in days
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/sla/kpi-targets:
+ get:
+ tags:
+ - sla
+ summary: Get Kpi Bar Targets
+ description: Return merged 2026 KPI bar targets (published defaults plus tenant
+ ``settings.kpi_bar``).
+ operationId: get_kpi_bar_targets_api_v1_sla_kpi_targets_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KpiBarTargetsOut'
+ security:
+ - HTTPBearer: []
+ put:
+ tags:
+ - sla
+ summary: Put Kpi Bar Targets
+ description: Patch tenant KPI bar targets; unspecified fields keep previous
+ values.
+ operationId: put_kpi_bar_targets_api_v1_sla_kpi_targets_put
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KpiBarTargetsUpdate'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KpiBarTargetsOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/sla/config:
+ get:
+ tags:
+ - sla
+ summary: Get Sla Config
+ description: Return per-severity SLA configuration for the tenant.
+ operationId: get_sla_config_api_v1_sla_config_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/SLAConfigOut'
+ type: array
+ title: Response Get Sla Config Api V1 Sla Config Get
+ security:
+ - HTTPBearer: []
+ /api/v1/sla/config/{severity}:
+ put:
+ tags:
+ - sla
+ summary: Update Sla Config
+ description: Upsert SLA targets for a given severity.
+ operationId: update_sla_config_api_v1_sla_config__severity__put
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: severity
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Severity
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAConfigUpdate'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAConfigOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/sla/events:
+ post:
+ tags:
+ - sla
+ summary: Record Sla Event
+ description: Record a lifecycle event (detected/acknowledged/resolved/closed)
+ for an alert.
+ operationId: record_sla_event_api_v1_sla_events_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAEventCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SLAEventOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/investigations:
+ get:
+ tags:
+ - investigations
+ summary: List Runs
+ description: List recent investigation runs for the caller's tenant.
+ operationId: list_runs_api_v1_investigations_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: case_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: Filter by external case id
+ title: Case Id
+ description: Filter by external case id
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: 'Filter by status: running | completed | failed'
+ title: Status
+ description: 'Filter by status: running | completed | failed'
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 200
+ minimum: 1
+ default: 50
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RunSummary'
+ title: Response List Runs Api V1 Investigations Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/costs/aggregate:
+ get:
+ tags:
+ - investigations
+ summary: Aggregate Costs
+ description: 'Aggregate LLM spend across investigation runs for this tenant.
+
+
+ Joins ``aisoc_run_costs`` against ``investigation_runs`` on ``run_id``
+
+ and filters by ``investigation_runs.tenant_id``. We deliberately do NOT
+
+ filter on ``aisoc_run_costs.tenant_id`` directly: the agents service
+
+ writes whatever ``tenant_id`` string the request carried (e.g. the slug
+
+ ``"default"``), which need not match the API-side UUID. Anchoring on
+
+ the run''s canonical tenant column keeps the answer correct regardless
+
+ of how the cost row was tagged, and cannot leak across tenants because
+
+ ``investigation_runs`` is RLS-bound and we re-filter explicitly.
+
+
+ Uses Postgres ``GROUPING SETS`` to compute per-model rows and the
+
+ grand total in one round-trip; ``COUNT(DISTINCT run_id)`` then yields
+
+ a correct run count for both groupings (a naive ``SUM(runs)`` across
+
+ models would double-count runs that touched more than one model).'
+ operationId: aggregate_costs_api_v1_investigations_costs_aggregate_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: window_days
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 365
+ minimum: 1
+ description: Look-back window in days (anchored on run start time)
+ default: 30
+ title: Window Days
+ description: Look-back window in days (anchored on run start time)
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CostAggregateResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}:
+ get:
+ tags:
+ - investigations
+ summary: Get Run
+ description: Run summary plus count of attached events and artifacts.
+ operationId: get_run_api_v1_investigations__run_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RunDetail'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}/events:
+ get:
+ tags:
+ - investigations
+ summary: List Events
+ description: 'Paginated event stream for a run.
+
+
+ The ``since`` cursor lets clients tail the stream — pass the previously
+
+ returned ``next_seq`` to fetch the next page without overlap.'
+ operationId: list_events_api_v1_investigations__run_id__events_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ - name: since
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: integer
+ minimum: 0
+ - type: 'null'
+ description: Return only events with seq strictly greater than this value
+ (long-poll)
+ title: Since
+ description: Return only events with seq strictly greater than this value
+ (long-poll)
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 1000
+ minimum: 1
+ default: 200
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EventListResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}/replay:
+ get:
+ tags:
+ - investigations
+ summary: Replay Run
+ description: 'Return the full ordered event list for a run.
+
+
+ Bounded by ``max_events`` to keep responses sane; runs that exceed the
+
+ bound should fall back to the paginated ``/events`` endpoint.'
+ operationId: replay_run_api_v1_investigations__run_id__replay_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ - name: max_events
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 50000
+ minimum: 1
+ default: 10000
+ title: Max Events
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/EventOut'
+ title: Response Replay Run Api V1 Investigations Run Id Replay Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}/explain:
+ get:
+ tags:
+ - investigations
+ summary: Explain Step
+ description: 'Return prompt + response + evidence for a single step.
+
+
+ Renders three events for context: the previous decision that led into
+
+ this step, the focal event, and the next decision. All artifacts
+
+ attached to the focal event are inlined so the auditor sees the
+
+ literal LLM transcript.'
+ operationId: explain_step_api_v1_investigations__run_id__explain_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ - name: step
+ in: query
+ required: true
+ schema:
+ type: integer
+ minimum: 0
+ description: Event seq to explain
+ title: Step
+ description: Event seq to explain
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExplainResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}/artifacts:
+ get:
+ tags:
+ - investigations
+ summary: List Artifacts
+ operationId: list_artifacts_api_v1_investigations__run_id__artifacts_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ArtifactSummary'
+ title: Response List Artifacts Api V1 Investigations Run Id Artifacts
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}/artifacts/{artifact_id}:
+ get:
+ tags:
+ - investigations
+ summary: Get Artifact
+ operationId: get_artifact_api_v1_investigations__run_id__artifacts__artifact_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ - name: artifact_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Artifact Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArtifactDetail'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}/timeline:
+ get:
+ tags:
+ - investigations
+ summary: Get Timeline
+ description: "Return a scrubbable investigation timeline with decision-provenance\
+ \ annotations.\n\nEach node carries:\n* ``decision`` — structured provenance\
+ \ (reason, confidence, next phase,\n tool name/args/result) extracted from\
+ \ the event ``payload``.\n* ``has_artifact`` — whether a detailed transcript\
+ \ artifact is attached.\n* ``diff_vs_prev_attempt`` — one-line diff for repeated\
+ \ steps so analysts\n can see how the agent corrected itself across retry\
+ \ attempts.\n\nThe response is bounded at 10 000 events. Use the paginated\
+ \ ``/events``\nendpoint for runs that exceed this."
+ operationId: get_timeline_api_v1_investigations__run_id__timeline_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/app__api__v1__endpoints__investigations__TimelineResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}/close:
+ post:
+ tags:
+ - investigations
+ summary: Close Investigation
+ description: 'Close an investigation run and persist an auto-generated summary
+ artifact.
+
+
+ Idempotent: if the run is already closed a summary artifact is still
+
+ generated and returned (useful for re-generating the PDF).
+
+
+ Status transitions: ``running | completed | failed`` → ``closed``'
+ operationId: close_investigation_api_v1_investigations__run_id__close_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CloseRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ClosedSummary'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/investigations/{run_id}/summary.pdf:
+ get:
+ tags:
+ - investigations
+ summary: Export Summary Pdf
+ description: 'Stream the investigation summary as a PDF.
+
+
+ Looks for the most recent ``investigation-summary`` artifact. If none
+
+ exists yet the caller should ``POST /close`` first. The PDF is generated
+
+ server-side using pure-Python ``reportlab`` so there are no browser or
+
+ headless-Chrome dependencies.'
+ operationId: export_summary_pdf_api_v1_investigations__run_id__summary_pdf_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: run_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Run Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/costs/dashboard:
+ get:
+ tags:
+ - costs
+ summary: LLM spend, action counts, top-cost cases, and BYOK savings for the
+ tenant
+ description: "Return a deterministic snapshot of cost, activity, and BYOK savings.\n\
+ \nThe response covers the rolling ``window_days``-long window ending at\n\
+ ``now()`` (UTC) and includes:\n\n* **headline** — total spend / tokens / calls\
+ \ / runs and average\n cost-per-run across the window.\n* **daily_costs**\
+ \ — per-day buckets so the UI can plot a trend line.\n* **by_model** — spend,\
+ \ tokens, runs, and average latency per model\n with the imputed public-list\
+ \ cost for context.\n* **top_cases** — the most expensive ``case_id`` values,\
+ \ the closest\n proxy AiSOC has for \"top-cost playbook runs\" since each\
+ \ playbook\n run lives under a case (no separate ``playbook_runs`` table).\n\
+ * **action_counts** — ``audit_log`` action distribution so operators\n can\
+ \ see how much SOC activity their LLM spend is buying.\n* **byok_savings**\
+ \ — imputed delta between recorded cost and public\n list pricing. ``is_byok_active``\
+ \ reflects whether the live LLM\n provider is loopback / private (per ``/llm/status``).\n\
+ \nTenant scoping is enforced by ``TenantDBSession`` (Postgres RLS sets\n``app.current_tenant_id``)\
+ \ plus an explicit ``tenant_id`` predicate in\nthe underlying query, so the\
+ \ same payload is safe to render for any\nrole with ``reports:read``."
+ operationId: get_cost_dashboard_api_v1_costs_dashboard_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: window_days
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 365
+ minimum: 1
+ description: Rolling window in days. Counts back from now() (UTC). Defaults
+ to the last 30 days; capped at 365.
+ default: 30
+ title: Window Days
+ description: Rolling window in days. Counts back from now() (UTC). Defaults
+ to the last 30 days; capped at 365.
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CostDashboard'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/push/public-key:
+ get:
+ tags:
+ - push
+ summary: Get Public Key
+ description: 'Return the VAPID public key the PWA needs to subscribe.
+
+
+ Public on purpose: the key is an application-server identifier, not a
+
+ secret. Keeping it unauthenticated lets the service worker fetch it on
+
+ install before the user has logged in.'
+ operationId: get_public_key_api_v1_push_public_key_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Get Public Key Api V1 Push Public Key Get
+ /api/v1/push/subscribe:
+ post:
+ tags:
+ - push
+ summary: Subscribe
+ description: Register a PushSubscription for the authenticated user.
+ operationId: subscribe_api_v1_push_subscribe_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Body
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Subscribe Api V1 Push Subscribe Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/push/unsubscribe:
+ post:
+ tags:
+ - push
+ summary: Unsubscribe
+ description: Remove a PushSubscription for the authenticated user.
+ operationId: unsubscribe_api_v1_push_unsubscribe_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Body
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Unsubscribe Api V1 Push Unsubscribe Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/push/test:
+ post:
+ tags:
+ - push
+ summary: Test Notify
+ description: 'Send a test notification to the authenticated user''s devices.
+
+
+ Useful for the PWA settings screen "send test" button.'
+ operationId: test_notify_api_v1_push_test_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Body
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Test Notify Api V1 Push Test Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/oncall:
+ get:
+ tags:
+ - responder
+ - oncall
+ summary: List Oncall
+ description: 'List on-call status for everyone in the tenant.
+
+
+ The PWA paging UI lights up everyone marked ``available`` first, then
+
+ ``busy`` (so the next-best person is one tap away), and finally everyone
+
+ else for context.'
+ operationId: list_oncall_api_v1_oncall_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnCallListResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/oncall/me:
+ get:
+ tags:
+ - responder
+ - oncall
+ summary: My Oncall
+ operationId: my_oncall_api_v1_oncall_me_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnCallEntry'
+ security:
+ - HTTPBearer: []
+ put:
+ tags:
+ - responder
+ - oncall
+ summary: Update My Oncall
+ description: 'Set my own on-call status.
+
+
+ Use ``snoozed`` with ``snooze_minutes`` to defer paging temporarily;
+
+ the PWA shows a countdown and the agent uses it to skip you for that
+
+ window.'
+ operationId: update_my_oncall_api_v1_oncall_me_put
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnCallUpdateRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnCallEntry'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/approvals:
+ get:
+ tags:
+ - responder
+ - approvals
+ summary: List Approvals
+ description: 'List approvals for the current tenant.
+
+
+ Defaults to ``status=pending`` so the PWA inbox view is fast.
+
+ Set ``mine=true`` to only show approvals routed specifically to the
+
+ current user.'
+ operationId: list_approvals_api_v1_approvals_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: page
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 1
+ default: 1
+ title: Page
+ - name: page_size
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 200
+ minimum: 1
+ default: 25
+ title: Page Size
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ default: pending
+ title: Status
+ - name: mine
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: false
+ title: Mine
+ - name: risk_level
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Risk Level
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApprovalListResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - responder
+ - approvals
+ summary: Create Approval
+ description: 'Create a new approval request.
+
+
+ The agents service calls this when it hits a high-risk step that
+
+ requires human sign-off. We persist it, then fan-out a Web Push
+
+ notification via the realtime service so the PWA buzzes the right
+
+ on-call analyst.'
+ operationId: create_approval_api_v1_approvals_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApprovalCreateRequest'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApprovalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/approvals/{approval_id}:
+ get:
+ tags:
+ - responder
+ - approvals
+ summary: Get Approval
+ operationId: get_approval_api_v1_approvals__approval_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: approval_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Approval Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApprovalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/approvals/{approval_id}/decide:
+ post:
+ tags:
+ - responder
+ - approvals
+ summary: Decide Approval
+ description: 'Approve or deny a pending approval.
+
+
+ Idempotent only on the same decision: re-approving an already
+
+ approved request returns the row unchanged; trying to flip an
+
+ approved row to denied (or vice versa) is a 409.'
+ operationId: decide_approval_api_v1_approvals__approval_id__decide_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: approval_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Approval Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApprovalDecisionRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApprovalResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/passkeys/register/begin:
+ post:
+ tags:
+ - responder
+ - passkeys
+ summary: Passkey Register Begin
+ description: 'Start passkey enrollment for the currently logged-in user.
+
+
+ Returns a JSON payload directly suitable for
+
+ ``navigator.credentials.create({ publicKey: <returned> })`` after the
+
+ standard Base64URL-decoding of the binary fields.'
+ operationId: passkey_register_begin_api_v1_passkeys_register_begin_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RegisterBeginRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Passkey Register Begin Api V1 Passkeys Register Begin
+ Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/passkeys/register/finish:
+ post:
+ tags:
+ - responder
+ - passkeys
+ summary: Passkey Register Finish
+ description: Verify the attestation response and persist the new credential.
+ operationId: passkey_register_finish_api_v1_passkeys_register_finish_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FinishRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PasskeyCredentialOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/passkeys/authenticate/begin:
+ post:
+ tags:
+ - responder
+ - passkeys
+ summary: Passkey Authenticate Begin
+ description: 'Start a passkey-based login.
+
+
+ If ``email`` is provided we constrain ``allowCredentials`` so only that
+
+ user''s keys are tried. If omitted we go fully discoverable (the browser
+
+ picks the right credential from its store).'
+ operationId: passkey_authenticate_begin_api_v1_passkeys_authenticate_begin_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AuthenticateBeginRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Passkey Authenticate Begin Api V1 Passkeys Authenticate
+ Begin Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/passkeys/authenticate/finish:
+ post:
+ tags:
+ - responder
+ - passkeys
+ summary: Passkey Authenticate Finish
+ description: Verify a passkey assertion and mint JWTs.
+ operationId: passkey_authenticate_finish_api_v1_passkeys_authenticate_finish_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FinishRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AuthenticateFinishResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/passkeys/credentials:
+ get:
+ tags:
+ - responder
+ - passkeys
+ summary: List My Credentials
+ description: List the current user's active passkeys.
+ operationId: list_my_credentials_api_v1_passkeys_credentials_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CredentialsListResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/passkeys/credentials/{credential_id}:
+ delete:
+ tags:
+ - responder
+ - passkeys
+ summary: Revoke Credential
+ description: Revoke (soft-delete) one of the current user's passkeys.
+ operationId: revoke_credential_api_v1_passkeys_credentials__credential_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: credential_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Credential Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/saved-views:
+ get:
+ tags:
+ - saved-views
+ summary: List Saved Views
+ description: 'Return the caller''s saved views for one list page.
+
+
+ Sorted by ``is_default DESC, updated_at DESC`` so the default
+
+ preset always lands first, with the rest ordered by recency. The
+
+ UI uses this ordering directly to render the saved-views menu.'
+ operationId: list_saved_views_api_v1_saved_views_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: view_type
+ in: query
+ required: true
+ schema:
+ type: string
+ description: 'Which list page to return presets for. One of: alerts, cases,
+ investigations, playbooks.'
+ title: View Type
+ description: 'Which list page to return presets for. One of: alerts, cases,
+ investigations, playbooks.'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SavedViewModel'
+ title: Response List Saved Views Api V1 Saved Views Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - saved-views
+ summary: Create Saved View
+ description: 'Create a new saved view.
+
+
+ If ``is_default=True`` is passed, any existing default for the
+
+ same ``(tenant, user, view_type)`` is demoted *first* so the
+
+ partial unique index in 037 doesn''t trip. We do the demote + insert
+
+ in a single transaction so a concurrent ``POST`` from the same
+
+ user can''t leave the table without a default.'
+ operationId: create_saved_view_api_v1_saved_views_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateSavedViewRequest'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SavedViewModel'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/saved-views/{view_id}:
+ patch:
+ tags:
+ - saved-views
+ summary: Update Saved View
+ description: 'Patch a saved view in place.
+
+
+ Sending only ``is_default=True`` is the canonical "make this my
+
+ default" path. We demote the existing default first inside the
+
+ same transaction.'
+ operationId: update_saved_view_api_v1_saved_views__view_id__patch
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: view_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: View Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateSavedViewRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SavedViewModel'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - saved-views
+ summary: Delete Saved View
+ description: Delete a saved view owned by the caller.
+ operationId: delete_saved_view_api_v1_saved_views__view_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: view_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: View Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/assets:
+ get:
+ tags:
+ - assets
+ summary: List Assets
+ operationId: list_assets_api_v1_assets_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: asset_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Asset Type
+ - name: criticality
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Criticality
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/AssetOut'
+ title: Response List Assets Api V1 Assets Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - assets
+ summary: Create Asset
+ operationId: create_asset_api_v1_assets_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AssetCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AssetOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/assets/{asset_id}:
+ get:
+ tags:
+ - assets
+ summary: Get Asset
+ operationId: get_asset_api_v1_assets__asset_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: asset_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Asset Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AssetOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ patch:
+ tags:
+ - assets
+ summary: Update Asset
+ operationId: update_asset_api_v1_assets__asset_id__patch
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: asset_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Asset Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AssetUpdate'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AssetOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - assets
+ summary: Delete Asset
+ operationId: delete_asset_api_v1_assets__asset_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: asset_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Asset Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/assets/vulnerabilities:
+ get:
+ tags:
+ - assets
+ summary: List Vulnerabilities
+ operationId: list_vulnerabilities_api_v1_assets_vulnerabilities_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: severity
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ - name: is_exploited
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Is Exploited
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/VulnerabilityOut'
+ title: Response List Vulnerabilities Api V1 Assets Vulnerabilities
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - assets
+ summary: Create Vulnerability
+ operationId: create_vulnerability_api_v1_assets_vulnerabilities_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/VulnerabilityCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/VulnerabilityOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/assets/{asset_id}/vulnerabilities:
+ get:
+ tags:
+ - assets
+ summary: List Asset Vulnerabilities
+ operationId: list_asset_vulnerabilities_api_v1_assets__asset_id__vulnerabilities_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: asset_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Asset Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/VulnerabilityOut'
+ title: Response List Asset Vulnerabilities Api V1 Assets Asset Id Vulnerabilities
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/children:
+ get:
+ tags:
+ - mssp
+ summary: List Child Tenants
+ description: Return all child tenants of the current parent tenant.
+ operationId: list_child_tenants_api_v1_mssp_children_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/ChildTenantOut'
+ type: array
+ title: Response List Child Tenants Api V1 Mssp Children Get
+ security:
+ - HTTPBearer: []
+ /api/v1/mssp/children/{child_id}/onboard:
+ post:
+ tags:
+ - mssp
+ summary: Onboard Child Tenant
+ description: Link an existing tenant as a child of the current MSSP tenant.
+ operationId: onboard_child_tenant_api_v1_mssp_children__child_id__onboard_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: child_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Child Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ title: Response Onboard Child Tenant Api V1 Mssp Children Child Id Onboard
+ Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/notes:
+ get:
+ tags:
+ - mssp
+ summary: List Notes
+ operationId: list_notes_api_v1_mssp_notes_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: child_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Child Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TenantNoteOut'
+ title: Response List Notes Api V1 Mssp Notes Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - mssp
+ summary: Create Note
+ operationId: create_note_api_v1_mssp_notes_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TenantNoteCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TenantNoteOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/delegations:
+ get:
+ tags:
+ - mssp
+ summary: List Delegations
+ operationId: list_delegations_api_v1_mssp_delegations_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/DelegationOut'
+ type: array
+ title: Response List Delegations Api V1 Mssp Delegations Get
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - mssp
+ summary: Create Delegation
+ operationId: create_delegation_api_v1_mssp_delegations_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DelegationCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DelegationOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/mssp/delegations/{delegation_id}:
+ delete:
+ tags:
+ - mssp
+ summary: Revoke Delegation
+ operationId: revoke_delegation_api_v1_mssp_delegations__delegation_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: delegation_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Delegation Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/metrics:
+ get:
+ tags:
+ - mssp
+ summary: List Metrics
+ description: Return the latest metrics snapshot for every child tenant.
+ operationId: list_metrics_api_v1_mssp_metrics_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/MetricsOut'
+ type: array
+ title: Response List Metrics Api V1 Mssp Metrics Get
+ security:
+ - HTTPBearer: []
+ /api/v1/mssp/rule-packs:
+ get:
+ tags:
+ - mssp
+ summary: List Rule Packs
+ description: List all rule packs owned by the current parent tenant.
+ operationId: list_rule_packs_api_v1_mssp_rule_packs_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/RulePackOut'
+ type: array
+ title: Response List Rule Packs Api V1 Mssp Rule Packs Get
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - mssp
+ summary: Create Rule Pack
+ description: Create a new rule pack (parent tenant only).
+ operationId: create_rule_pack_api_v1_mssp_rule_packs_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RulePackCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RulePackOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/mssp/rule-packs/{pack_id}:
+ get:
+ tags:
+ - mssp
+ summary: Get Rule Pack
+ operationId: get_rule_pack_api_v1_mssp_rule_packs__pack_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: pack_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Pack Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RulePackOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ put:
+ tags:
+ - mssp
+ summary: Update Rule Pack
+ operationId: update_rule_pack_api_v1_mssp_rule_packs__pack_id__put
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: pack_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Pack Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RulePackUpdate'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RulePackOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - mssp
+ summary: Delete Rule Pack
+ operationId: delete_rule_pack_api_v1_mssp_rule_packs__pack_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: pack_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Pack Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/rule-packs/{pack_id}/rules:
+ post:
+ tags:
+ - mssp
+ summary: Add Rule To Pack
+ operationId: add_rule_to_pack_api_v1_mssp_rule_packs__pack_id__rules_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: pack_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Pack Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RulePackRuleAdd'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ title: Response Add Rule To Pack Api V1 Mssp Rule Packs Pack Id Rules
+ Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/rule-packs/{pack_id}/rules/{rule_id}:
+ delete:
+ tags:
+ - mssp
+ summary: Remove Rule From Pack
+ operationId: remove_rule_from_pack_api_v1_mssp_rule_packs__pack_id__rules__rule_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: pack_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Pack Id
+ - name: rule_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Rule Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/rule-packs/{pack_id}/assign:
+ post:
+ tags:
+ - mssp
+ summary: Assign Pack To Child
+ operationId: assign_pack_to_child_api_v1_mssp_rule_packs__pack_id__assign_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: pack_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Pack Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PackAssignmentCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PackAssignmentOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/overrides:
+ post:
+ tags:
+ - mssp
+ summary: Create Rule Override
+ operationId: create_rule_override_api_v1_mssp_overrides_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RuleOverrideCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RuleOverrideOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ get:
+ tags:
+ - mssp
+ summary: List Overrides
+ operationId: list_overrides_api_v1_mssp_overrides_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: child_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Child Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RuleOverrideOut'
+ title: Response List Overrides Api V1 Mssp Overrides Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/overrides/{override_id}:
+ delete:
+ tags:
+ - mssp
+ summary: Delete Override
+ operationId: delete_override_api_v1_mssp_overrides__override_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: override_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Override Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/children/{child_id}/effective-rules:
+ get:
+ tags:
+ - mssp
+ summary: List Effective Rules For Child
+ description: Preview the resolved rule set for a child tenant (parent-only).
+ operationId: list_effective_rules_for_child_api_v1_mssp_children__child_id__effective_rules_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: child_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Child Id
+ - name: category
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ - name: rule_language
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Rule Language
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/EffectiveRuleOut'
+ title: Response List Effective Rules For Child Api V1 Mssp Children Child
+ Id Effective Rules Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/children/{child_id}/effective-rules/count:
+ get:
+ tags:
+ - mssp
+ summary: Count Effective Rules For Child
+ description: Return source-breakdown counts for a child tenant's effective ruleset.
+ operationId: count_effective_rules_for_child_api_v1_mssp_children__child_id__effective_rules_count_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: child_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Child Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EffectiveRuleCountOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/mssp/overview:
+ get:
+ tags:
+ - mssp
+ summary: Mssp Overview
+ description: Cross-tenant KPI summary for the MSSP parent dashboard.
+ operationId: mssp_overview_api_v1_mssp_overview_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MSSPKpiOverview'
+ security:
+ - HTTPBearer: []
+ /api/v1/mssp/tenants:
+ get:
+ tags:
+ - mssp
+ summary: List Managed Tenants
+ description: List managed tenants with health scores for the parent dashboard.
+ operationId: list_managed_tenants_api_v1_mssp_tenants_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/ManagedTenantRow'
+ type: array
+ title: Response List Managed Tenants Api V1 Mssp Tenants Get
+ security:
+ - HTTPBearer: []
+ /api/v1/mssp/incidents:
+ get:
+ tags:
+ - mssp
+ summary: List Cross Tenant Incidents
+ description: Critical incidents across all managed tenants.
+ operationId: list_cross_tenant_incidents_api_v1_mssp_incidents_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: severity
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: 'Filter: high | medium | low'
+ title: Severity
+ description: 'Filter: high | medium | low'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/CrossTenantIncident'
+ title: Response List Cross Tenant Incidents Api V1 Mssp Incidents
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/insider-threat/profiles:
+ get:
+ tags:
+ - insider-threat
+ summary: List Profiles
+ operationId: list_profiles_api_v1_insider_threat_profiles_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: risk_tier
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Risk Tier
+ - name: watchlisted_only
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: false
+ title: Watchlisted Only
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RiskProfileOut'
+ title: Response List Profiles Api V1 Insider Threat Profiles Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/insider-threat/profiles/{profile_id}:
+ get:
+ tags:
+ - insider-threat
+ summary: Get Profile
+ operationId: get_profile_api_v1_insider_threat_profiles__profile_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: profile_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Profile Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RiskProfileOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/insider-threat/profiles/{profile_id}/watchlist:
+ patch:
+ tags:
+ - insider-threat
+ summary: Update Watchlist
+ operationId: update_watchlist_api_v1_insider_threat_profiles__profile_id__watchlist_patch
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: profile_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Profile Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/WatchlistUpdate'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RiskProfileOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/insider-threat/indicators:
+ get:
+ tags:
+ - insider-threat
+ summary: List Indicators
+ operationId: list_indicators_api_v1_insider_threat_indicators_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: severity
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ - name: indicator_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Indicator Type
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/IndicatorOut'
+ title: Response List Indicators Api V1 Insider Threat Indicators Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - insider-threat
+ summary: Create Indicator
+ operationId: create_indicator_api_v1_insider_threat_indicators_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IndicatorCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IndicatorOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/insider-threat/indicators/{indicator_id}/acknowledge:
+ post:
+ tags:
+ - insider-threat
+ summary: Acknowledge Indicator
+ operationId: acknowledge_indicator_api_v1_insider_threat_indicators__indicator_id__acknowledge_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: indicator_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Indicator Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IndicatorOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/insider-threat/peer-groups:
+ get:
+ tags:
+ - insider-threat
+ summary: List Peer Groups
+ operationId: list_peer_groups_api_v1_insider_threat_peer_groups_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/PeerGroupOut'
+ type: array
+ title: Response List Peer Groups Api V1 Insider Threat Peer Groups
+ Get
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - insider-threat
+ summary: Create Peer Group
+ operationId: create_peer_group_api_v1_insider_threat_peer_groups_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PeerGroupCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PeerGroupOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/remediation/config:
+ get:
+ tags:
+ - remediation
+ summary: Get Maturity Config
+ operationId: get_maturity_config_api_v1_remediation_config_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MaturityOut'
+ security:
+ - HTTPBearer: []
+ put:
+ tags:
+ - remediation
+ summary: Update Maturity Config
+ operationId: update_maturity_config_api_v1_remediation_config_put
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MaturityConfig'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/MaturityOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/remediation/gate-log:
+ get:
+ tags:
+ - remediation
+ summary: List Gate Log
+ operationId: list_gate_log_api_v1_remediation_gate_log_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: decision
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Decision
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/GateLogOut'
+ title: Response List Gate Log Api V1 Remediation Gate Log Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/remediation/whitelist:
+ get:
+ tags:
+ - remediation
+ summary: List Whitelist
+ operationId: list_whitelist_api_v1_remediation_whitelist_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/WhitelistOut'
+ type: array
+ title: Response List Whitelist Api V1 Remediation Whitelist Get
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - remediation
+ summary: Add To Whitelist
+ operationId: add_to_whitelist_api_v1_remediation_whitelist_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/WhitelistCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/WhitelistOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/remediation/whitelist/{entry_id}:
+ delete:
+ tags:
+ - remediation
+ summary: Remove From Whitelist
+ operationId: remove_from_whitelist_api_v1_remediation_whitelist__entry_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: entry_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Entry Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/feedback/alert-override:
+ post:
+ tags:
+ - feedback
+ summary: Submit Alert Override
+ description: 'Record an analyst verdict correction on an alert and surface
+
+ retroactive re-disposition candidates.'
+ operationId: submit_alert_override_api_v1_feedback_alert_override_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlertOverrideRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlertOverrideResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/feedback/redisposition/apply:
+ post:
+ tags:
+ - feedback
+ summary: Apply Redisposition Endpoint
+ description: Bulk-update the disposition on past alerts the analyst confirmed.
+ operationId: apply_redisposition_endpoint_api_v1_feedback_redisposition_apply_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RedispositionApplyRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RedispositionApplyResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/feedback/overrides:
+ get:
+ tags:
+ - feedback
+ summary: List Overrides Endpoint
+ description: List analyst-override entries the agent has 'learned' from.
+ operationId: list_overrides_endpoint_api_v1_feedback_overrides_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ default: 100
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/OverrideEntryModel'
+ title: Response List Overrides Endpoint Api V1 Feedback Overrides
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/feedback/summary:
+ get:
+ tags:
+ - feedback
+ summary: Get Override Summary
+ description: Return a summary of analyst overrides for this tenant.
+ operationId: get_override_summary_api_v1_feedback_summary_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OverrideSummaryResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/autonomy-policy:
+ get:
+ tags:
+ - autonomy-policy
+ summary: Get Autonomy Policy
+ description: 'Return the effective autonomy policy for the calling tenant.
+
+
+ For each known action we surface the merged thresholds (defaults + DB
+
+ overrides), the hard-coded defaults, and an ``overridden`` flag the UI
+
+ uses to render a "modified from default" badge.'
+ operationId: get_autonomy_policy_api_v1_autonomy_policy_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AutonomyPolicyResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/autonomy-policy/{action}:
+ put:
+ tags:
+ - autonomy-policy
+ summary: Upsert Action Threshold
+ description: 'Set (or update) the three-tier thresholds for one action.
+
+
+ The new policy takes effect after the agent''s tenant-cache TTL expires
+
+ or the cache is reset (``services/agents/app/policy/__init__.py``
+
+ ``reset_tenant_cache``).'
+ operationId: upsert_action_threshold_api_v1_autonomy_policy__action__put
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: action
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Action
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ThresholdUpdateRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ThresholdUpdateResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - autonomy-policy
+ summary: Reset Action Threshold
+ description: Reset a single action back to the hard-coded / YAML default.
+ operationId: reset_action_threshold_api_v1_autonomy_policy__action__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: action
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Action
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/nl-detection/translate:
+ post:
+ tags:
+ - nl_detection
+ summary: Translate Detection
+ description: Convert a plain-English threat description into multi-platform
+ detection rules.
+ operationId: translate_detection_api_v1_nl_detection_translate_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NLDetectionRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NLDetectionResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/detection-loop/suggest:
+ post:
+ tags:
+ - detection_rules
+ - detection_loop
+ summary: Draft Sigma improvement for a FP alert
+ description: Retrieve the triggering rule + alert evidence, then draft a Sigma
+ improvement.
+ operationId: suggest_fp_fix_api_v1_detection_loop_suggest_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuggestRequest'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuggestionResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection-loop/suggestions:
+ get:
+ tags:
+ - detection_rules
+ - detection_loop
+ summary: List LLM-drafted Sigma suggestions
+ operationId: list_suggestions_api_v1_detection_loop_suggestions_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuggestionListResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/detection-loop/suggestions/{suggestion_id}:
+ get:
+ tags:
+ - detection_rules
+ - detection_loop
+ summary: Get one Sigma suggestion
+ operationId: get_suggestion_api_v1_detection_loop_suggestions__suggestion_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: suggestion_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Suggestion Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuggestionResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/nl-query/translate:
+ post:
+ tags:
+ - nl_query
+ summary: Translate a natural-language security question to ES|QL / SPL / KQL
+ operationId: translate_query_api_v1_nl_query_translate_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NLQueryTranslateRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NLQueryTranslateResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/nl-query/execute:
+ post:
+ tags:
+ - nl_query
+ summary: Translate NL question and execute ES|QL against Elasticsearch
+ operationId: execute_query_api_v1_nl_query_execute_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NLQueryExecuteRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NLQueryExecuteResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/identity-timeline/build:
+ post:
+ tags:
+ - identity_timeline
+ summary: Build identity-centric investigation timeline
+ operationId: build_timeline_api_v1_identity_timeline_build_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BuildTimelineRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IdentityTimeline'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/identity-timeline:
+ get:
+ tags:
+ - identity_timeline
+ summary: Quick timeline lookup for an identity
+ operationId: get_timeline_api_v1_identity_timeline_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: identity_kind
+ in: query
+ required: true
+ schema:
+ enum:
+ - user
+ - device
+ - service_account
+ - ip
+ type: string
+ title: Identity Kind
+ - name: identity_value
+ in: query
+ required: true
+ schema:
+ type: string
+ minLength: 1
+ title: Identity Value
+ - name: hours
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 8760
+ minimum: 1
+ default: 72
+ title: Hours
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IdentityTimeline'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/translation/translate:
+ post:
+ tags:
+ - translation
+ summary: Translate a detection rule across formats
+ operationId: translate_rule_api_v1_translation_translate_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TranslateRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TranslateResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/translation/formats:
+ get:
+ tags:
+ - translation
+ summary: List supported detection rule formats
+ operationId: list_formats_api_v1_translation_formats_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FormatsResponse'
+ /api/v1/hunts:
+ get:
+ tags:
+ - hunts
+ summary: List hunt hypotheses
+ operationId: list_hunts_api_v1_hunts_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ - name: priority
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Priority
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ minimum: 1
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/app__api__v1__endpoints__hunts__HuntResponse'
+ title: Response List Hunts Api V1 Hunts Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - hunts
+ summary: Create hunt hypothesis
+ operationId: create_hunt_api_v1_hunts_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateHuntRequest'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/app__api__v1__endpoints__hunts__HuntResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/hunts/{hunt_id}:
+ get:
+ tags:
+ - hunts
+ summary: Get hunt
+ operationId: get_hunt_api_v1_hunts__hunt_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: hunt_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Hunt Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/app__api__v1__endpoints__hunts__HuntResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ patch:
+ tags:
+ - hunts
+ summary: Update hunt
+ operationId: update_hunt_api_v1_hunts__hunt_id__patch
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: hunt_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Hunt Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateHuntRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/app__api__v1__endpoints__hunts__HuntResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/hunts/{hunt_id}/run:
+ post:
+ tags:
+ - hunts
+ summary: Execute hunt query
+ operationId: run_hunt_api_v1_hunts__hunt_id__run_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: hunt_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Hunt Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RunHuntRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HuntRunResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/hunts/{hunt_id}/runs:
+ get:
+ tags:
+ - hunts
+ summary: List hunt runs
+ operationId: list_runs_api_v1_hunts__hunt_id__runs_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: hunt_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Hunt Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/HuntRunResponse'
+ title: Response List Runs Api V1 Hunts Hunt Id Runs Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/hunts/{hunt_id}/findings:
+ post:
+ tags:
+ - hunts
+ summary: Append findings
+ operationId: add_findings_api_v1_hunts__hunt_id__findings_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: hunt_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Hunt Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AddFindingsRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/app__api__v1__endpoints__hunts__HuntResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/phishing/submit:
+ post:
+ tags:
+ - phishing
+ summary: Submit artifact for phishing triage
+ operationId: submit_api_v1_phishing_submit_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SubmitRequest'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SubmissionResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/phishing/submissions:
+ get:
+ tags:
+ - phishing
+ summary: List phishing submissions
+ operationId: list_submissions_api_v1_phishing_submissions_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: verdict
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Verdict
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ minimum: 1
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SubmissionResponse'
+ title: Response List Submissions Api V1 Phishing Submissions Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/phishing/{submission_id}:
+ get:
+ tags:
+ - phishing
+ summary: Get submission
+ operationId: get_submission_api_v1_phishing__submission_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: submission_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Submission Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SubmissionResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/phishing/{submission_id}/retriage:
+ post:
+ tags:
+ - phishing
+ summary: Re-run triage on submission
+ operationId: retriage_api_v1_phishing__submission_id__retriage_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: submission_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Submission Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SubmissionResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/kb/ingest:
+ post:
+ tags:
+ - knowledge_base
+ summary: Ingest document into knowledge base
+ operationId: ingest_api_v1_kb_ingest_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IngestRequest'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/KBDocResponse'
+ type: array
+ title: Response Ingest Api V1 Kb Ingest Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/kb/documents:
+ get:
+ tags:
+ - knowledge_base
+ summary: List KB documents
+ operationId: list_documents_api_v1_kb_documents_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/KBDocResponse'
+ type: array
+ title: Response List Documents Api V1 Kb Documents Get
+ security:
+ - HTTPBearer: []
+ /api/v1/kb/documents/{doc_id}:
+ get:
+ tags:
+ - knowledge_base
+ summary: Get KB document
+ operationId: get_document_api_v1_kb_documents__doc_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: doc_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Doc Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KBDocResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - knowledge_base
+ summary: Remove KB document
+ operationId: delete_document_api_v1_kb_documents__doc_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: doc_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Doc Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/kb/query:
+ post:
+ tags:
+ - knowledge_base
+ summary: Search knowledge base + optional LLM synthesis
+ operationId: query_kb_api_v1_kb_query_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QueryRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/QueryResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/threat-intel/iocs:
+ get:
+ tags:
+ - threat-intel
+ summary: List Iocs
+ operationId: list_iocs_api_v1_threat_intel_iocs_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: ioc_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Ioc Type
+ - name: severity
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ - name: is_active
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Is Active
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/IOCOut'
+ title: Response List Iocs Api V1 Threat Intel Iocs Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - threat-intel
+ summary: Create Ioc
+ operationId: create_ioc_api_v1_threat_intel_iocs_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IOCCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IOCOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/threat-intel/iocs/{ioc_id}:
+ get:
+ tags:
+ - threat-intel
+ summary: Get Ioc
+ operationId: get_ioc_api_v1_threat_intel_iocs__ioc_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: ioc_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Ioc Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IOCOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - threat-intel
+ summary: Delete Ioc
+ operationId: delete_ioc_api_v1_threat_intel_iocs__ioc_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: ioc_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Ioc Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/threat-intel/actors:
+ get:
+ tags:
+ - threat-intel
+ summary: List Actors
+ operationId: list_actors_api_v1_threat_intel_actors_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: is_active
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Is Active
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 200
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ThreatActorOut'
+ title: Response List Actors Api V1 Threat Intel Actors Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - threat-intel
+ summary: Create Actor
+ operationId: create_actor_api_v1_threat_intel_actors_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ThreatActorCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ThreatActorOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/threat-intel/feeds:
+ get:
+ tags:
+ - threat-intel
+ summary: List Feeds
+ operationId: list_feeds_api_v1_threat_intel_feeds_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/FeedOut'
+ type: array
+ title: Response List Feeds Api V1 Threat Intel Feeds Get
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - threat-intel
+ summary: Create Feed
+ operationId: create_feed_api_v1_threat_intel_feeds_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FeedCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FeedOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/threat-intel/feeds/{feed_id}:
+ delete:
+ tags:
+ - threat-intel
+ summary: Delete Feed
+ operationId: delete_feed_api_v1_threat_intel_feeds__feed_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: feed_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Feed Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/posture/findings:
+ get:
+ tags:
+ - posture
+ summary: List Findings
+ operationId: list_findings_api_v1_posture_findings_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: cloud_provider
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Provider
+ - name: severity
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ - name: rule_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Rule Id
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/FindingOut'
+ title: Response List Findings Api V1 Posture Findings Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - posture
+ summary: Ingest Finding
+ operationId: ingest_finding_api_v1_posture_findings_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/posture/findings/{finding_id}:
+ get:
+ tags:
+ - posture
+ summary: Get Finding
+ operationId: get_finding_api_v1_posture_findings__finding_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: finding_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Finding Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/posture/findings/{finding_id}/suppress:
+ post:
+ tags:
+ - posture
+ summary: Suppress Finding
+ operationId: suppress_finding_api_v1_posture_findings__finding_id__suppress_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: finding_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Finding Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SuppressRequest'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/posture/findings/{finding_id}/resolve:
+ post:
+ tags:
+ - posture
+ summary: Resolve Finding
+ operationId: resolve_finding_api_v1_posture_findings__finding_id__resolve_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: finding_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Finding Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FindingOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/posture/summary:
+ get:
+ tags:
+ - posture
+ summary: Get Summary
+ operationId: get_summary_api_v1_posture_summary_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: cloud_provider
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Provider
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PostureSummary'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/posture/scans:
+ get:
+ tags:
+ - posture
+ summary: List Scans
+ operationId: list_scans_api_v1_posture_scans_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 100
+ default: 20
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ScanRunOut'
+ title: Response List Scans Api V1 Posture Scans Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/easm/scan:
+ post:
+ tags:
+ - easm
+ summary: Trigger Easm Scan
+ description: 'Trigger an EASM discovery scan for a tenant (Tier 3.6).
+
+
+ Runs passive connectors (Shodan / Censys) and, when enabled, an active
+
+ TCP connect probe. Results are upserted into ``external_assets`` and
+
+ drift events written to ``external_asset_drift``.'
+ operationId: trigger_easm_scan_api_v1_easm_scan_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ScanRequest'
+ required: true
+ responses:
+ '202':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Trigger Easm Scan Api V1 Easm Scan Post
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/easm/assets:
+ get:
+ tags:
+ - easm
+ summary: List External Assets
+ description: 'List externally discovered assets for a tenant.
+
+
+ ``tenant_id`` defaults to the authenticated user''s tenant, so the analyst
+
+ console can hit ``/easm/assets`` without explicit tenant scoping.'
+ operationId: list_external_assets_api_v1_easm_assets_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: tenant_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Tenant Id
+ - name: asset_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - $ref: '#/components/schemas/ExternalAssetType'
+ - type: 'null'
+ title: Asset Type
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 200
+ default: 50
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ title: Response List External Assets Api V1 Easm Assets Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/easm/drift:
+ get:
+ tags:
+ - easm
+ summary: List External Asset Drift
+ description: List drift events (new ports, certs, sub-domains, etc.).
+ operationId: list_external_asset_drift_api_v1_easm_drift_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: tenant_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Tenant Id
+ - name: external_asset_id
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: External Asset Id
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 200
+ default: 50
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ type: object
+ additionalProperties: true
+ title: Response List External Asset Drift Api V1 Easm Drift Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/identity-graph/nodes:
+ get:
+ tags:
+ - identity-graph
+ summary: List Nodes
+ operationId: list_nodes_api_v1_identity_graph_nodes_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: node_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Node Type
+ - name: source_system
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Source System
+ - name: min_risk
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Min Risk
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 500
+ default: 50
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/NodeOut'
+ title: Response List Nodes Api V1 Identity Graph Nodes Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - identity-graph
+ summary: Create Node
+ operationId: create_node_api_v1_identity_graph_nodes_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NodeCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NodeOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/identity-graph/nodes/{node_id}:
+ get:
+ tags:
+ - identity-graph
+ summary: Get Node
+ operationId: get_node_api_v1_identity_graph_nodes__node_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: node_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Node Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NodeOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/identity-graph/nodes/{node_id}/edges:
+ get:
+ tags:
+ - identity-graph
+ summary: Get Node Edges
+ operationId: get_node_edges_api_v1_identity_graph_nodes__node_id__edges_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: node_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Node Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/EdgeOut'
+ title: Response Get Node Edges Api V1 Identity Graph Nodes Node Id Edges
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/identity-graph/edges:
+ get:
+ tags:
+ - identity-graph
+ summary: List Edges
+ operationId: list_edges_api_v1_identity_graph_edges_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: edge_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Edge Type
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 1000
+ default: 100
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/EdgeOut'
+ title: Response List Edges Api V1 Identity Graph Edges Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - identity-graph
+ summary: Create Edge
+ operationId: create_edge_api_v1_identity_graph_edges_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EdgeCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EdgeOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/identity-graph/alert-links:
+ post:
+ tags:
+ - identity-graph
+ summary: Link Alert To Identity
+ operationId: link_alert_to_identity_api_v1_identity_graph_alert_links_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlertLinkCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlertLinkOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/identity-graph/alert-links/{alert_id}:
+ get:
+ tags:
+ - identity-graph
+ summary: Get Alert Identity Links
+ operationId: get_alert_identity_links_api_v1_identity_graph_alert_links__alert_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: alert_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Alert Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/AlertLinkOut'
+ title: Response Get Alert Identity Links Api V1 Identity Graph Alert
+ Links Alert Id Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/reports/templates:
+ get:
+ tags:
+ - reports
+ summary: List Templates
+ operationId: list_templates_api_v1_reports_templates_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/TemplateOut'
+ type: array
+ title: Response List Templates Api V1 Reports Templates Get
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - reports
+ summary: Create Template
+ operationId: create_template_api_v1_reports_templates_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TemplateCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TemplateOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/reports/templates/{template_id}:
+ get:
+ tags:
+ - reports
+ summary: Get Template
+ operationId: get_template_api_v1_reports_templates__template_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: template_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Template Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TemplateOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ delete:
+ tags:
+ - reports
+ summary: Delete Template
+ operationId: delete_template_api_v1_reports_templates__template_id__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: template_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Template Id
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/reports/artefacts:
+ get:
+ tags:
+ - reports
+ summary: List Artefacts
+ operationId: list_artefacts_api_v1_reports_artefacts_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: report_type
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Report Type
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 100
+ default: 20
+ title: Limit
+ - name: offset
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 0
+ default: 0
+ title: Offset
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ArtefactOut'
+ title: Response List Artefacts Api V1 Reports Artefacts Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/reports/generate:
+ post:
+ tags:
+ - reports
+ summary: Generate Report
+ description: Enqueue a report generation job. Returns the artefact record immediately
+ with status='pending'.
+ operationId: generate_report_api_v1_reports_generate_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenerateRequest'
+ required: true
+ responses:
+ '202':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArtefactOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/reports/artefacts/{artefact_id}:
+ get:
+ tags:
+ - reports
+ summary: Get Artefact
+ operationId: get_artefact_api_v1_reports_artefacts__artefact_id__get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: artefact_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Artefact Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArtefactOut'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/reports/digest/weekly:
+ get:
+ tags:
+ - reports
+ summary: Executive weekly digest (JSON, print-ready HTML, or PDF)
+ description: "Build a deterministic weekly digest for the caller's tenant.\n\
+ \nSupported formats (``?format=``):\n\n* ``json`` — Pydantic model serialised\
+ \ as JSON *(default)*\n* ``html`` — Self-contained print-ready HTML page\n\
+ * ``pdf`` — Server-side PDF generated via WeasyPrint (requires the\n \
+ \ WeasyPrint native library stack; returns 503 when unavailable)"
+ operationId: weekly_digest_api_v1_reports_digest_weekly_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: format
+ in: query
+ required: false
+ schema:
+ type: string
+ pattern: ^(json|html|pdf)$
+ default: json
+ title: Format
+ - name: period_start
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ description: ISO timestamp; defaults to now-7d
+ title: Period Start
+ description: ISO timestamp; defaults to now-7d
+ - name: period_end
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ description: ISO timestamp; defaults to now
+ title: Period End
+ description: ISO timestamp; defaults to now
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/airgap/status:
+ get:
+ tags:
+ - airgap
+ summary: Current air-gap egress policy
+ description: "Return the live air-gap policy snapshot for this pod.\n\nResponse\
+ \ shape::\n\n {\n \"enabled\": false,\n \"allowlist\": [\"\
+ mirror.example.com\"],\n \"implicit_private_suffixes\": [\".local\"\
+ , \".internal\", ...],\n \"policy\": \"Air-gapped mode is OFF — outbound\
+ \ HTTP is unrestricted.\"\n }\n\nThe ``policy`` field is a human-readable\
+ \ summary suitable for\nembedding in audit reports."
+ operationId: get_airgap_status_api_v1_airgap_status_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Get Airgap Status Api V1 Airgap Status Get
+ /api/v1/llm/status:
+ get:
+ tags:
+ - llm
+ summary: Current LLM provider configuration
+ description: "Return the env-only LLM provider snapshot for this pod.\n\nIntentionally\
+ \ **unauthenticated** and **env-only**, mirroring\n``GET /api/v1/airgap/status``:\
+ \ the response carries no secrets\n(only ``key_set: bool``) and is safe for\
+ \ operator dashboards,\nauditors, and k8s liveness probes.\n\nTenant-aware\
+ \ callers (the web UI's \"Deployment & AI\" Settings\npanel, the agents service's\
+ \ explain path) layer per-tenant BYOK\noverrides on top of this baseline by\
+ \ either:\n\n* calling :func:`tenant_llm_status` with their own DB session,\
+ \ or\n* pairing this response with ``GET /api/v1/llm/credentials`` to\n perform\
+ \ the merge client-side."
+ operationId: get_llm_status_api_v1_llm_status_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Get Llm Status Api V1 Llm Status Get
+ /api/v1/llm/credentials:
+ get:
+ tags:
+ - llm
+ summary: Read the tenant's BYOK LLM credential
+ description: 'Return the per-tenant LLM credential, or ``null`` if none stored.
+
+
+ Returning ``null`` (rather than 404) on the empty case lets the UI
+
+ render a single "Configure your LLM" CTA without dispatching on
+
+ error codes. The Settings panel renders a "no credential set —
+
+ falling back to platform defaults" hint when this is null.'
+ operationId: get_llm_credential_api_v1_llm_credentials_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ anyOf:
+ - $ref: '#/components/schemas/LlmCredentialView'
+ - type: 'null'
+ title: Response Get Llm Credential Api V1 Llm Credentials Get
+ security:
+ - HTTPBearer: []
+ put:
+ tags:
+ - llm
+ summary: Upsert the tenant's BYOK LLM credential
+ description: "Create or update the tenant's BYOK credential.\n\nBehaviour notes:\n\
+ \n* ``api_key`` is required for hosted SaaS providers on first write.\n A\
+ \ subsequent PUT with ``api_key=null`` keeps the stored\n ciphertext (useful\
+ \ when toggling ``enabled`` or changing\n ``model`` without re-typing the\
+ \ secret).\n* Whenever ``api_key`` is provided we bump ``last_rotated_at``\
+ \ so\n the UI can render \"rotated 3 days ago\".\n* The audit row's ``changes``\
+ \ payload includes the *fact* of a\n rotation but never the key itself —\
+ \ we only record whether the\n key was changed, the previous + new providers,\
+ \ and whether the\n row is enabled."
+ operationId: upsert_llm_credential_api_v1_llm_credentials_put
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LlmCredentialUpsert'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LlmCredentialView'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ delete:
+ tags:
+ - llm
+ summary: Remove the tenant's BYOK LLM credential
+ description: Hard-delete the credential. Platform falls back to env-var config.
+ operationId: delete_llm_credential_api_v1_llm_credentials_delete
+ responses:
+ '204':
+ description: Successful Response
+ security:
+ - HTTPBearer: []
+ /api/v1/threatintel/stix/indicators:
+ get:
+ tags:
+ - Threat Intelligence
+ summary: List Indicators
+ description: List STIX 2.1 indicators from the threat intelligence store.
+ operationId: list_indicators_api_v1_threatintel_stix_indicators_get
+ parameters:
+ - name: page
+ in: query
+ required: false
+ schema:
+ type: integer
+ minimum: 1
+ default: 1
+ title: Page
+ - name: page_size
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 200
+ minimum: 1
+ default: 25
+ title: Page Size
+ - name: label
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Label
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IndicatorListResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - Threat Intelligence
+ summary: Create Indicator
+ description: Publish a new STIX 2.1 indicator.
+ operationId: create_indicator_api_v1_threatintel_stix_indicators_post
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/STIXIndicatorCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/STIXIndicator'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/threatintel/stix/bundles:
+ get:
+ tags:
+ - Threat Intelligence
+ summary: List Bundles
+ description: List STIX 2.1 bundles.
+ operationId: list_bundles_api_v1_threatintel_stix_bundles_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BundleListResponse'
+ post:
+ tags:
+ - Threat Intelligence
+ summary: Create Bundle
+ description: Create a new STIX 2.1 bundle from a list of STIX objects.
+ operationId: create_bundle_api_v1_threatintel_stix_bundles_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/STIXBundleCreate'
+ required: true
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/STIXBundle'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/threatintel/stix/taxii/collections:
+ get:
+ tags:
+ - Threat Intelligence
+ summary: List Taxii Collections
+ description: List TAXII 2.1 collections for server compatibility.
+ operationId: list_taxii_collections_api_v1_threatintel_stix_taxii_collections_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TAXIICollectionListResponse'
+ /api/v1/shifts:
+ get:
+ tags:
+ - shifts
+ summary: List Shifts
+ description: Return shift summaries, newest first.
+ operationId: list_shifts_api_v1_shifts_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: status
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ description: active | completed
+ title: Status
+ description: active | completed
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 100
+ minimum: 1
+ default: 20
+ title: Limit
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ShiftSummary'
+ title: Response List Shifts Api V1 Shifts Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - shifts
+ summary: Create Shift
+ description: Start a new shift.
+ operationId: create_shift_api_v1_shifts_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ShiftCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ShiftSummary'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/shifts/current:
+ get:
+ tags:
+ - shifts
+ summary: Get Current Shift
+ description: Return the currently active shift.
+ operationId: get_current_shift_api_v1_shifts_current_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ShiftSummary'
+ security:
+ - HTTPBearer: []
+ /api/v1/shifts/{shift_id}/handoff:
+ put:
+ tags:
+ - shifts
+ summary: Add Handoff Notes
+ description: Attach handoff notes to a shift and mark it completed.
+ operationId: add_handoff_notes_api_v1_shifts__shift_id__handoff_put
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: shift_id
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Shift Id
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HandoffNotes'
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ShiftSummary'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/deployment/config:
+ get:
+ tags:
+ - Deployment
+ summary: Get Deployment Config
+ description: Return the current deployment configuration.
+ operationId: get_deployment_config_api_v1_deployment_config_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentConfig'
+ put:
+ tags:
+ - Deployment
+ summary: Update Deployment Config
+ description: Update deployment configuration fields.
+ operationId: update_deployment_config_api_v1_deployment_config_put
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentConfigUpdate'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeploymentConfig'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/deployment/airgap/status:
+ get:
+ tags:
+ - Deployment
+ summary: Get Airgap Status
+ description: 'Check air-gap readiness: local LLM health, offline bundles, sync
+ age.'
+ operationId: get_airgap_status_api_v1_deployment_airgap_status_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AirgapStatus'
+ /api/v1/deployment/airgap/bundle:
+ post:
+ tags:
+ - Deployment
+ summary: Create Airgap Bundle
+ description: Trigger creation of an offline update bundle for air-gapped deployments.
+ operationId: create_airgap_bundle_api_v1_deployment_airgap_bundle_post
+ responses:
+ '202':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BundleJob'
+ /api/v1/fusion/health:
+ get:
+ tags:
+ - fusion
+ summary: Fusion service health
+ operationId: fusion_health_api_v1_fusion_health_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Fusion Health Api V1 Fusion Health Get
+ /api/v1/fusion/metrics:
+ get:
+ tags:
+ - fusion
+ summary: Fusion worker metrics
+ operationId: fusion_metrics_api_v1_fusion_metrics_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Fusion Metrics Api V1 Fusion Metrics Get
+ /api/v1/fusion/ml/status:
+ get:
+ tags:
+ - fusion
+ summary: Fusion ML model status
+ operationId: ml_status_api_v1_fusion_ml_status_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Ml Status Api V1 Fusion Ml Status Get
+ /api/v1/fusion/entity-risk/queue:
+ get:
+ tags:
+ - fusion
+ summary: Top entities by risk score
+ operationId: entity_risk_queue_api_v1_fusion_entity_risk_queue_get
+ parameters:
+ - name: tenant_id
+ in: query
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Tenant Id
+ - name: limit
+ in: query
+ required: false
+ schema:
+ type: integer
+ maximum: 200
+ minimum: 1
+ default: 25
+ title: Limit
+ - name: promoted_only
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: false
+ title: Promoted Only
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response Entity Risk Queue Api V1 Fusion Entity Risk Queue
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/fusion/entity-risk/stats:
+ get:
+ tags:
+ - fusion
+ summary: Entity-risk queue stats
+ operationId: entity_risk_stats_api_v1_fusion_entity_risk_stats_get
+ parameters:
+ - name: tenant_id
+ in: query
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Tenant Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response Entity Risk Stats Api V1 Fusion Entity Risk Stats
+ Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/fusion/entity-risk/{entity_type}/{entity_value}:
+ get:
+ tags:
+ - fusion
+ summary: Entity risk record detail
+ operationId: entity_risk_detail_api_v1_fusion_entity_risk__entity_type___entity_value__get
+ parameters:
+ - name: entity_type
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Entity Type
+ - name: entity_value
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Entity Value
+ - name: tenant_id
+ in: query
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Tenant Id
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties: true
+ title: Response Entity Risk Detail Api V1 Fusion Entity Risk Entity
+ Type Entity Value Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/agents/tools:
+ get:
+ tags:
+ - agents
+ summary: List Agent Tools
+ description: "Return the agent's allowed tool surface for this tenant.\n\nThe\
+ \ pivot is **instance × effective capability**:\n\n1. Pull every enabled connector\
+ \ for the tenant.\n2. For each instance, look up the connector class's declared\n\
+ \ capabilities from the live catalog.\n3. Intersect with the per-instance\
+ \ ``allowed_capabilities`` column\n (``NULL`` = no downscope; ``[]`` = explicit\
+ \ zero verbs; non-empty\n list = exact allowlist).\n4. Emit one ``AgentToolDescriptor``\
+ \ per surviving (instance, capability)\n pair.\n\nResult is sorted deterministically\
+ \ by ``(connector_name, capability)``\nso two consecutive calls return the\
+ \ same ordering — important for\nagent caches keyed off tool list hashes."
+ operationId: list_agent_tools_api_v1_agents_tools_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AgentToolsResponse'
+ security:
+ - HTTPBearer: []
+ /api/v1/inbox/templates:
+ get:
+ tags:
+ - inbox
+ summary: List Templates
+ description: List the vendor templates the operator can mint inbox URLs for.
+ operationId: list_templates_api_v1_inbox_templates_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/InboxTemplateInfo'
+ type: array
+ title: Response List Templates Api V1 Inbox Templates Get
+ security:
+ - HTTPBearer: []
+ /api/v1/inbox/tokens:
+ get:
+ tags:
+ - inbox
+ summary: List Tokens
+ description: 'List the calling tenant''s inbox tokens.
+
+
+ By default revoked rows are filtered — operators rarely want to
+
+ look at expired tokens, and showing them by default makes the
+
+ "rotate token" flow noisy.'
+ operationId: list_tokens_api_v1_inbox_tokens_get
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: include_revoked
+ in: query
+ required: false
+ schema:
+ type: boolean
+ default: false
+ title: Include Revoked
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/InboxTokenListItem'
+ title: Response List Tokens Api V1 Inbox Tokens Get
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ post:
+ tags:
+ - inbox
+ summary: Mint Token
+ description: 'Mint a new inbox token for the calling tenant.
+
+
+ Returns the plaintext token + absolute URL exactly once. Subsequent
+
+ list/get calls return only the fingerprint.'
+ operationId: mint_token_api_v1_inbox_tokens_post
+ security:
+ - HTTPBearer: []
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InboxTokenCreate'
+ responses:
+ '201':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InboxTokenResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/inbox/tokens/{token_fingerprint}/rotate:
+ post:
+ tags:
+ - inbox
+ summary: Rotate Token
+ description: 'Mint a new token with the same template/label/hmac, revoke the
+ old.
+
+
+ The wizard''s "rotate" button calls this when a URL leaks. Old token
+
+ is marked revoked so the ingest service rejects requests for it
+
+ immediately; new plaintext token is returned for the operator to
+
+ paste into the vendor''s webhook config.
+
+
+ We accept the fingerprint (not the full token) in the path so the
+
+ plaintext token never appears in logs / proxy access logs.'
+ operationId: rotate_token_api_v1_inbox_tokens__token_fingerprint__rotate_post
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: token_fingerprint
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Token Fingerprint
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InboxTokenResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/inbox/tokens/{token_fingerprint}:
+ delete:
+ tags:
+ - inbox
+ summary: Revoke Token
+ description: 'Permanently revoke an inbox token without minting a replacement.
+
+
+ The ingest service rejects revoked tokens; we keep the row so the
+
+ UI can still show "this token was revoked at X" in audit views.'
+ operationId: revoke_token_api_v1_inbox_tokens__token_fingerprint__delete
+ security:
+ - HTTPBearer: []
+ parameters:
+ - name: token_fingerprint
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Token Fingerprint
+ responses:
+ '204':
+ description: Successful Response
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/inbox/itsm/{tenant_token}/{connector_instance_id}:
+ post:
+ tags:
+ - inbox-itsm
+ summary: Inbound ITSM webhook (Jira / ServiceNow → AiSOC case)
+ description: 'Receive a Jira / ServiceNow webhook and mirror status onto AiSOC.
+
+
+ Public-facing — the only authenticator is the ``tenant_token`` in the
+
+ URL (and an optional ``X-AiSOC-Signature`` HMAC). Rate limiting and
+
+ DDoS protection are expected to live at the edge (Cloudflare /
+
+ upstream LB), not here — the vendor''s source IPs are stable enough
+
+ that the ops team can configure WAF rules.
+
+
+ Always returns 200 (never 5xx) on the happy path, even when the
+
+ payload doesn''t map to anything actionable. Vendor webhook
+
+ implementations retry forever on non-2xx, and a stale ticket pinging
+
+ a long-deleted case shouldn''t block the rest of the queue. We surface
+
+ "nothing happened" via ``InboundResult.status_changed=False`` and a
+
+ human-readable ``note``.'
+ operationId: inbound_itsm_webhook_api_v1_inbox_itsm__tenant_token___connector_instance_id__post
+ parameters:
+ - name: tenant_token
+ in: path
+ required: true
+ schema:
+ type: string
+ title: Tenant Token
+ - name: connector_instance_id
+ in: path
+ required: true
+ schema:
+ type: string
+ format: uuid
+ title: Connector Instance Id
+ - name: X-AiSOC-Signature
+ in: header
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: X-Aisoc-Signature
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InboundResult'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /api/v1/lake/sql:
+ post:
+ tags:
+ - lake
+ summary: Execute Lake Sql
+ description: "Run a tenant-scoped SELECT against the warm tier.\n\nPipeline:\n\
+ \n1. Rate-limit the tenant.\n2. Rewrite the SQL — adds ``tenant_id`` predicates\
+ \ and clamps\n ``LIMIT``. Errors here are 400 (syntax) or 403 (forbidden).\n\
+ 3. Execute against ClickHouse with the configured timeout +\n resource caps.\
+ \ Errors here are 502 (driver/server error),\n 422 (timeout / memory limit),\
+ \ or 503 (driver not configured).\n4. Audit-log the call. We record the rewriter's\
+ \ view of the\n query (referenced tables, effective row cap) rather than\
+ \ the\n raw SQL, because audit logs are user-facing and we don't want\n\
+ \ to round-trip a malformed or PII-laden SQL string into the\n compliance\
+ \ UI."
+ operationId: execute_lake_sql_api_v1_lake_sql_post
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LakeQueryRequest'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LakeQueryResponse'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: []
+ /api/v1/lake/schema:
+ get:
+ tags:
+ - lake
+ summary: Get Lake Schema
+ description: 'Return column metadata for the lake''s allowlisted tables.
+
+
+ Schema discovery is read-only and never returns row data, so it''s
+
+ safe to grant to roles that should not be allowed to execute
+
+ SELECTs (``viewer`` has ``lake:read_schema`` but not
+
+ ``lake:query``). The response is also tenant-independent —
+
+ everyone sees the same columns — but we still rate-limit and
+
+ audit-log it so noisy clients can''t drum the endpoint into a DoS.'
+ operationId: get_lake_schema_api_v1_lake_schema_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LakeSchemaResponse'
+ security:
+ - HTTPBearer: []
+ /auth/saml/login:
+ get:
+ tags:
+ - auth-saml
+ summary: Saml Login
+ description: Initiate SAML SSO — redirect to IdP.
+ operationId: saml_login_auth_saml_login_get
+ parameters:
+ - name: redirect
+ in: query
+ required: false
+ schema:
+ type: string
+ default: /
+ title: Redirect
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /auth/saml/acs:
+ post:
+ tags:
+ - auth-saml
+ summary: Saml Acs
+ description: Assertion Consumer Service — process IdP POST-back and issue JWT.
+ operationId: saml_acs_auth_saml_acs_post
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ /auth/saml/metadata:
+ get:
+ tags:
+ - auth-saml
+ summary: Saml Metadata
+ description: Return SP SAML metadata XML.
+ operationId: saml_metadata_auth_saml_metadata_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ /auth/saml/logout:
+ get:
+ tags:
+ - auth-saml
+ summary: Saml Logout
+ description: Initiate SAML SLO.
+ operationId: saml_logout_auth_saml_logout_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ /auth/oidc/login:
+ get:
+ tags:
+ - auth-oidc
+ summary: Oidc Login
+ description: Initiate OIDC authorization code flow.
+ operationId: oidc_login_auth_oidc_login_get
+ parameters:
+ - name: redirect
+ in: query
+ required: false
+ schema:
+ type: string
+ default: /
+ title: Redirect
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /auth/oidc/callback:
+ get:
+ tags:
+ - auth-oidc
+ summary: Oidc Callback
+ description: Handle OIDC authorization code callback and issue JWT.
+ operationId: oidc_callback_auth_oidc_callback_get
+ parameters:
+ - name: code
+ in: query
+ required: true
+ schema:
+ type: string
+ title: Code
+ - name: state
+ in: query
+ required: true
+ schema:
+ type: string
+ title: State
+ - name: error
+ in: query
+ required: false
+ schema:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /auth/oidc/userinfo:
+ get:
+ tags:
+ - auth-oidc
+ summary: Oidc Userinfo
+ description: 'Proxy userinfo from upstream OIDC provider using the stored access
+ token.
+
+
+ Requires `Authorization: Bearer <aisoc_jwt>` header — the JWT sub is
+
+ used to look up the upstream token (stub: returns claims from AiSOC JWT).'
+ operationId: oidc_userinfo_auth_oidc_userinfo_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ /auth/oidc/logout:
+ get:
+ tags:
+ - auth-oidc
+ summary: Oidc Logout
+ description: RP-initiated logout — clear cookie and redirect to provider end_session.
+ operationId: oidc_logout_auth_oidc_logout_get
+ parameters:
+ - name: post_logout_redirect_uri
+ in: query
+ required: false
+ schema:
+ type: string
+ default: /
+ title: Post Logout Redirect Uri
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ /graphql:
+ get:
+ tags:
+ - graphql
+ summary: Handle Http Get
+ operationId: handle_http_get_graphql_get
+ responses:
+ '200':
+ description: The GraphiQL integrated development environment.
+ content:
+ application/json:
+ schema: {}
+ '404':
+ description: Not found if GraphiQL or query via GET are not enabled.
+ security:
+ - HTTPBearer: []
+ post:
+ tags:
+ - graphql
+ summary: Handle Http Post
+ operationId: handle_http_post_graphql_post
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ security:
+ - HTTPBearer: []
+ /health:
+ get:
+ tags:
+ - system
+ summary: Health Check
+ description: 'Health check endpoint.
+
+
+ Includes the current air-gap policy snapshot so operators can confirm
+
+ zero-egress mode is engaged on this pod (Tier 3.1).'
+ operationId: health_check_health_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ additionalProperties: true
+ type: object
+ title: Response Health Check Health Get
+ /metrics:
+ get:
+ tags:
+ - system
+ summary: Metrics
+ description: "Prometheus metrics endpoint.\n\nAuth gate:\n\n* If ``settings.METRICS_TOKEN``\
+ \ is set, callers MUST present\n ``Authorization: Bearer <METRICS_TOKEN>``.\
+ \ Comparison uses\n ``hmac.compare_digest`` to avoid timing leaks.\n* If\
+ \ ``METRICS_TOKEN`` is empty, the endpoint is open **only** in a\n development-class\
+ \ environment. In any other environment we refuse\n the scrape with a 401\
+ \ so operators don't accidentally ship an\n unauthenticated metrics endpoint\
+ \ to the open internet."
+ operationId: metrics_metrics_get
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: {}
+ security:
+ - HTTPBearer: []
+components:
+ schemas:
+ ActionCount:
+ properties:
+ action:
+ type: string
+ title: Action
+ count:
+ type: integer
+ title: Count
+ type: object
+ required:
+ - action
+ - count
+ title: ActionCount
+ description: How many of each kind of action SOC operators took.
+ ActionPolicy:
+ properties:
+ action:
+ type: string
+ title: Action
+ blast_radius:
+ type: string
+ title: Blast Radius
+ thresholds:
+ $ref: '#/components/schemas/ThresholdTriple'
+ default_thresholds:
+ $ref: '#/components/schemas/ThresholdTriple'
+ overridden:
+ type: boolean
+ title: Overridden
+ override_source:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Override Source
+ last_updated_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Last Updated At
+ last_updated_by:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Last Updated By
+ last_reason:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Last Reason
+ type: object
+ required:
+ - action
+ - blast_radius
+ - thresholds
+ - default_thresholds
+ - overridden
+ title: ActionPolicy
+ AddAlertsRequest:
+ properties:
+ alert_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ title: Alert Ids
+ type: object
+ required:
+ - alert_ids
+ title: AddAlertsRequest
+ AddCommentRequest:
+ properties:
+ body:
+ type: string
+ minLength: 1
+ title: Body
+ is_system:
+ type: boolean
+ title: Is System
+ default: false
+ type: object
+ required:
+ - body
+ title: AddCommentRequest
+ AddFindingsRequest:
+ properties:
+ findings:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ minItems: 1
+ title: Findings
+ false_positive_rate:
+ anyOf:
+ - type: number
+ maximum: 1.0
+ minimum: 0.0
+ - type: 'null'
+ title: False Positive Rate
+ type: object
+ required:
+ - findings
+ title: AddFindingsRequest
+ AgentToolDescriptor:
+ properties:
+ name:
+ type: string
+ title: Name
+ description: Stable unique identifier for this tool, formatted as '<connector_instance_id>.<capability>'.
+ The connector_instance_id rather than connector_type so multiple instances
+ of the same connector — e.g. two CrowdStrike tenants — are addressable.
+ connector_id:
+ type: string
+ title: Connector Id
+ description: Connector instance UUID.
+ connector_type:
+ type: string
+ title: Connector Type
+ description: Catalog connector type, e.g. 'crowdstrike'.
+ connector_name:
+ type: string
+ title: Connector Name
+ description: Operator-chosen instance display name (e.g. 'CrowdStrike —
+ prod').
+ category:
+ type: string
+ title: Category
+ description: Catalog category, e.g. 'edr', 'siem', 'iam'.
+ capability:
+ type: string
+ title: Capability
+ description: The capability verb (one of the values from the Capability
+ enum, e.g. 'pull_alerts', 'query_logs', 'isolate_host').
+ capability_group:
+ type: string
+ title: Capability Group
+ description: Coarse grouping derived from CAPABILITY_GROUPS in services/connectors.
+ Lets an agent pre-filter by intent — e.g. only consider 'CONTAIN' verbs
+ when deciding to quarantine a host.
+ description:
+ type: string
+ title: Description
+ description: Human-readable summary of the verb, surfaced in tool prompts.
+ input_schema:
+ additionalProperties: true
+ type: object
+ title: Input Schema
+ description: JSON-Schema for the verb's arguments. Empty by default; concrete
+ connectors will fill this in as the per-capability call surface stabilises
+ in subsequent workstreams.
+ type: object
+ required:
+ - name
+ - connector_id
+ - connector_type
+ - connector_name
+ - category
+ - capability
+ - capability_group
+ - description
+ title: AgentToolDescriptor
+ description: "One callable verb on one connector instance, as the agent sees\
+ \ it.\n\nThe descriptor is intentionally LLM-friendly:\n\n* ``name`` is unique\
+ \ per tenant (``{connector_id}.{capability}``) and\n stable across redeploys,\
+ \ so an agent's tool-choice memory still\n resolves after a redeployment.\n\
+ * ``description`` is human-readable and pulled from the connector\n class\
+ \ so updates ship with the connector code, not the agent.\n* ``input_schema``\
+ \ follows JSON-Schema conventions so most agent\n frameworks (LangChain,\
+ \ LangGraph, MCP) can drop it in unchanged."
+ AgentToolsResponse:
+ properties:
+ tools:
+ items:
+ $ref: '#/components/schemas/AgentToolDescriptor'
+ type: array
+ title: Tools
+ tool_count:
+ type: integer
+ title: Tool Count
+ connector_count:
+ type: integer
+ title: Connector Count
+ type: object
+ required:
+ - tools
+ - tool_count
+ - connector_count
+ title: AgentToolsResponse
+ description: Tenant-wide tool catalogue surfaced to the agent layer.
+ AirgapStatus:
+ properties:
+ ready:
+ type: boolean
+ title: Ready
+ local_llm_status:
+ type: string
+ title: Local Llm Status
+ local_llm_model:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Local Llm Model
+ offline_bundle_version:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Offline Bundle Version
+ last_sync:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Last Sync
+ detection_rules_count:
+ type: integer
+ title: Detection Rules Count
+ threat_intel_age_hours:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Threat Intel Age Hours
+ checks:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Checks
+ type: object
+ required:
+ - ready
+ - local_llm_status
+ - local_llm_model
+ - offline_bundle_version
+ - last_sync
+ - detection_rules_count
+ - threat_intel_age_hours
+ - checks
+ title: AirgapStatus
+ AlertLinkCreate:
+ properties:
+ alert_id:
+ type: string
+ format: uuid
+ title: Alert Id
+ node_id:
+ type: string
+ format: uuid
+ title: Node Id
+ link_reason:
+ type: string
+ title: Link Reason
+ confidence:
+ type: number
+ title: Confidence
+ default: 1.0
+ type: object
+ required:
+ - alert_id
+ - node_id
+ - link_reason
+ title: AlertLinkCreate
+ AlertLinkOut:
+ properties:
+ alert_id:
+ type: string
+ format: uuid
+ title: Alert Id
+ node_id:
+ type: string
+ format: uuid
+ title: Node Id
+ link_reason:
+ type: string
+ title: Link Reason
+ confidence:
+ type: number
+ title: Confidence
+ default: 1.0
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - alert_id
+ - node_id
+ - link_reason
+ - id
+ - tenant_id
+ - created_at
+ title: AlertLinkOut
+ AlertListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/AlertResponse'
+ type: array
+ title: Items
+ total:
+ type: integer
+ title: Total
+ page:
+ type: integer
+ title: Page
+ page_size:
+ type: integer
+ title: Page Size
+ pages:
+ type: integer
+ title: Pages
+ type: object
+ required:
+ - items
+ - total
+ - page
+ - page_size
+ - pages
+ title: AlertListResponse
+ AlertMetrics:
+ properties:
+ total:
+ type: integer
+ title: Total
+ new:
+ type: integer
+ title: New
+ critical:
+ type: integer
+ title: Critical
+ high:
+ type: integer
+ title: High
+ medium:
+ type: integer
+ title: Medium
+ low:
+ type: integer
+ title: Low
+ resolvedToday:
+ type: integer
+ title: Resolvedtoday
+ mttr:
+ type: number
+ title: Mttr
+ type: object
+ required:
+ - total
+ - new
+ - critical
+ - high
+ - medium
+ - low
+ - resolvedToday
+ - mttr
+ title: AlertMetrics
+ AlertOverrideRequest:
+ properties:
+ alert_id:
+ type: string
+ title: Alert Id
+ original_verdict:
+ type: string
+ title: Original Verdict
+ description: The AI-generated verdict being overridden
+ corrected_verdict:
+ type: string
+ title: Corrected Verdict
+ description: 'Analyst''s verdict: true_positive | false_positive | benign
+ | escalate'
+ reason:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Reason
+ description: Optional free-text justification
+ type: object
+ required:
+ - alert_id
+ - original_verdict
+ - corrected_verdict
+ title: AlertOverrideRequest
+ AlertOverrideResponse:
+ properties:
+ alert_id:
+ type: string
+ title: Alert Id
+ corrected_verdict:
+ type: string
+ title: Corrected Verdict
+ recorded_at:
+ type: string
+ title: Recorded At
+ memory_key:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Memory Key
+ redisposition_candidates:
+ items:
+ $ref: '#/components/schemas/RedispositionCandidateModel'
+ type: array
+ title: Redisposition Candidates
+ type: object
+ required:
+ - alert_id
+ - corrected_verdict
+ - recorded_at
+ title: AlertOverrideResponse
+ AlertResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ title:
+ type: string
+ title: Title
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ severity:
+ type: string
+ title: Severity
+ status:
+ type: string
+ title: Status
+ priority:
+ type: integer
+ title: Priority
+ category:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ mitre_tactics:
+ items: {}
+ type: array
+ title: Mitre Tactics
+ mitre_techniques:
+ items: {}
+ type: array
+ title: Mitre Techniques
+ connector_type:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Connector Type
+ ai_score:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Ai Score
+ ai_summary:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Ai Summary
+ ai_recommendations:
+ items: {}
+ type: array
+ title: Ai Recommendations
+ disposition:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Disposition
+ affected_ips:
+ items: {}
+ type: array
+ title: Affected Ips
+ affected_hosts:
+ items: {}
+ type: array
+ title: Affected Hosts
+ affected_users:
+ items: {}
+ type: array
+ title: Affected Users
+ case_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Case Id
+ tags:
+ items: {}
+ type: array
+ title: Tags
+ event_time:
+ type: string
+ format: date-time
+ title: Event Time
+ first_seen:
+ type: string
+ format: date-time
+ title: First Seen
+ last_seen:
+ type: string
+ format: date-time
+ title: Last Seen
+ snoozed_until:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Snoozed Until
+ snoozed_by_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Snoozed By Id
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - title
+ - description
+ - severity
+ - status
+ - priority
+ - category
+ - mitre_tactics
+ - mitre_techniques
+ - connector_type
+ - ai_score
+ - ai_summary
+ - ai_recommendations
+ - affected_ips
+ - affected_hosts
+ - affected_users
+ - case_id
+ - tags
+ - event_time
+ - first_seen
+ - last_seen
+ - created_at
+ - updated_at
+ title: AlertResponse
+ AlertSnoozeRequest:
+ properties:
+ duration_minutes:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Duration Minutes
+ until:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Until
+ reason:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Reason
+ type: object
+ title: AlertSnoozeRequest
+ description: Snooze an alert from the mobile responder PWA.
+ AlertStatsResponse:
+ properties:
+ total:
+ type: integer
+ title: Total
+ by_severity:
+ additionalProperties:
+ type: integer
+ type: object
+ title: By Severity
+ by_status:
+ additionalProperties:
+ type: integer
+ type: object
+ title: By Status
+ new_last_24h:
+ type: integer
+ title: New Last 24H
+ critical_open:
+ type: integer
+ title: Critical Open
+ type: object
+ required:
+ - total
+ - by_severity
+ - by_status
+ - new_last_24h
+ - critical_open
+ title: AlertStatsResponse
+ AlertUpdateRequest:
+ properties:
+ status:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ priority:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Priority
+ tags:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Tags
+ assigned_to_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Assigned To Id
+ case_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Case Id
+ type: object
+ title: AlertUpdateRequest
+ ApiKeyOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ name:
+ type: string
+ title: Name
+ prefix:
+ type: string
+ title: Prefix
+ scopes:
+ items:
+ type: string
+ type: array
+ title: Scopes
+ is_active:
+ type: boolean
+ title: Is Active
+ expires_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Expires At
+ last_used_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Used At
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - id
+ - name
+ - prefix
+ - scopes
+ - is_active
+ - expires_at
+ - last_used_at
+ - created_at
+ title: ApiKeyOut
+ ApprovalCreateRequest:
+ properties:
+ run_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Run Id
+ case_id:
+ anyOf:
+ - type: string
+ maxLength: 200
+ - type: 'null'
+ title: Case Id
+ alert_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Alert Id
+ requested_by:
+ type: string
+ maxLength: 120
+ title: Requested By
+ default: agent
+ required_user_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Required User Id
+ required_topic:
+ anyOf:
+ - type: string
+ maxLength: 80
+ - type: 'null'
+ title: Required Topic
+ title:
+ type: string
+ maxLength: 200
+ minLength: 1
+ title: Title
+ summary:
+ type: string
+ minLength: 1
+ title: Summary
+ risk_level:
+ type: string
+ enum:
+ - low
+ - medium
+ - high
+ - critical
+ title: Risk Level
+ default: medium
+ action:
+ additionalProperties: true
+ type: object
+ title: Action
+ expires_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Expires At
+ type: object
+ required:
+ - title
+ - summary
+ title: ApprovalCreateRequest
+ ApprovalDecisionRequest:
+ properties:
+ decision:
+ type: string
+ enum:
+ - approve
+ - deny
+ title: Decision
+ comment:
+ anyOf:
+ - type: string
+ maxLength: 2000
+ - type: 'null'
+ title: Comment
+ type: object
+ required:
+ - decision
+ title: ApprovalDecisionRequest
+ ApprovalListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/ApprovalResponse'
+ type: array
+ title: Items
+ total:
+ type: integer
+ title: Total
+ page:
+ type: integer
+ title: Page
+ page_size:
+ type: integer
+ title: Page Size
+ pages:
+ type: integer
+ title: Pages
+ type: object
+ required:
+ - items
+ - total
+ - page
+ - page_size
+ - pages
+ title: ApprovalListResponse
+ ApprovalResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ run_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Run Id
+ case_id:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Case Id
+ alert_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Alert Id
+ requested_by:
+ type: string
+ title: Requested By
+ required_user_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Required User Id
+ required_topic:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Required Topic
+ title:
+ type: string
+ title: Title
+ summary:
+ type: string
+ title: Summary
+ risk_level:
+ type: string
+ title: Risk Level
+ action:
+ additionalProperties: true
+ type: object
+ title: Action
+ status:
+ type: string
+ title: Status
+ decided_by_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Decided By Id
+ decided_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Decided At
+ decision_comment:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Decision Comment
+ expires_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Expires At
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - run_id
+ - case_id
+ - alert_id
+ - requested_by
+ - required_user_id
+ - required_topic
+ - title
+ - summary
+ - risk_level
+ - action
+ - status
+ - decided_by_id
+ - decided_at
+ - decision_comment
+ - expires_at
+ - created_at
+ - updated_at
+ title: ApprovalResponse
+ ArtefactOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ template_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Template Id
+ report_type:
+ type: string
+ title: Report Type
+ title:
+ type: string
+ title: Title
+ period_start:
+ type: string
+ title: Period Start
+ period_end:
+ type: string
+ title: Period End
+ output_format:
+ type: string
+ title: Output Format
+ file_size_bytes:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: File Size Bytes
+ delivered_to:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Delivered To
+ delivered_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Delivered At
+ generated_by:
+ type: string
+ title: Generated By
+ status:
+ type: string
+ title: Status
+ error_message:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error Message
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - template_id
+ - report_type
+ - title
+ - period_start
+ - period_end
+ - output_format
+ - file_size_bytes
+ - delivered_to
+ - delivered_at
+ - generated_by
+ - status
+ - error_message
+ - created_at
+ title: ArtefactOut
+ ArtifactDetail:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ kind:
+ type: string
+ title: Kind
+ sha256:
+ type: string
+ title: Sha256
+ size_bytes:
+ type: integer
+ title: Size Bytes
+ event_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Event Id
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ content:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Content
+ blob_ref:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Blob Ref
+ type: object
+ required:
+ - id
+ - kind
+ - sha256
+ - size_bytes
+ - event_id
+ - created_at
+ - content
+ - blob_ref
+ title: ArtifactDetail
+ ArtifactSummary:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ kind:
+ type: string
+ title: Kind
+ sha256:
+ type: string
+ title: Sha256
+ size_bytes:
+ type: integer
+ title: Size Bytes
+ event_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Event Id
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - id
+ - kind
+ - sha256
+ - size_bytes
+ - event_id
+ - created_at
+ title: ArtifactSummary
+ AssetCreate:
+ properties:
+ asset_type:
+ type: string
+ title: Asset Type
+ default: host
+ name:
+ type: string
+ title: Name
+ fqdn:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Fqdn
+ ip_addresses:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Ip Addresses
+ cloud_provider:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Provider
+ cloud_region:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Region
+ cloud_account:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Account
+ os:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Os
+ os_version:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Os Version
+ criticality:
+ type: string
+ title: Criticality
+ default: medium
+ tags:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Tags
+ owner_email:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Owner Email
+ metadata:
+ additionalProperties: true
+ type: object
+ title: Metadata
+ type: object
+ required:
+ - name
+ title: AssetCreate
+ AssetOut:
+ properties:
+ asset_type:
+ type: string
+ title: Asset Type
+ default: host
+ name:
+ type: string
+ title: Name
+ fqdn:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Fqdn
+ ip_addresses:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Ip Addresses
+ cloud_provider:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Provider
+ cloud_region:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Region
+ cloud_account:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Account
+ os:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Os
+ os_version:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Os Version
+ criticality:
+ type: string
+ title: Criticality
+ default: medium
+ tags:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Tags
+ owner_email:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Owner Email
+ metadata:
+ additionalProperties: true
+ type: object
+ title: Metadata
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ created_at:
+ type: string
+ title: Created At
+ updated_at:
+ type: string
+ title: Updated At
+ last_seen:
+ type: string
+ title: Last Seen
+ first_seen:
+ type: string
+ title: First Seen
+ asset_metadata:
+ additionalProperties: true
+ type: object
+ title: Asset Metadata
+ type: object
+ required:
+ - name
+ - id
+ - tenant_id
+ - created_at
+ - updated_at
+ - last_seen
+ - first_seen
+ title: AssetOut
+ AssetUpdate:
+ properties:
+ asset_type:
+ type: string
+ title: Asset Type
+ default: host
+ name:
+ type: string
+ title: Name
+ fqdn:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Fqdn
+ ip_addresses:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Ip Addresses
+ cloud_provider:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Provider
+ cloud_region:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Region
+ cloud_account:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Account
+ os:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Os
+ os_version:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Os Version
+ criticality:
+ type: string
+ title: Criticality
+ default: medium
+ tags:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Tags
+ owner_email:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Owner Email
+ metadata:
+ additionalProperties: true
+ type: object
+ title: Metadata
+ type: object
+ required:
+ - name
+ title: AssetUpdate
+ AttackHeatmapCell:
+ properties:
+ tactic:
+ type: string
+ title: Tactic
+ technique:
+ type: string
+ title: Technique
+ count:
+ type: integer
+ title: Count
+ type: object
+ required:
+ - tactic
+ - technique
+ - count
+ title: AttackHeatmapCell
+ AttackPathResponse:
+ properties:
+ case_id:
+ type: string
+ title: Case Id
+ nodes:
+ items:
+ $ref: '#/components/schemas/GraphNode'
+ type: array
+ title: Nodes
+ edges:
+ items:
+ $ref: '#/components/schemas/GraphEdge'
+ type: array
+ title: Edges
+ node_count:
+ type: integer
+ title: Node Count
+ edge_count:
+ type: integer
+ title: Edge Count
+ type: object
+ required:
+ - case_id
+ - nodes
+ - edges
+ - node_count
+ - edge_count
+ title: AttackPathResponse
+ AuditEventOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ actor_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Actor Id
+ actor_email:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Actor Email
+ actor_ip:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Actor Ip
+ action:
+ type: string
+ title: Action
+ resource:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Resource
+ resource_id:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Resource Id
+ changes:
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Changes
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - actor_id
+ - actor_email
+ - actor_ip
+ - action
+ - resource
+ - resource_id
+ - changes
+ - created_at
+ title: AuditEventOut
+ AuditListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/AuditEventOut'
+ type: array
+ title: Items
+ total:
+ type: integer
+ title: Total
+ page:
+ type: integer
+ title: Page
+ page_size:
+ type: integer
+ title: Page Size
+ total_pages:
+ type: integer
+ title: Total Pages
+ type: object
+ required:
+ - items
+ - total
+ - page
+ - page_size
+ - total_pages
+ title: AuditListResponse
+ AuthenticateBeginRequest:
+ properties:
+ email:
+ anyOf:
+ - type: string
+ format: email
+ - type: 'null'
+ title: Email
+ type: object
+ title: AuthenticateBeginRequest
+ AuthenticateFinishResponse:
+ properties:
+ access_token:
+ type: string
+ title: Access Token
+ refresh_token:
+ type: string
+ title: Refresh Token
+ token_type:
+ type: string
+ title: Token Type
+ default: bearer
+ expires_in:
+ type: integer
+ title: Expires In
+ default: 1800
+ type: object
+ required:
+ - access_token
+ - refresh_token
+ title: AuthenticateFinishResponse
+ AutonomyPolicyResponse:
+ properties:
+ tenant_id:
+ type: string
+ title: Tenant Id
+ actions:
+ items:
+ $ref: '#/components/schemas/ActionPolicy'
+ type: array
+ title: Actions
+ type: object
+ required:
+ - tenant_id
+ - actions
+ title: AutonomyPolicyResponse
+ BaselineResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Tenant Id
+ suite:
+ type: string
+ title: Suite
+ score:
+ type: number
+ title: Score
+ payload:
+ additionalProperties: true
+ type: object
+ title: Payload
+ is_active:
+ type: boolean
+ title: Is Active
+ recorded_by_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Recorded By Id
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - suite
+ - score
+ - payload
+ - is_active
+ - recorded_by_id
+ - created_at
+ title: BaselineResponse
+ BlastRadiusResponse:
+ properties:
+ entity_id:
+ type: string
+ title: Entity Id
+ entity_type:
+ type: string
+ title: Entity Type
+ hops:
+ type: integer
+ title: Hops
+ affected_nodes:
+ items:
+ $ref: '#/components/schemas/GraphNode'
+ type: array
+ title: Affected Nodes
+ total_affected:
+ type: integer
+ title: Total Affected
+ type_breakdown:
+ additionalProperties:
+ type: integer
+ type: object
+ title: Type Breakdown
+ blast_radius_score:
+ type: number
+ title: Blast Radius Score
+ type: object
+ required:
+ - entity_id
+ - entity_type
+ - hops
+ - affected_nodes
+ - total_affected
+ - type_breakdown
+ - blast_radius_score
+ title: BlastRadiusResponse
+ BuildTimelineRequest:
+ properties:
+ identity_kind:
+ type: string
+ enum:
+ - user
+ - device
+ - service_account
+ - ip
+ title: Identity Kind
+ description: Type of identity anchor.
+ identity_value:
+ type: string
+ minLength: 1
+ title: Identity Value
+ description: Identity value (e.g. username, hostname).
+ from_ts:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: From Ts
+ description: Start of window (defaults to 72 h ago).
+ to_ts:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: To Ts
+ description: End of window (defaults to now).
+ max_events:
+ type: integer
+ maximum: 2000.0
+ minimum: 1.0
+ title: Max Events
+ default: 200
+ type: object
+ required:
+ - identity_kind
+ - identity_value
+ title: BuildTimelineRequest
+ BulkToggleBody:
+ properties:
+ ruleIds:
+ items:
+ type: string
+ type: array
+ minItems: 1
+ title: Ruleids
+ enabled:
+ type: boolean
+ title: Enabled
+ type: object
+ required:
+ - enabled
+ title: BulkToggleBody
+ description: 'Bulk enable/disable payload from the analyst console.
+
+
+ ``ruleIds`` are accepted as plain strings so the frontend can pass the
+
+ same IDs it already renders from ``GET /rules`` without parsing UUIDs.'
+ BulkToggleResponse:
+ properties:
+ updated:
+ type: integer
+ title: Updated
+ skipped:
+ items:
+ type: string
+ type: array
+ title: Skipped
+ type: object
+ required:
+ - updated
+ - skipped
+ title: BulkToggleResponse
+ BundleJob:
+ properties:
+ job_id:
+ type: string
+ title: Job Id
+ status:
+ type: string
+ title: Status
+ created_at:
+ type: string
+ title: Created At
+ estimated_size_mb:
+ type: integer
+ title: Estimated Size Mb
+ includes:
+ items:
+ type: string
+ type: array
+ title: Includes
+ type: object
+ required:
+ - job_id
+ - status
+ - created_at
+ - estimated_size_mb
+ - includes
+ title: BundleJob
+ BundleListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/STIXBundle'
+ type: array
+ title: Items
+ total:
+ type: integer
+ title: Total
+ type: object
+ required:
+ - items
+ - total
+ title: BundleListResponse
+ ByokSavings:
+ properties:
+ is_byok_active:
+ type: boolean
+ title: Is Byok Active
+ provider:
+ type: string
+ title: Provider
+ recorded_cost_usd:
+ type: number
+ title: Recorded Cost Usd
+ imputed_public_cost_usd:
+ type: number
+ title: Imputed Public Cost Usd
+ savings_usd:
+ type: number
+ title: Savings Usd
+ type: object
+ required:
+ - is_byok_active
+ - provider
+ - recorded_cost_usd
+ - imputed_public_cost_usd
+ - savings_usd
+ title: ByokSavings
+ description: 'Imputed savings vs hosted pricing.
+
+
+ ``is_byok_active`` is True when the live LLM provider (per
+
+ ``/llm/status``) is loopback or private — i.e. the operator is
+
+ actually running their own model. When False, the savings are still
+
+ computed (so the UI can show "if you switched to BYOK, you''d save
+
+ ~X") but should be labelled "potential savings" in the UI.'
+ CalibrationBucket:
+ properties:
+ predicted_lower:
+ type: number
+ title: Predicted Lower
+ predicted_upper:
+ type: number
+ title: Predicted Upper
+ sample_count:
+ type: integer
+ title: Sample Count
+ actual_tp_rate:
+ type: number
+ title: Actual Tp Rate
+ type: object
+ required:
+ - predicted_lower
+ - predicted_upper
+ - sample_count
+ - actual_tp_rate
+ title: CalibrationBucket
+ description: 'One bucket of the agent confidence reliability curve.
+
+
+ `predicted_lower` and `predicted_upper` define the AI-confidence range
+
+ (e.g., 0.8–1.0). `actual_tp_rate` is the observed true-positive rate
+
+ among analyst-dispositioned alerts whose ai_score landed in that bucket
+
+ — i.e., the empirical hit-rate the model claimed.'
+ CaseMetrics:
+ properties:
+ open:
+ type: integer
+ title: Open
+ inProgress:
+ type: integer
+ title: Inprogress
+ resolvedThisWeek:
+ type: integer
+ title: Resolvedthisweek
+ type: object
+ required:
+ - open
+ - inProgress
+ - resolvedThisWeek
+ title: CaseMetrics
+ CaseResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ case_number:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Case Number
+ title:
+ type: string
+ title: Title
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ severity:
+ type: string
+ title: Severity
+ status:
+ type: string
+ title: Status
+ assignee:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Assignee
+ mitre_techniques:
+ items:
+ type: string
+ type: array
+ title: Mitre Techniques
+ alert_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ title: Alert Ids
+ observable_graph:
+ additionalProperties: true
+ type: object
+ title: Observable Graph
+ evidence_chain:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Evidence Chain
+ compliance_frameworks:
+ items:
+ type: string
+ type: array
+ title: Compliance Frameworks
+ opened_at:
+ type: string
+ format: date-time
+ title: Opened At
+ triaged_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Triaged At
+ resolved_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Resolved At
+ closed_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Closed At
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ created_by:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Created By
+ tags:
+ additionalProperties: true
+ type: object
+ title: Tags
+ sla_due_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Sla Due At
+ fanout_results:
+ anyOf:
+ - items:
+ $ref: '#/components/schemas/FanoutResult'
+ type: array
+ - type: 'null'
+ title: Fanout Results
+ type: object
+ required:
+ - id
+ - title
+ - description
+ - severity
+ - status
+ - assignee
+ - mitre_techniques
+ - alert_ids
+ - observable_graph
+ - evidence_chain
+ - compliance_frameworks
+ - opened_at
+ - triaged_at
+ - resolved_at
+ - closed_at
+ - created_at
+ - updated_at
+ - created_by
+ - tags
+ - sla_due_at
+ title: CaseResponse
+ ChildTenantOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ name:
+ type: string
+ title: Name
+ mssp_role:
+ type: string
+ title: Mssp Role
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - id
+ - name
+ - mssp_role
+ - created_at
+ title: ChildTenantOut
+ CloseRequest:
+ properties:
+ analyst_note:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Analyst Note
+ type: object
+ title: CloseRequest
+ description: Optional analyst note appended to the auto-generated summary.
+ ClosedSummary:
+ properties:
+ run_id:
+ type: string
+ format: uuid
+ title: Run Id
+ status:
+ type: string
+ title: Status
+ artifact_id:
+ type: string
+ format: uuid
+ title: Artifact Id
+ summary_markdown:
+ type: string
+ title: Summary Markdown
+ type: object
+ required:
+ - run_id
+ - status
+ - artifact_id
+ - summary_markdown
+ title: ClosedSummary
+ description: Response body for POST /close.
+ CollectEvidenceRequest:
+ properties:
+ framework:
+ type: string
+ title: Framework
+ description: Compliance framework key e.g. 'SOC2'.
+ control_id:
+ type: string
+ title: Control Id
+ description: Control identifier e.g. 'CC7.2'.
+ control_title:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Control Title
+ evidence_kind:
+ type: string
+ enum:
+ - alert
+ - log
+ - screenshot
+ - attestation
+ - policy
+ - runbook
+ - other
+ title: Evidence Kind
+ default: alert
+ summary:
+ type: string
+ minLength: 5
+ title: Summary
+ raw_payload:
+ additionalProperties: true
+ type: object
+ title: Raw Payload
+ case_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Case Id
+ type: object
+ required:
+ - framework
+ - control_id
+ - summary
+ title: CollectEvidenceRequest
+ CollectJobRequest:
+ properties:
+ framework:
+ type: string
+ title: Framework
+ description: Compliance framework key e.g. 'SOC2'.
+ scope:
+ type: string
+ title: Scope
+ description: 'Collection scope: ''full'' or ''delta''.'
+ default: full
+ type: object
+ required:
+ - framework
+ title: CollectJobRequest
+ CollectJobResponse:
+ properties:
+ job_id:
+ type: string
+ format: uuid
+ title: Job Id
+ framework:
+ type: string
+ title: Framework
+ scope:
+ type: string
+ title: Scope
+ status:
+ type: string
+ title: Status
+ queued_at:
+ type: string
+ format: date-time
+ title: Queued At
+ type: object
+ required:
+ - job_id
+ - framework
+ - scope
+ - status
+ - queued_at
+ title: CollectJobResponse
+ CommentResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ case_id:
+ type: string
+ format: uuid
+ title: Case Id
+ author:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Author
+ body:
+ type: string
+ title: Body
+ is_system:
+ type: boolean
+ title: Is System
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - id
+ - case_id
+ - author
+ - body
+ - is_system
+ - created_at
+ title: CommentResponse
+ CommunityPluginListOut:
+ properties:
+ total:
+ type: integer
+ title: Total
+ items:
+ items:
+ $ref: '#/components/schemas/CommunityPluginOut'
+ type: array
+ title: Items
+ type: object
+ required:
+ - total
+ - items
+ title: CommunityPluginListOut
+ CommunityPluginOut:
+ properties:
+ id:
+ type: string
+ title: Id
+ name:
+ type: string
+ title: Name
+ version:
+ type: string
+ title: Version
+ plugin_type:
+ type: string
+ title: Plugin Type
+ description:
+ type: string
+ title: Description
+ author:
+ type: string
+ title: Author
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ default: []
+ status:
+ $ref: '#/components/schemas/PublishStatus'
+ default: pending
+ install_count:
+ type: integer
+ title: Install Count
+ default: 0
+ rating:
+ type: number
+ title: Rating
+ default: 0.0
+ rating_count:
+ type: integer
+ title: Rating Count
+ default: 0
+ verified:
+ type: boolean
+ title: Verified
+ default: false
+ submitted_at:
+ type: string
+ title: Submitted At
+ approved_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Approved At
+ type: object
+ required:
+ - id
+ - name
+ - version
+ - plugin_type
+ - description
+ - author
+ - submitted_at
+ title: CommunityPluginOut
+ CompliancePosture:
+ properties:
+ framework:
+ type: string
+ title: Framework
+ total_evidence:
+ type: integer
+ title: Total Evidence
+ accepted:
+ type: integer
+ title: Accepted
+ pending:
+ type: integer
+ title: Pending
+ rejected:
+ type: integer
+ title: Rejected
+ coverage_pct:
+ type: number
+ title: Coverage Pct
+ controls_covered:
+ items:
+ type: string
+ type: array
+ title: Controls Covered
+ controls_missing:
+ items:
+ type: string
+ type: array
+ title: Controls Missing
+ generated_at:
+ type: string
+ format: date-time
+ title: Generated At
+ type: object
+ required:
+ - framework
+ - total_evidence
+ - accepted
+ - pending
+ - rejected
+ - coverage_pct
+ - controls_covered
+ - controls_missing
+ - generated_at
+ title: CompliancePosture
+ ConfidenceBucket:
+ properties:
+ label:
+ type: string
+ title: Label
+ floor:
+ type: integer
+ title: Floor
+ ceil:
+ type: integer
+ title: Ceil
+ count:
+ type: integer
+ title: Count
+ activeCount:
+ type: integer
+ title: Activecount
+ type: object
+ required:
+ - label
+ - floor
+ - ceil
+ - count
+ - activeCount
+ title: ConfidenceBucket
+ description: 'One column in the confidence histogram.
+
+
+ ``label`` is the human-friendly bucket label rendered on the x-axis
+
+ ("0–25", "26–50", …). ``floor`` / ``ceil`` are inclusive bounds so the
+
+ UI can highlight the bucket a particular rule falls into without
+
+ re-parsing the label.'
+ ConfidenceResponse:
+ properties:
+ summary:
+ $ref: '#/components/schemas/ConfidenceSummary'
+ buckets:
+ items:
+ $ref: '#/components/schemas/ConfidenceBucket'
+ type: array
+ title: Buckets
+ tactics:
+ items:
+ $ref: '#/components/schemas/TacticConfidence'
+ type: array
+ title: Tactics
+ lowest:
+ items:
+ $ref: '#/components/schemas/ConfidenceRuleEntry'
+ type: array
+ title: Lowest
+ highest:
+ items:
+ $ref: '#/components/schemas/ConfidenceRuleEntry'
+ type: array
+ title: Highest
+ generatedAt:
+ type: string
+ title: Generatedat
+ type: object
+ required:
+ - summary
+ - buckets
+ - tactics
+ - lowest
+ - highest
+ - generatedAt
+ title: ConfidenceResponse
+ ConfidenceRuleEntry:
+ properties:
+ ruleId:
+ type: string
+ title: Ruleid
+ name:
+ type: string
+ title: Name
+ severity:
+ type: string
+ title: Severity
+ enabled:
+ type: boolean
+ title: Enabled
+ confidence:
+ type: integer
+ title: Confidence
+ fpRate:
+ type: number
+ title: Fprate
+ primaryTactic:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Primarytactic
+ type: object
+ required:
+ - ruleId
+ - name
+ - severity
+ - enabled
+ - confidence
+ - fpRate
+ title: ConfidenceRuleEntry
+ description: A rule highlighted in the worst/best lists.
+ ConfidenceSummary:
+ properties:
+ totalRules:
+ type: integer
+ title: Totalrules
+ activeRules:
+ type: integer
+ title: Activerules
+ avgConfidence:
+ type: number
+ title: Avgconfidence
+ avgConfidenceActive:
+ type: number
+ title: Avgconfidenceactive
+ medianConfidence:
+ type: integer
+ title: Medianconfidence
+ lowConfidence:
+ type: integer
+ title: Lowconfidence
+ type: object
+ required:
+ - totalRules
+ - activeRules
+ - avgConfidence
+ - avgConfidenceActive
+ - medianConfidence
+ - lowConfidence
+ title: ConfidenceSummary
+ ConnectorHealthSummary:
+ properties:
+ total:
+ type: integer
+ title: Total
+ healthy:
+ type: integer
+ title: Healthy
+ unhealthy:
+ type: integer
+ title: Unhealthy
+ unknown:
+ type: integer
+ title: Unknown
+ drifted:
+ type: integer
+ title: Drifted
+ drifted_recently:
+ type: integer
+ title: Drifted Recently
+ last_drift_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Drift At
+ total_events_ingested:
+ type: integer
+ title: Total Events Ingested
+ total_events_dropped:
+ type: integer
+ title: Total Events Dropped
+ type: object
+ required:
+ - total
+ - healthy
+ - unhealthy
+ - unknown
+ - drifted
+ - drifted_recently
+ - last_drift_at
+ - total_events_ingested
+ - total_events_dropped
+ title: ConnectorHealthSummary
+ description: 'Tenant-wide rollup of connector health for the dashboard.
+
+
+ The web console shows a small "Connector Health" tile at the top
+
+ of the Connectors page; this endpoint feeds that tile so the UI
+
+ can render it without iterating the full list client-side.'
+ ConnectorResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ name:
+ type: string
+ title: Name
+ connector_type:
+ type: string
+ title: Connector Type
+ category:
+ type: string
+ title: Category
+ is_enabled:
+ type: boolean
+ title: Is Enabled
+ connector_config:
+ additionalProperties: true
+ type: object
+ title: Connector Config
+ health_status:
+ type: string
+ title: Health Status
+ last_health_check:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Health Check
+ last_sync:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Sync
+ events_ingested:
+ type: integer
+ title: Events Ingested
+ events_dropped:
+ type: integer
+ title: Events Dropped
+ default: 0
+ error_count:
+ type: integer
+ title: Error Count
+ schema_fingerprint:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Schema Fingerprint
+ last_schema_drift_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Schema Drift At
+ last_drift_details:
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Last Drift Details
+ last_event_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Event At
+ last_event_kind:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Last Event Kind
+ oauth_provisioned:
+ type: boolean
+ title: Oauth Provisioned
+ default: false
+ allowed_capabilities:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Allowed Capabilities
+ freshness:
+ anyOf:
+ - $ref: '#/components/schemas/FreshnessSLOResponse'
+ - type: 'null'
+ tags:
+ items: {}
+ type: array
+ title: Tags
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - name
+ - connector_type
+ - category
+ - is_enabled
+ - connector_config
+ - health_status
+ - last_health_check
+ - last_sync
+ - events_ingested
+ - error_count
+ - tags
+ - created_at
+ - updated_at
+ title: ConnectorResponse
+ description: 'Public projection of a ``Connector`` row.
+
+
+ ``auth_config`` is intentionally **omitted**. Even decrypted credentials
+
+ should never round-trip back to the wizard — the user typed them once
+
+ and they belong inside the vault from then on. Wizard-driven re-edit
+
+ flows reset specific secret fields rather than reading the existing
+
+ ones.
+
+
+ ``connector_config`` *is* included because it holds non-secret runtime
+
+ knobs (poll interval, region, log filters) that the wizard surfaces
+
+ so an operator can tweak them without re-pasting credentials.'
+ ControlItem:
+ properties:
+ control_id:
+ type: string
+ title: Control Id
+ title:
+ type: string
+ title: Title
+ type: object
+ required:
+ - control_id
+ - title
+ title: ControlItem
+ ControlsResponse:
+ properties:
+ framework_id:
+ type: string
+ title: Framework Id
+ controls:
+ items:
+ $ref: '#/components/schemas/ControlItem'
+ type: array
+ title: Controls
+ type: object
+ required:
+ - framework_id
+ - controls
+ title: ControlsResponse
+ CostAggregateResponse:
+ properties:
+ window_days:
+ type: integer
+ title: Window Days
+ by_model:
+ items:
+ $ref: '#/components/schemas/CostAggregateRow'
+ type: array
+ title: By Model
+ totals:
+ anyOf:
+ - $ref: '#/components/schemas/CostAggregateRow'
+ - type: 'null'
+ type: object
+ required:
+ - window_days
+ - by_model
+ - totals
+ title: CostAggregateResponse
+ CostAggregateRow:
+ properties:
+ model:
+ type: string
+ title: Model
+ runs:
+ type: integer
+ title: Runs
+ calls:
+ type: integer
+ title: Calls
+ total_prompt_tokens:
+ type: integer
+ title: Total Prompt Tokens
+ total_completion_tokens:
+ type: integer
+ title: Total Completion Tokens
+ total_cost_usd:
+ type: number
+ title: Total Cost Usd
+ total_latency_ms:
+ type: integer
+ title: Total Latency Ms
+ avg_cost_per_run:
+ type: number
+ title: Avg Cost Per Run
+ avg_latency_per_call_ms:
+ type: number
+ title: Avg Latency Per Call Ms
+ type: object
+ required:
+ - model
+ - runs
+ - calls
+ - total_prompt_tokens
+ - total_completion_tokens
+ - total_cost_usd
+ - total_latency_ms
+ - avg_cost_per_run
+ - avg_latency_per_call_ms
+ title: CostAggregateRow
+ description: Aggregate spend grouped by model across runs.
+ CostBucket:
+ properties:
+ day:
+ type: string
+ format: date
+ title: Day
+ total_cost_usd:
+ type: number
+ title: Total Cost Usd
+ total_tokens:
+ type: integer
+ title: Total Tokens
+ call_count:
+ type: integer
+ title: Call Count
+ type: object
+ required:
+ - day
+ - total_cost_usd
+ - total_tokens
+ - call_count
+ title: CostBucket
+ description: LLM spend bucketed by day.
+ CostDashboard:
+ properties:
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ period:
+ $ref: '#/components/schemas/DashboardPeriod'
+ headline:
+ $ref: '#/components/schemas/CostHeadline'
+ daily_costs:
+ items:
+ $ref: '#/components/schemas/CostBucket'
+ type: array
+ title: Daily Costs
+ by_model:
+ items:
+ $ref: '#/components/schemas/ModelBreakdown'
+ type: array
+ title: By Model
+ top_cases:
+ items:
+ $ref: '#/components/schemas/TopCostCase'
+ type: array
+ title: Top Cases
+ action_counts:
+ items:
+ $ref: '#/components/schemas/ActionCount'
+ type: array
+ title: Action Counts
+ byok_savings:
+ $ref: '#/components/schemas/ByokSavings'
+ type: object
+ required:
+ - tenant_id
+ - period
+ - headline
+ - byok_savings
+ title: CostDashboard
+ description: Top-level deterministic snapshot.
+ CostHeadline:
+ properties:
+ total_cost_usd:
+ type: number
+ title: Total Cost Usd
+ total_tokens:
+ type: integer
+ title: Total Tokens
+ total_calls:
+ type: integer
+ title: Total Calls
+ total_runs:
+ type: integer
+ title: Total Runs
+ avg_cost_per_run_usd:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Avg Cost Per Run Usd
+ type: object
+ required:
+ - total_cost_usd
+ - total_tokens
+ - total_calls
+ - total_runs
+ - avg_cost_per_run_usd
+ title: CostHeadline
+ CoverageCell:
+ properties:
+ techniqueId:
+ type: string
+ title: Techniqueid
+ tactic:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Tactic
+ techniqueName:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Techniquename
+ totalRules:
+ type: integer
+ title: Totalrules
+ activeRules:
+ type: integer
+ title: Activerules
+ inactiveRules:
+ type: integer
+ title: Inactiverules
+ type: object
+ required:
+ - techniqueId
+ - totalRules
+ - activeRules
+ - inactiveRules
+ title: CoverageCell
+ description: 'One technique cell in the rule-centric MITRE coverage heatmap.
+
+
+ ``intensity`` is a 0-1 ratio that the heatmap uses to pick a color
+
+ bucket; it''s max(activeRules, 1) / max-active-in-grid normalized
+
+ client-side so we don''t have to know the global max here.'
+ CoverageResponse:
+ properties:
+ tactics:
+ items:
+ type: string
+ type: array
+ title: Tactics
+ cells:
+ items:
+ $ref: '#/components/schemas/CoverageCell'
+ type: array
+ title: Cells
+ summary:
+ $ref: '#/components/schemas/CoverageSummary'
+ generatedAt:
+ type: string
+ title: Generatedat
+ type: object
+ required:
+ - tactics
+ - cells
+ - summary
+ - generatedAt
+ title: CoverageResponse
+ CoverageSummary:
+ properties:
+ totalRules:
+ type: integer
+ title: Totalrules
+ activeRules:
+ type: integer
+ title: Activerules
+ inactiveRules:
+ type: integer
+ title: Inactiverules
+ techniques:
+ type: integer
+ title: Techniques
+ coveredTechniques:
+ type: integer
+ title: Coveredtechniques
+ type: object
+ required:
+ - totalRules
+ - activeRules
+ - inactiveRules
+ - techniques
+ - coveredTechniques
+ title: CoverageSummary
+ CreateApiKeyRequest:
+ properties:
+ name:
+ type: string
+ maxLength: 255
+ minLength: 1
+ title: Name
+ description: Human-readable name
+ scopes:
+ items:
+ type: string
+ type: array
+ title: Scopes
+ description: Permission scopes granted to this key
+ expires_in_days:
+ anyOf:
+ - type: integer
+ maximum: 3650.0
+ minimum: 1.0
+ - type: 'null'
+ title: Expires In Days
+ description: TTL in days; None = never expires
+ type: object
+ required:
+ - name
+ title: CreateApiKeyRequest
+ CreateApiKeyResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ name:
+ type: string
+ title: Name
+ key:
+ type: string
+ title: Key
+ description: Raw API key — shown ONCE, store securely
+ prefix:
+ type: string
+ title: Prefix
+ scopes:
+ items:
+ type: string
+ type: array
+ title: Scopes
+ expires_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Expires At
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - id
+ - name
+ - key
+ - prefix
+ - scopes
+ - expires_at
+ - created_at
+ title: CreateApiKeyResponse
+ CreateBaselineRequest:
+ properties:
+ suite:
+ type: string
+ maxLength: 64
+ title: Suite
+ score:
+ type: number
+ title: Score
+ payload:
+ additionalProperties: true
+ type: object
+ title: Payload
+ type: object
+ required:
+ - suite
+ - score
+ title: CreateBaselineRequest
+ CreateBody:
+ properties:
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ language:
+ type: string
+ title: Language
+ body:
+ type: string
+ title: Body
+ enabled:
+ type: boolean
+ title: Enabled
+ default: true
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ mitre:
+ items:
+ type: string
+ type: array
+ title: Mitre
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ category:
+ type: string
+ title: Category
+ default: custom
+ type: object
+ required:
+ - name
+ - language
+ - body
+ title: CreateBody
+ CreateCaseRequest:
+ properties:
+ title:
+ type: string
+ minLength: 3
+ title: Title
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ severity:
+ type: string
+ enum:
+ - info
+ - low
+ - medium
+ - high
+ - critical
+ title: Severity
+ default: medium
+ assignee:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Assignee
+ alert_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ title: Alert Ids
+ mitre_techniques:
+ items:
+ type: string
+ type: array
+ title: Mitre Techniques
+ compliance_frameworks:
+ items:
+ type: string
+ type: array
+ title: Compliance Frameworks
+ tags:
+ additionalProperties:
+ type: string
+ type: object
+ title: Tags
+ sla_due_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Sla Due At
+ push_to_connector_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ title: Push To Connector Ids
+ type: object
+ required:
+ - title
+ title: CreateCaseRequest
+ CreateConnectorRequest:
+ properties:
+ name:
+ type: string
+ maxLength: 255
+ minLength: 1
+ title: Name
+ connector_type:
+ type: string
+ maxLength: 100
+ minLength: 1
+ title: Connector Type
+ category:
+ anyOf:
+ - type: string
+ maxLength: 50
+ - type: 'null'
+ title: Category
+ description: Optional override; defaults to the catalog entry's category.
+ auth_config:
+ additionalProperties: true
+ type: object
+ title: Auth Config
+ connector_config:
+ additionalProperties: true
+ type: object
+ title: Connector Config
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ type: object
+ required:
+ - name
+ - connector_type
+ title: CreateConnectorRequest
+ CreateHuntRequest:
+ properties:
+ title:
+ type: string
+ minLength: 3
+ title: Title
+ hypothesis:
+ type: string
+ minLength: 10
+ title: Hypothesis
+ description: Plain-English threat hypothesis.
+ mitre_tactic:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Mitre Tactic
+ mitre_technique:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Mitre Technique
+ priority:
+ type: string
+ enum:
+ - low
+ - medium
+ - high
+ - critical
+ title: Priority
+ default: medium
+ assigned_to:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Assigned To
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ type: object
+ required:
+ - title
+ - hypothesis
+ title: CreateHuntRequest
+ CreateProposalRequest:
+ properties:
+ name:
+ type: string
+ maxLength: 255
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ rule_language:
+ type: string
+ maxLength: 30
+ title: Rule Language
+ rule_body:
+ type: string
+ title: Rule Body
+ category:
+ type: string
+ maxLength: 100
+ title: Category
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ confidence:
+ type: integer
+ maximum: 100.0
+ minimum: 0.0
+ title: Confidence
+ default: 50
+ mitre_tactics:
+ items:
+ type: string
+ type: array
+ title: Mitre Tactics
+ mitre_techniques:
+ items:
+ type: string
+ type: array
+ title: Mitre Techniques
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ base_rule_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Base Rule Id
+ type: object
+ required:
+ - name
+ - rule_language
+ - rule_body
+ - category
+ title: CreateProposalRequest
+ CreateRuleRequest:
+ properties:
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ rule_language:
+ type: string
+ title: Rule Language
+ rule_body:
+ type: string
+ title: Rule Body
+ category:
+ type: string
+ title: Category
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ confidence:
+ type: integer
+ title: Confidence
+ default: 50
+ mitre_tactics:
+ items:
+ type: string
+ type: array
+ title: Mitre Tactics
+ default: []
+ mitre_techniques:
+ items:
+ type: string
+ type: array
+ title: Mitre Techniques
+ default: []
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ default: []
+ type: object
+ required:
+ - name
+ - rule_language
+ - rule_body
+ - category
+ title: CreateRuleRequest
+ CreateSavedViewRequest:
+ properties:
+ view_type:
+ type: string
+ title: View Type
+ name:
+ type: string
+ maxLength: 120
+ minLength: 1
+ title: Name
+ filters:
+ additionalProperties: true
+ type: object
+ title: Filters
+ columns:
+ anyOf:
+ - items: {}
+ type: array
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Columns
+ is_default:
+ type: boolean
+ title: Is Default
+ default: false
+ type: object
+ required:
+ - view_type
+ - name
+ title: CreateSavedViewRequest
+ CreateTaskRequest:
+ properties:
+ title:
+ type: string
+ minLength: 1
+ title: Title
+ status:
+ type: string
+ enum:
+ - todo
+ - in_progress
+ - done
+ title: Status
+ default: todo
+ assignee:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Assignee
+ dueAt:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Dueat
+ type: object
+ required:
+ - title
+ title: CreateTaskRequest
+ CreateUserRequest:
+ properties:
+ email:
+ type: string
+ format: email
+ title: Email
+ username:
+ type: string
+ title: Username
+ password:
+ type: string
+ title: Password
+ role:
+ type: string
+ title: Role
+ default: soc_analyst
+ type: object
+ required:
+ - email
+ - username
+ - password
+ title: CreateUserRequest
+ CredentialsListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/PasskeyCredentialOut'
+ type: array
+ title: Items
+ type: object
+ required:
+ - items
+ title: CredentialsListResponse
+ CrossTenantIncident:
+ properties:
+ incident_id:
+ type: string
+ title: Incident Id
+ tenant_name:
+ type: string
+ title: Tenant Name
+ title:
+ type: string
+ title: Title
+ severity:
+ type: string
+ title: Severity
+ status:
+ type: string
+ title: Status
+ created_at:
+ type: string
+ title: Created At
+ assignee:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Assignee
+ type: object
+ required:
+ - incident_id
+ - tenant_name
+ - title
+ - severity
+ - status
+ - created_at
+ title: CrossTenantIncident
+ DashboardMetrics:
+ properties:
+ alerts:
+ $ref: '#/components/schemas/AlertMetrics'
+ cases:
+ $ref: '#/components/schemas/CaseMetrics'
+ sources:
+ items:
+ $ref: '#/components/schemas/SourceStat'
+ type: array
+ title: Sources
+ topMitre:
+ items:
+ $ref: '#/components/schemas/MitreTactic'
+ type: array
+ title: Topmitre
+ alertsTrend:
+ items:
+ $ref: '#/components/schemas/TrendPoint'
+ type: array
+ title: Alertstrend
+ threatsBySource:
+ items:
+ $ref: '#/components/schemas/SourceThreat'
+ type: array
+ title: Threatsbysource
+ type: object
+ required:
+ - alerts
+ - cases
+ - sources
+ - topMitre
+ - alertsTrend
+ - threatsBySource
+ title: DashboardMetrics
+ DashboardPeriod:
+ properties:
+ start:
+ type: string
+ format: date-time
+ title: Start
+ end:
+ type: string
+ format: date-time
+ title: End
+ window_days:
+ type: integer
+ title: Window Days
+ label:
+ type: string
+ title: Label
+ type: object
+ required:
+ - start
+ - end
+ - window_days
+ - label
+ title: DashboardPeriod
+ DecisionRequest:
+ properties:
+ decision:
+ type: string
+ enum:
+ - approve
+ - reject
+ title: Decision
+ comment:
+ anyOf:
+ - type: string
+ maxLength: 2000
+ - type: 'null'
+ title: Comment
+ type: object
+ required:
+ - decision
+ title: DecisionRequest
+ DelegationCreate:
+ properties:
+ child_tenant_id:
+ type: string
+ format: uuid
+ title: Child Tenant Id
+ granted_role:
+ type: string
+ title: Granted Role
+ default: soc_analyst
+ expires_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Expires At
+ type: object
+ required:
+ - child_tenant_id
+ title: DelegationCreate
+ DelegationOut:
+ properties:
+ child_tenant_id:
+ type: string
+ format: uuid
+ title: Child Tenant Id
+ granted_role:
+ type: string
+ title: Granted Role
+ default: soc_analyst
+ expires_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Expires At
+ id:
+ type: string
+ format: uuid
+ title: Id
+ parent_tenant_id:
+ type: string
+ format: uuid
+ title: Parent Tenant Id
+ granted_by_user:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Granted By User
+ revoked_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Revoked At
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - child_tenant_id
+ - id
+ - parent_tenant_id
+ - granted_by_user
+ - revoked_at
+ - created_at
+ title: DelegationOut
+ DeploymentConfig:
+ properties:
+ mode:
+ $ref: '#/components/schemas/DeploymentMode'
+ llm_provider:
+ $ref: '#/components/schemas/LLMProvider'
+ update_channel:
+ $ref: '#/components/schemas/UpdateChannel'
+ telemetry_enabled:
+ type: boolean
+ title: Telemetry Enabled
+ auto_update:
+ type: boolean
+ title: Auto Update
+ last_updated:
+ type: string
+ title: Last Updated
+ type: object
+ required:
+ - mode
+ - llm_provider
+ - update_channel
+ - telemetry_enabled
+ - auto_update
+ - last_updated
+ title: DeploymentConfig
+ DeploymentConfigUpdate:
+ properties:
+ mode:
+ anyOf:
+ - $ref: '#/components/schemas/DeploymentMode'
+ - type: 'null'
+ llm_provider:
+ anyOf:
+ - $ref: '#/components/schemas/LLMProvider'
+ - type: 'null'
+ update_channel:
+ anyOf:
+ - $ref: '#/components/schemas/UpdateChannel'
+ - type: 'null'
+ telemetry_enabled:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Telemetry Enabled
+ auto_update:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Auto Update
+ type: object
+ title: DeploymentConfigUpdate
+ DeploymentMode:
+ type: string
+ enum:
+ - cloud
+ - hybrid
+ - airgap
+ title: DeploymentMode
+ DetectionRuleResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Tenant Id
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ rule_language:
+ type: string
+ title: Rule Language
+ rule_body:
+ type: string
+ title: Rule Body
+ category:
+ type: string
+ title: Category
+ status:
+ type: string
+ title: Status
+ severity:
+ type: string
+ title: Severity
+ confidence:
+ type: integer
+ title: Confidence
+ mitre_tactics:
+ items: {}
+ type: array
+ title: Mitre Tactics
+ mitre_techniques:
+ items: {}
+ type: array
+ title: Mitre Techniques
+ fp_rate:
+ type: number
+ title: Fp Rate
+ total_hits:
+ type: integer
+ title: Total Hits
+ last_triggered:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Triggered
+ tags:
+ items: {}
+ type: array
+ title: Tags
+ is_builtin:
+ type: boolean
+ title: Is Builtin
+ version:
+ type: integer
+ title: Version
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - name
+ - description
+ - rule_language
+ - rule_body
+ - category
+ - status
+ - severity
+ - confidence
+ - mitre_tactics
+ - mitre_techniques
+ - fp_rate
+ - total_hits
+ - last_triggered
+ - tags
+ - is_builtin
+ - version
+ - created_at
+ - updated_at
+ title: DetectionRuleResponse
+ DiscoverResponse:
+ properties:
+ discovered:
+ items:
+ type: string
+ type: array
+ title: Discovered
+ type: object
+ required:
+ - discovered
+ title: DiscoverResponse
+ DriftEntry:
+ properties:
+ ruleId:
+ type: string
+ title: Ruleid
+ name:
+ type: string
+ title: Name
+ severity:
+ type: string
+ title: Severity
+ enabled:
+ type: boolean
+ title: Enabled
+ confidence:
+ type: integer
+ title: Confidence
+ fpRate:
+ type: number
+ title: Fprate
+ lastTriggeredAt:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Lasttriggeredat
+ daysSinceTriggered:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Dayssincetriggered
+ issues:
+ items:
+ type: string
+ type: array
+ title: Issues
+ type: object
+ required:
+ - ruleId
+ - name
+ - severity
+ - enabled
+ - confidence
+ - fpRate
+ - issues
+ title: DriftEntry
+ description: 'One rule that has drifted from its tuning baseline.
+
+
+ ``issues`` enumerates *which* heuristics flagged it; the UI renders one
+
+ chip per issue so analysts see the reason without having to read the
+
+ metric values.'
+ DriftResponse:
+ properties:
+ entries:
+ items:
+ $ref: '#/components/schemas/DriftEntry'
+ type: array
+ title: Entries
+ summary:
+ $ref: '#/components/schemas/DriftSummary'
+ generatedAt:
+ type: string
+ title: Generatedat
+ type: object
+ required:
+ - entries
+ - summary
+ - generatedAt
+ title: DriftResponse
+ DriftSummary:
+ properties:
+ total:
+ type: integer
+ title: Total
+ highFpRate:
+ type: integer
+ title: Highfprate
+ lowConfidence:
+ type: integer
+ title: Lowconfidence
+ stale:
+ type: integer
+ title: Stale
+ type: object
+ required:
+ - total
+ - highFpRate
+ - lowConfidence
+ - stale
+ title: DriftSummary
+ EdgeCreate:
+ properties:
+ source_id:
+ type: string
+ format: uuid
+ title: Source Id
+ target_id:
+ type: string
+ format: uuid
+ title: Target Id
+ edge_type:
+ type: string
+ title: Edge Type
+ weight:
+ type: number
+ title: Weight
+ default: 1.0
+ valid_until:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Valid Until
+ evidence:
+ additionalProperties: true
+ type: object
+ title: Evidence
+ type: object
+ required:
+ - source_id
+ - target_id
+ - edge_type
+ title: EdgeCreate
+ EdgeOut:
+ properties:
+ source_id:
+ type: string
+ format: uuid
+ title: Source Id
+ target_id:
+ type: string
+ format: uuid
+ title: Target Id
+ edge_type:
+ type: string
+ title: Edge Type
+ weight:
+ type: number
+ title: Weight
+ default: 1.0
+ valid_until:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Valid Until
+ evidence:
+ additionalProperties: true
+ type: object
+ title: Evidence
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ valid_from:
+ type: string
+ title: Valid From
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - source_id
+ - target_id
+ - edge_type
+ - id
+ - tenant_id
+ - valid_from
+ - created_at
+ title: EdgeOut
+ EffectiveRuleCountOut:
+ properties:
+ total:
+ type: integer
+ title: Total
+ tenant:
+ type: integer
+ title: Tenant
+ builtin:
+ type: integer
+ title: Builtin
+ pack:
+ type: integer
+ title: Pack
+ excluded:
+ type: integer
+ title: Excluded
+ type: object
+ required:
+ - total
+ - tenant
+ - builtin
+ - pack
+ - excluded
+ title: EffectiveRuleCountOut
+ EffectiveRuleOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ name:
+ type: string
+ title: Name
+ rule_language:
+ type: string
+ title: Rule Language
+ severity:
+ type: string
+ title: Severity
+ category:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ status:
+ type: string
+ title: Status
+ is_builtin:
+ type: boolean
+ title: Is Builtin
+ source:
+ type: string
+ title: Source
+ pack_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ title: Pack Ids
+ severity_overridden:
+ type: boolean
+ title: Severity Overridden
+ original_severity:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Original Severity
+ override_note:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Override Note
+ parameter_overrides:
+ additionalProperties: true
+ type: object
+ title: Parameter Overrides
+ type: object
+ required:
+ - id
+ - name
+ - rule_language
+ - severity
+ - category
+ - status
+ - is_builtin
+ - source
+ - pack_ids
+ - severity_overridden
+ - original_severity
+ - override_note
+ - parameter_overrides
+ title: EffectiveRuleOut
+ EntityNeighborsResponse:
+ properties:
+ entity_id:
+ type: string
+ title: Entity Id
+ entity_type:
+ type: string
+ title: Entity Type
+ source:
+ anyOf:
+ - $ref: '#/components/schemas/GraphNode'
+ - type: 'null'
+ neighbors:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Neighbors
+ neighbor_count:
+ type: integer
+ title: Neighbor Count
+ default: 0
+ type: object
+ required:
+ - entity_id
+ - entity_type
+ - source
+ - neighbors
+ title: EntityNeighborsResponse
+ EvalAttachRequest:
+ properties:
+ eval_report:
+ additionalProperties: true
+ type: object
+ title: Eval Report
+ description: Full JSON output of `python3 scripts/run_evals.py --baseline
+ ... --max-regression-pp ...` for the candidate ruleset.
+ max_regression_pp:
+ type: number
+ maximum: 100.0
+ minimum: 0.0
+ title: Max Regression Pp
+ description: Allowed MITRE accuracy regression vs baseline, in pp.
+ default: 1.0
+ type: object
+ required:
+ - eval_report
+ title: EvalAttachRequest
+ description: Attach a `run_evals.py` JSON report to a proposal.
+ EventListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/EventOut'
+ type: array
+ title: Items
+ total:
+ type: integer
+ title: Total
+ since:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Since
+ next_seq:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Next Seq
+ type: object
+ required:
+ - items
+ - total
+ - since
+ - next_seq
+ title: EventListResponse
+ EventOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ run_id:
+ type: string
+ format: uuid
+ title: Run Id
+ seq:
+ type: integer
+ title: Seq
+ ts:
+ type: string
+ format: date-time
+ title: Ts
+ kind:
+ type: string
+ title: Kind
+ agent:
+ type: string
+ title: Agent
+ summary:
+ type: string
+ title: Summary
+ payload:
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Payload
+ input_hash:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Input Hash
+ output_hash:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Output Hash
+ duration_ms:
+ type: integer
+ title: Duration Ms
+ type: object
+ required:
+ - id
+ - run_id
+ - seq
+ - ts
+ - kind
+ - agent
+ - summary
+ - payload
+ - input_hash
+ - output_hash
+ - duration_ms
+ title: EventOut
+ EvidenceReport:
+ properties:
+ case_id:
+ type: string
+ format: uuid
+ title: Case Id
+ title:
+ type: string
+ title: Title
+ severity:
+ type: string
+ title: Severity
+ status:
+ type: string
+ title: Status
+ alert_count:
+ type: integer
+ title: Alert Count
+ mitre_techniques:
+ items:
+ type: string
+ type: array
+ title: Mitre Techniques
+ compliance_frameworks:
+ items:
+ type: string
+ type: array
+ title: Compliance Frameworks
+ evidence_chain:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Evidence Chain
+ generated_at:
+ type: string
+ format: date-time
+ title: Generated At
+ type: object
+ required:
+ - case_id
+ - title
+ - severity
+ - status
+ - alert_count
+ - mitre_techniques
+ - compliance_frameworks
+ - evidence_chain
+ - generated_at
+ title: EvidenceReport
+ EvidenceResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ case_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Case Id
+ framework:
+ type: string
+ title: Framework
+ control_id:
+ type: string
+ title: Control Id
+ control_title:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Control Title
+ evidence_kind:
+ type: string
+ title: Evidence Kind
+ summary:
+ type: string
+ title: Summary
+ raw_payload:
+ additionalProperties: true
+ type: object
+ title: Raw Payload
+ payload_hash:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Payload Hash
+ prev_hash:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Prev Hash
+ collected_at:
+ type: string
+ format: date-time
+ title: Collected At
+ reviewed_by:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Reviewed By
+ reviewed_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Reviewed At
+ status:
+ type: string
+ title: Status
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - id
+ - case_id
+ - framework
+ - control_id
+ - control_title
+ - evidence_kind
+ - summary
+ - raw_payload
+ - payload_hash
+ - prev_hash
+ - collected_at
+ - reviewed_by
+ - reviewed_at
+ - status
+ - created_at
+ title: EvidenceResponse
+ ExecuteRuleRequest:
+ properties:
+ events:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ maxItems: 1000
+ title: Events
+ description: Events to test the rule against
+ type: object
+ required:
+ - events
+ title: ExecuteRuleRequest
+ description: Payload for ad-hoc rule execution.
+ ExecuteRuleResponse:
+ properties:
+ rule_id:
+ type: string
+ title: Rule Id
+ rule_name:
+ type: string
+ title: Rule Name
+ rule_language:
+ type: string
+ title: Rule Language
+ severity:
+ type: string
+ title: Severity
+ matched:
+ type: boolean
+ title: Matched
+ match_count:
+ type: integer
+ title: Match Count
+ matched_events:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Matched Events
+ score:
+ type: number
+ title: Score
+ error:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ execution_time_ms:
+ type: number
+ title: Execution Time Ms
+ type: object
+ required:
+ - rule_id
+ - rule_name
+ - rule_language
+ - severity
+ - matched
+ - match_count
+ - matched_events
+ - score
+ - error
+ - execution_time_ms
+ title: ExecuteRuleResponse
+ ExplainResponse:
+ properties:
+ run:
+ $ref: '#/components/schemas/RunSummary'
+ previous:
+ anyOf:
+ - $ref: '#/components/schemas/EventOut'
+ - type: 'null'
+ focus:
+ $ref: '#/components/schemas/EventOut'
+ next:
+ anyOf:
+ - $ref: '#/components/schemas/EventOut'
+ - type: 'null'
+ artifacts:
+ items:
+ $ref: '#/components/schemas/ArtifactDetail'
+ type: array
+ title: Artifacts
+ type: object
+ required:
+ - run
+ - previous
+ - focus
+ - next
+ - artifacts
+ title: ExplainResponse
+ description: 'Why-did-the-agent-do-this view for a single step.
+
+
+ Includes the focal event plus the immediately preceding event (the
+
+ decision that led into this step) and the immediately following event
+
+ (the decision the agent made afterwards). Artifacts attached to the
+
+ focal event are inlined so the auditor sees the literal LLM transcript.'
+ ExternalAssetType:
+ type: string
+ enum:
+ - domain
+ - subdomain
+ - ip
+ - cert
+ - web_service
+ - api_endpoint
+ title: ExternalAssetType
+ description: Types of externally-discovered assets.
+ FanoutResult:
+ properties:
+ connector_id:
+ type: string
+ format: uuid
+ title: Connector Id
+ connector_type:
+ type: string
+ title: Connector Type
+ connector_name:
+ type: string
+ title: Connector Name
+ status:
+ type: string
+ title: Status
+ description: ok | error | unsupported | skipped
+ external_id:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: External Id
+ external_url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: External Url
+ external_status:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: External Status
+ error:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ type: object
+ required:
+ - connector_id
+ - connector_type
+ - connector_name
+ - status
+ title: FanoutResult
+ description: 'Outcome of one ``push_case`` / ``push_status_change`` call.
+
+
+ Always set so the UI can show "Jira ✓ · ServiceNow ✗ (timeout)"
+
+ next to the case header without needing to re-read the audit log.'
+ FederatedBackend:
+ properties:
+ connector_id:
+ type: string
+ format: uuid
+ title: Connector Id
+ connector_type:
+ type: string
+ title: Connector Type
+ name:
+ type: string
+ title: Name
+ health_status:
+ type: string
+ title: Health Status
+ is_enabled:
+ type: boolean
+ title: Is Enabled
+ type: object
+ required:
+ - connector_id
+ - connector_type
+ - name
+ - health_status
+ - is_enabled
+ title: FederatedBackend
+ description: Read-only projection of a connector instance eligible for fan-out.
+ FederatedBackendsResponse:
+ properties:
+ backends:
+ items:
+ $ref: '#/components/schemas/FederatedBackend'
+ type: array
+ title: Backends
+ type: object
+ required:
+ - backends
+ title: FederatedBackendsResponse
+ FederatedSearchRequest:
+ properties:
+ free_text:
+ type: string
+ maxLength: 2000
+ title: Free Text
+ default: ''
+ indicators:
+ items:
+ $ref: '#/components/schemas/IndicatorPayload'
+ type: array
+ title: Indicators
+ since_seconds:
+ type: integer
+ maximum: 604800.0
+ exclusiveMinimum: 0.0
+ title: Since Seconds
+ default: 3600
+ limit:
+ type: integer
+ maximum: 1000.0
+ exclusiveMinimum: 0.0
+ title: Limit
+ default: 100
+ connector_ids:
+ anyOf:
+ - items:
+ type: string
+ format: uuid
+ type: array
+ - type: 'null'
+ title: Connector Ids
+ per_backend_timeout_seconds:
+ anyOf:
+ - type: number
+ maximum: 120.0
+ exclusiveMinimum: 0.0
+ - type: 'null'
+ title: Per Backend Timeout Seconds
+ type: object
+ title: FederatedSearchRequest
+ description: 'Top-level federated search payload.
+
+
+ ``connector_ids`` lets the caller scope the fan-out to specific
+
+ instances (e.g. "only my prod Splunk, not the staging Sentinel").
+
+ Omit it to query every federated-capable connector the tenant has
+
+ enabled.
+
+
+ ``per_backend_timeout_seconds`` caps how long any one SIEM gets
+
+ before we move on. Default is half the configured connectors-service
+
+ timeout — long enough for a real SIEM round-trip, short enough that
+
+ a single dead backend doesn''t block the merged answer.'
+ FederatedSearchResponse:
+ properties:
+ rows:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Rows
+ row_count:
+ type: integer
+ title: Row Count
+ sources:
+ items:
+ $ref: '#/components/schemas/SourceVerdict'
+ type: array
+ title: Sources
+ truncated:
+ type: boolean
+ title: Truncated
+ description: True when the merged row count was capped at ``limit`` after
+ fan-out.
+ default: false
+ type: object
+ required:
+ - rows
+ - row_count
+ - sources
+ title: FederatedSearchResponse
+ FeedCreate:
+ properties:
+ name:
+ type: string
+ title: Name
+ feed_type:
+ type: string
+ title: Feed Type
+ url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Url
+ api_key_ref:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Api Key Ref
+ poll_interval:
+ type: integer
+ title: Poll Interval
+ default: 3600
+ config:
+ additionalProperties: true
+ type: object
+ title: Config
+ type: object
+ required:
+ - name
+ - feed_type
+ title: FeedCreate
+ FeedOut:
+ properties:
+ name:
+ type: string
+ title: Name
+ feed_type:
+ type: string
+ title: Feed Type
+ url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Url
+ api_key_ref:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Api Key Ref
+ poll_interval:
+ type: integer
+ title: Poll Interval
+ default: 3600
+ config:
+ additionalProperties: true
+ type: object
+ title: Config
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ is_enabled:
+ type: boolean
+ title: Is Enabled
+ last_polled_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Last Polled At
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - name
+ - feed_type
+ - id
+ - tenant_id
+ - is_enabled
+ - created_at
+ title: FeedOut
+ FindingCreate:
+ properties:
+ cloud_provider:
+ type: string
+ title: Cloud Provider
+ cloud_account:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Account
+ cloud_region:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Region
+ resource_type:
+ type: string
+ title: Resource Type
+ resource_id:
+ type: string
+ title: Resource Id
+ resource_name:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Resource Name
+ rule_id:
+ type: string
+ title: Rule Id
+ rule_title:
+ type: string
+ title: Rule Title
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ frameworks:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Frameworks
+ control_ids:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Control Ids
+ evidence:
+ additionalProperties: true
+ type: object
+ title: Evidence
+ remediation_guide:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Remediation Guide
+ type: object
+ required:
+ - cloud_provider
+ - resource_type
+ - resource_id
+ - rule_id
+ - rule_title
+ title: FindingCreate
+ FindingOut:
+ properties:
+ cloud_provider:
+ type: string
+ title: Cloud Provider
+ cloud_account:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Account
+ cloud_region:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Region
+ resource_type:
+ type: string
+ title: Resource Type
+ resource_id:
+ type: string
+ title: Resource Id
+ resource_name:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Resource Name
+ rule_id:
+ type: string
+ title: Rule Id
+ rule_title:
+ type: string
+ title: Rule Title
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ frameworks:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Frameworks
+ control_ids:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Control Ids
+ evidence:
+ additionalProperties: true
+ type: object
+ title: Evidence
+ remediation_guide:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Remediation Guide
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ status:
+ type: string
+ title: Status
+ auto_remediated:
+ type: boolean
+ title: Auto Remediated
+ first_detected_at:
+ type: string
+ title: First Detected At
+ last_evaluated_at:
+ type: string
+ title: Last Evaluated At
+ resolved_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Resolved At
+ type: object
+ required:
+ - cloud_provider
+ - resource_type
+ - resource_id
+ - rule_id
+ - rule_title
+ - id
+ - tenant_id
+ - status
+ - auto_remediated
+ - first_detected_at
+ - last_evaluated_at
+ title: FindingOut
+ FinishRequest:
+ properties:
+ credential:
+ additionalProperties: true
+ type: object
+ title: Credential
+ challenge:
+ type: string
+ maxLength: 512
+ minLength: 8
+ title: Challenge
+ type: object
+ required:
+ - credential
+ - challenge
+ title: FinishRequest
+ FormatsResponse:
+ properties:
+ formats:
+ additionalProperties:
+ type: string
+ type: object
+ title: Formats
+ type: object
+ required:
+ - formats
+ title: FormatsResponse
+ FrameworksResponse:
+ properties:
+ frameworks:
+ additionalProperties:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ title: Frameworks
+ type: object
+ required:
+ - frameworks
+ title: FrameworksResponse
+ FreshnessSLOResponse:
+ properties:
+ status:
+ type: string
+ title: Status
+ expected_cadence_seconds:
+ type: integer
+ title: Expected Cadence Seconds
+ seconds_since_last_event:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Seconds Since Last Event
+ category:
+ type: string
+ title: Category
+ type: object
+ required:
+ - status
+ - expected_cadence_seconds
+ - seconds_since_last_event
+ - category
+ title: FreshnessSLOResponse
+ description: 'Freshness verdict surfaced on every ``ConnectorResponse``.
+
+
+ Driven by ``app.services.connector_freshness.compute_freshness``.
+
+ The UI uses ``status`` to color the badge and ``seconds_since_last_event``
+
+ + ``expected_cadence_seconds`` to render the tooltip ("expected within
+
+ 5 min, last event 12 min ago"). ``category`` is echoed back for
+
+ client-side grouping without re-deriving it.'
+ FrontendDetectionRule:
+ properties:
+ id:
+ type: string
+ title: Id
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ language:
+ type: string
+ title: Language
+ body:
+ type: string
+ title: Body
+ enabled:
+ type: boolean
+ title: Enabled
+ default: true
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ mitre:
+ items:
+ type: string
+ type: array
+ title: Mitre
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ createdAt:
+ type: string
+ title: Createdat
+ updatedAt:
+ type: string
+ title: Updatedat
+ lastTriggeredAt:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Lasttriggeredat
+ hitCount:
+ type: integer
+ title: Hitcount
+ default: 0
+ type: object
+ required:
+ - id
+ - name
+ - language
+ - body
+ - createdAt
+ - updatedAt
+ title: FrontendDetectionRule
+ description: Mirrors `DetectionRule` in apps/web/src/lib/api.ts.
+ GateLogOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ action_id:
+ type: string
+ format: uuid
+ title: Action Id
+ action_type:
+ type: string
+ title: Action Type
+ blast_radius:
+ type: string
+ title: Blast Radius
+ maturity_tier:
+ type: integer
+ title: Maturity Tier
+ decision:
+ type: string
+ title: Decision
+ rationale:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Rationale
+ actor:
+ type: string
+ title: Actor
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - action_id
+ - action_type
+ - blast_radius
+ - maturity_tier
+ - decision
+ - rationale
+ - actor
+ - created_at
+ title: GateLogOut
+ GenerateRequest:
+ properties:
+ title:
+ type: string
+ title: Title
+ report_type:
+ type: string
+ title: Report Type
+ default: board_summary
+ period_start:
+ type: string
+ format: date-time
+ title: Period Start
+ period_end:
+ type: string
+ format: date-time
+ title: Period End
+ output_format:
+ type: string
+ title: Output Format
+ default: pdf
+ recipients:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Recipients
+ type: object
+ required:
+ - title
+ - period_start
+ - period_end
+ title: GenerateRequest
+ GraphEdge:
+ properties:
+ source:
+ type: string
+ title: Source
+ target:
+ type: string
+ title: Target
+ type:
+ type: string
+ title: Type
+ type: object
+ required:
+ - source
+ - target
+ - type
+ title: GraphEdge
+ GraphNode:
+ properties:
+ id:
+ type: string
+ title: Id
+ label:
+ type: string
+ title: Label
+ properties:
+ additionalProperties: true
+ type: object
+ title: Properties
+ type: object
+ required:
+ - id
+ - label
+ title: GraphNode
+ HTTPValidationError:
+ properties:
+ detail:
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ type: array
+ title: Detail
+ type: object
+ title: HTTPValidationError
+ HandoffNotes:
+ properties:
+ notes:
+ type: string
+ minLength: 1
+ title: Notes
+ pending_items:
+ items:
+ type: string
+ type: array
+ title: Pending Items
+ type: object
+ required:
+ - notes
+ title: HandoffNotes
+ HuntPreviewItem:
+ properties:
+ id:
+ type: string
+ title: Id
+ timestamp:
+ type: string
+ title: Timestamp
+ source:
+ type: string
+ title: Source
+ severity:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ fields:
+ additionalProperties: true
+ type: object
+ title: Fields
+ type: object
+ required:
+ - id
+ - timestamp
+ - source
+ title: HuntPreviewItem
+ HuntRequest:
+ properties:
+ rule_ids:
+ anyOf:
+ - items:
+ type: string
+ format: uuid
+ type: array
+ - type: 'null'
+ title: Rule Ids
+ description: Specific rule IDs to hunt with; omit to use all active rules
+ rule_language:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Rule Language
+ description: Filter rules by language (sigma, yara, kql, eql)
+ events:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ maxItems: 5000
+ title: Events
+ description: Events to hunt through
+ type: object
+ required:
+ - events
+ title: HuntRequest
+ description: Payload for threat hunting across events.
+ HuntRunResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ hunt_id:
+ type: string
+ format: uuid
+ title: Hunt Id
+ run_at:
+ type: string
+ format: date-time
+ title: Run At
+ platform:
+ type: string
+ title: Platform
+ query_used:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Query Used
+ hit_count:
+ type: integer
+ title: Hit Count
+ result_sample:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Result Sample
+ duration_ms:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Duration Ms
+ error:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ type: object
+ required:
+ - id
+ - hunt_id
+ - run_at
+ - platform
+ - query_used
+ - hit_count
+ - result_sample
+ - duration_ms
+ - error
+ title: HuntRunResponse
+ IOCCreate:
+ properties:
+ ioc_type:
+ type: string
+ title: Ioc Type
+ value:
+ type: string
+ title: Value
+ confidence:
+ type: integer
+ maximum: 100.0
+ minimum: 0.0
+ title: Confidence
+ default: 50
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ tlp:
+ type: string
+ title: Tlp
+ default: amber
+ threat_actor:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Threat Actor
+ campaign:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Campaign
+ malware_family:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Malware Family
+ tags:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Tags
+ source:
+ type: string
+ title: Source
+ default: internal
+ source_ref:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Source Ref
+ expires_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Expires At
+ linked_alerts:
+ anyOf:
+ - items:
+ type: string
+ format: uuid
+ type: array
+ - type: 'null'
+ title: Linked Alerts
+ context:
+ additionalProperties: true
+ type: object
+ title: Context
+ type: object
+ required:
+ - ioc_type
+ - value
+ title: IOCCreate
+ IOCOut:
+ properties:
+ ioc_type:
+ type: string
+ title: Ioc Type
+ value:
+ type: string
+ title: Value
+ confidence:
+ type: integer
+ maximum: 100.0
+ minimum: 0.0
+ title: Confidence
+ default: 50
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ tlp:
+ type: string
+ title: Tlp
+ default: amber
+ threat_actor:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Threat Actor
+ campaign:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Campaign
+ malware_family:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Malware Family
+ tags:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Tags
+ source:
+ type: string
+ title: Source
+ default: internal
+ source_ref:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Source Ref
+ expires_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Expires At
+ linked_alerts:
+ anyOf:
+ - items:
+ type: string
+ format: uuid
+ type: array
+ - type: 'null'
+ title: Linked Alerts
+ context:
+ additionalProperties: true
+ type: object
+ title: Context
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ is_active:
+ type: boolean
+ title: Is Active
+ false_positive:
+ type: boolean
+ title: False Positive
+ first_seen:
+ type: string
+ title: First Seen
+ last_seen:
+ type: string
+ title: Last Seen
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - ioc_type
+ - value
+ - id
+ - tenant_id
+ - is_active
+ - false_positive
+ - first_seen
+ - last_seen
+ - created_at
+ title: IOCOut
+ IdentityTimeline:
+ properties:
+ timeline_id:
+ type: string
+ format: uuid
+ title: Timeline Id
+ identity_kind:
+ type: string
+ enum:
+ - user
+ - device
+ - service_account
+ - ip
+ title: Identity Kind
+ identity_value:
+ type: string
+ title: Identity Value
+ from_ts:
+ type: string
+ format: date-time
+ title: From Ts
+ to_ts:
+ type: string
+ format: date-time
+ title: To Ts
+ events:
+ items:
+ $ref: '#/components/schemas/app__api__v1__endpoints__identity_timeline__TimelineEvent'
+ type: array
+ title: Events
+ total_events:
+ type: integer
+ title: Total Events
+ risk_score:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Risk Score
+ built_at:
+ type: string
+ format: date-time
+ title: Built At
+ type: object
+ required:
+ - timeline_id
+ - identity_kind
+ - identity_value
+ - from_ts
+ - to_ts
+ - events
+ - total_events
+ - built_at
+ title: IdentityTimeline
+ InboundResult:
+ properties:
+ case_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Case Id
+ case_number:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Case Number
+ external_id:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: External Id
+ old_status:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Old Status
+ new_status:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: New Status
+ status_changed:
+ type: boolean
+ title: Status Changed
+ note:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Note
+ type: object
+ required:
+ - case_id
+ - case_number
+ - external_id
+ - old_status
+ - new_status
+ - status_changed
+ title: InboundResult
+ description: Response body for the inbound webhook.
+ InboxTemplateInfo:
+ properties:
+ template_id:
+ type: string
+ title: Template Id
+ label:
+ type: string
+ title: Label
+ description:
+ type: string
+ title: Description
+ category:
+ type: string
+ title: Category
+ type: object
+ required:
+ - template_id
+ - label
+ - description
+ - category
+ title: InboxTemplateInfo
+ description: Catalog entry for a vendor template the operator can pick.
+ InboxTokenCreate:
+ properties:
+ template_id:
+ type: string
+ title: Template Id
+ description: Vendor template stem from ``services/ingest/internal/normalizer/templates/*.yaml``
+ (e.g. ``pagerduty``, ``generic-json``).
+ label:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Label
+ description: Operator-facing label ("PagerDuty on-call").
+ hmac_secret:
+ anyOf:
+ - type: string
+ maxLength: 512
+ minLength: 16
+ - type: 'null'
+ title: Hmac Secret
+ description: Optional HMAC-SHA256 secret for ``X-Signature`` verification.
+ If provided, the ingest service rejects requests whose signature doesn't
+ match. NULL means the URL token is the only authenticator.
+ type: object
+ required:
+ - template_id
+ title: InboxTokenCreate
+ description: Request body for ``POST /api/v1/inbox/tokens``.
+ InboxTokenListItem:
+ properties:
+ fingerprint:
+ type: string
+ title: Fingerprint
+ template_id:
+ type: string
+ title: Template Id
+ label:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Label
+ has_hmac_secret:
+ type: boolean
+ title: Has Hmac Secret
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ revoked_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Revoked At
+ last_used_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Used At
+ type: object
+ required:
+ - fingerprint
+ - template_id
+ - label
+ - has_hmac_secret
+ - created_at
+ - revoked_at
+ - last_used_at
+ title: InboxTokenListItem
+ description: 'List view: omits the plaintext token.'
+ InboxTokenResponse:
+ properties:
+ token:
+ type: string
+ title: Token
+ inbox_url:
+ type: string
+ title: Inbox Url
+ template_id:
+ type: string
+ title: Template Id
+ label:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Label
+ has_hmac_secret:
+ type: boolean
+ title: Has Hmac Secret
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ revoked_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Revoked At
+ last_used_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Used At
+ type: object
+ required:
+ - token
+ - inbox_url
+ - template_id
+ - label
+ - has_hmac_secret
+ - created_at
+ - revoked_at
+ - last_used_at
+ title: InboxTokenResponse
+ description: 'A single inbox token, including the *plaintext* token + URL.
+
+
+ The token is returned in full **only** at mint time (when the wizard
+
+ needs to show it to the operator). Subsequent list calls return the
+
+ fingerprint instead, which is enough to identify the row but not
+
+ enough to forge inbound traffic.'
+ IndicatorCreate:
+ properties:
+ profile_id:
+ type: string
+ format: uuid
+ title: Profile Id
+ indicator_type:
+ type: string
+ title: Indicator Type
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ description:
+ type: string
+ title: Description
+ source_alert_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Source Alert Id
+ evidence:
+ additionalProperties: true
+ type: object
+ title: Evidence
+ occurred_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Occurred At
+ type: object
+ required:
+ - profile_id
+ - indicator_type
+ - description
+ title: IndicatorCreate
+ IndicatorListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/STIXIndicator'
+ type: array
+ title: Items
+ total:
+ type: integer
+ title: Total
+ type: object
+ required:
+ - items
+ - total
+ title: IndicatorListResponse
+ IndicatorOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ profile_id:
+ type: string
+ format: uuid
+ title: Profile Id
+ indicator_type:
+ type: string
+ title: Indicator Type
+ severity:
+ type: string
+ title: Severity
+ description:
+ type: string
+ title: Description
+ source_alert_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Source Alert Id
+ evidence:
+ additionalProperties: true
+ type: object
+ title: Evidence
+ occurred_at:
+ type: string
+ title: Occurred At
+ acknowledged_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Acknowledged At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - profile_id
+ - indicator_type
+ - severity
+ - description
+ - source_alert_id
+ - evidence
+ - occurred_at
+ - acknowledged_at
+ title: IndicatorOut
+ IndicatorPayload:
+ properties:
+ field:
+ type: string
+ maxLength: 200
+ minLength: 1
+ title: Field
+ operator:
+ type: string
+ maxLength: 20
+ minLength: 1
+ title: Operator
+ value:
+ title: Value
+ type: object
+ required:
+ - field
+ - operator
+ - value
+ title: IndicatorPayload
+ description: 'One ``field <op> value`` triple in a federated query.
+
+
+ Mirrors ``services.connectors.app.federated.query.Indicator`` but
+
+ expressed as Pydantic so FastAPI can render OpenAPI for the wizard
+
+ + the SDK. The connectors microservice re-validates with
+
+ ``parse_unified_query`` before any translator runs, so this model
+
+ is intentionally permissive on ``value``.'
+ IngestRequest:
+ properties:
+ title:
+ type: string
+ minLength: 2
+ title: Title
+ content:
+ type: string
+ minLength: 10
+ title: Content
+ doc_kind:
+ type: string
+ enum:
+ - runbook
+ - policy
+ - playbook
+ - sop
+ - wiki
+ - other
+ title: Doc Kind
+ default: runbook
+ source_url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Source Url
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ type: object
+ required:
+ - title
+ - content
+ title: IngestRequest
+ IngestTokenResponse:
+ properties:
+ connector_id:
+ type: string
+ format: uuid
+ title: Connector Id
+ ingest_token:
+ type: string
+ title: Ingest Token
+ inbox_url:
+ type: string
+ title: Inbox Url
+ type: object
+ required:
+ - connector_id
+ - ingest_token
+ - inbox_url
+ title: IngestTokenResponse
+ description: Push-token response. ``inbox_url`` is the absolute endpoint.
+ InstallRequest:
+ properties:
+ type:
+ type: string
+ enum:
+ - detection
+ - playbook
+ - plugin
+ title: Type
+ id:
+ type: string
+ maxLength: 200
+ minLength: 1
+ title: Id
+ type: object
+ required:
+ - type
+ - id
+ title: InstallRequest
+ InstallResponse:
+ properties:
+ id:
+ type: string
+ title: Id
+ type:
+ type: string
+ title: Type
+ name:
+ type: string
+ title: Name
+ version:
+ type: string
+ title: Version
+ content_sha256:
+ type: string
+ title: Content Sha256
+ installed_at:
+ type: string
+ title: Installed At
+ installed_by:
+ type: string
+ title: Installed By
+ already_installed:
+ type: boolean
+ title: Already Installed
+ default: false
+ type: object
+ required:
+ - id
+ - type
+ - name
+ - version
+ - content_sha256
+ - installed_at
+ - installed_by
+ title: InstallResponse
+ InvestigateRequest:
+ properties:
+ alert_summary:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Alert Summary
+ default: ''
+ type: object
+ title: InvestigateRequest
+ KBChunk:
+ properties:
+ doc_id:
+ type: string
+ format: uuid
+ title: Doc Id
+ title:
+ type: string
+ title: Title
+ chunk_index:
+ type: integer
+ title: Chunk Index
+ content:
+ type: string
+ title: Content
+ score:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Score
+ type: object
+ required:
+ - doc_id
+ - title
+ - chunk_index
+ - content
+ title: KBChunk
+ KBDocResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ title:
+ type: string
+ title: Title
+ doc_kind:
+ type: string
+ title: Doc Kind
+ source_url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Source Url
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ chunk_index:
+ type: integer
+ title: Chunk Index
+ chunk_total:
+ type: integer
+ title: Chunk Total
+ content_preview:
+ type: string
+ title: Content Preview
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ created_by:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Created By
+ type: object
+ required:
+ - id
+ - title
+ - doc_kind
+ - source_url
+ - tags
+ - chunk_index
+ - chunk_total
+ - content_preview
+ - created_at
+ - created_by
+ title: KBDocResponse
+ KpiBarTargetsOut:
+ properties:
+ false_positive_rate_max_pct:
+ type: number
+ maximum: 100.0
+ minimum: 0.0
+ title: False Positive Rate Max Pct
+ alert_to_incident_ratio_min:
+ type: number
+ minimum: 1.0
+ title: Alert To Incident Ratio Min
+ mitre_technique_tagging_min_pct:
+ type: number
+ maximum: 100.0
+ minimum: 0.0
+ title: Mitre Technique Tagging Min Pct
+ mitre_subtechnique_tagging_min_pct:
+ type: number
+ maximum: 100.0
+ minimum: 0.0
+ title: Mitre Subtechnique Tagging Min Pct
+ type: object
+ required:
+ - false_positive_rate_max_pct
+ - alert_to_incident_ratio_min
+ - mitre_technique_tagging_min_pct
+ - mitre_subtechnique_tagging_min_pct
+ title: KpiBarTargetsOut
+ KpiBarTargetsUpdate:
+ properties:
+ false_positive_rate_max_pct:
+ anyOf:
+ - type: number
+ maximum: 100.0
+ minimum: 0.0
+ - type: 'null'
+ title: False Positive Rate Max Pct
+ alert_to_incident_ratio_min:
+ anyOf:
+ - type: number
+ minimum: 1.0
+ - type: 'null'
+ title: Alert To Incident Ratio Min
+ mitre_technique_tagging_min_pct:
+ anyOf:
+ - type: number
+ maximum: 100.0
+ minimum: 0.0
+ - type: 'null'
+ title: Mitre Technique Tagging Min Pct
+ mitre_subtechnique_tagging_min_pct:
+ anyOf:
+ - type: number
+ maximum: 100.0
+ minimum: 0.0
+ - type: 'null'
+ title: Mitre Subtechnique Tagging Min Pct
+ type: object
+ title: KpiBarTargetsUpdate
+ LLMProvider:
+ type: string
+ enum:
+ - openai
+ - anthropic
+ - local-ollama
+ - local-vllm
+ - azure-openai
+ - none
+ title: LLMProvider
+ LakeColumnInfo:
+ properties:
+ name:
+ type: string
+ title: Name
+ type:
+ type: string
+ title: Type
+ comment:
+ type: string
+ title: Comment
+ default: ''
+ type: object
+ required:
+ - name
+ - type
+ title: LakeColumnInfo
+ description: One column within a lake table.
+ LakeQueryRequest:
+ properties:
+ sql:
+ type: string
+ maxLength: 200000
+ minLength: 1
+ title: Sql
+ description: 'SELECT query to run against the warm tier. The server enforces
+ a single-statement, allowlisted-tables-only policy and injects ``tenant_id``
+ predicates before execution. Use ``GET /api/v1/lake/schema`` to discover
+ available tables and columns. Allowed tables: aisoc.alert_metrics, aisoc.ioc_enrichments,
+ aisoc.raw_events.'
+ row_cap:
+ anyOf:
+ - type: integer
+ maximum: 100000.0
+ minimum: 1.0
+ - type: 'null'
+ title: Row Cap
+ description: Optional ``LIMIT`` clamp; defaults to 10000, hard-capped at
+ 100000.
+ timeout_seconds:
+ anyOf:
+ - type: number
+ maximum: 60.0
+ exclusiveMinimum: 0.0
+ - type: 'null'
+ title: Timeout Seconds
+ description: Optional wall-clock cap. Defaults to the server cap (30s).
+ Useful for agent loops that need to fail fast.
+ type: object
+ required:
+ - sql
+ title: LakeQueryRequest
+ description: 'Request body for ``POST /api/v1/lake/sql``.
+
+
+ Only ``sql`` is required. ``row_cap`` lets an operator request a
+
+ smaller-than-default result set (e.g. for paginated UIs); the
+
+ rewriter clamps to :data:`MAX_ROW_CAP` regardless. ``timeout_seconds``
+
+ likewise lets the caller fail fast — useful for agent loops where a
+
+ 30-second hang would compound into a wall-clock budget overrun.'
+ LakeQueryResponse:
+ properties:
+ columns:
+ items:
+ type: string
+ type: array
+ title: Columns
+ rows:
+ items:
+ items: {}
+ type: array
+ type: array
+ title: Rows
+ row_count:
+ type: integer
+ title: Row Count
+ row_cap:
+ type: integer
+ title: Row Cap
+ referenced_tables:
+ items:
+ type: string
+ type: array
+ title: Referenced Tables
+ elapsed_ms:
+ type: integer
+ title: Elapsed Ms
+ executed_at:
+ type: string
+ format: date-time
+ title: Executed At
+ type: object
+ required:
+ - columns
+ - rows
+ - row_count
+ - row_cap
+ - referenced_tables
+ - elapsed_ms
+ - executed_at
+ title: LakeQueryResponse
+ description: 'Response body for ``POST /api/v1/lake/sql``.
+
+
+ ``referenced_tables`` is the set of allowlisted tables the
+
+ rewriter actually touched — it''s surfaced for clients that want
+
+ to flag "you queried raw_events" in a UI without re-parsing the
+
+ SQL themselves.'
+ LakeSchemaResponse:
+ properties:
+ tables:
+ items:
+ $ref: '#/components/schemas/LakeTableInfo'
+ type: array
+ title: Tables
+ type: object
+ required:
+ - tables
+ title: LakeSchemaResponse
+ description: 'Response body for ``GET /api/v1/lake/schema``.
+
+
+ Wraps the table list in an envelope so we can extend the response
+
+ later (e.g. with retention info or row-count estimates) without a
+
+ breaking change.'
+ LakeTableInfo:
+ properties:
+ table:
+ type: string
+ title: Table
+ columns:
+ items:
+ $ref: '#/components/schemas/LakeColumnInfo'
+ type: array
+ title: Columns
+ type: object
+ required:
+ - table
+ - columns
+ title: LakeTableInfo
+ description: One allowlisted lake table, with its columns.
+ LastEventResponse:
+ properties:
+ connector_id:
+ type: string
+ format: uuid
+ title: Connector Id
+ last_event_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Event At
+ last_event_kind:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Last Event Kind
+ events_ingested:
+ type: integer
+ title: Events Ingested
+ last_sync:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Sync
+ health_status:
+ type: string
+ title: Health Status
+ data_flowing:
+ type: boolean
+ title: Data Flowing
+ type: object
+ required:
+ - connector_id
+ - last_event_at
+ - last_event_kind
+ - events_ingested
+ - last_sync
+ - health_status
+ - data_flowing
+ title: LastEventResponse
+ description: 'Lightweight payload for the verify-data-flowing screen.
+
+
+ The onboarding flow polls this every few seconds while waiting for
+
+ the first event to land. Keeping the shape minimal avoids paying
+
+ the full ``ConnectorResponse`` cost on every poll tick.'
+ ListResponse:
+ properties:
+ rules:
+ items:
+ $ref: '#/components/schemas/FrontendDetectionRule'
+ type: array
+ title: Rules
+ total:
+ type: integer
+ title: Total
+ type: object
+ required:
+ - rules
+ - total
+ title: ListResponse
+ LlmCredentialUpsert:
+ properties:
+ provider:
+ type: string
+ enum:
+ - openai
+ - anthropic
+ - azure-openai
+ - local-ollama
+ - local-vllm
+ - local-litellm
+ - custom
+ title: Provider
+ base_url:
+ anyOf:
+ - type: string
+ maxLength: 512
+ - type: 'null'
+ title: Base Url
+ model:
+ anyOf:
+ - type: string
+ maxLength: 120
+ - type: 'null'
+ title: Model
+ api_key:
+ anyOf:
+ - type: string
+ maxLength: 4096
+ - type: 'null'
+ title: Api Key
+ settings:
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Settings
+ enabled:
+ type: boolean
+ title: Enabled
+ default: true
+ type: object
+ required:
+ - provider
+ title: LlmCredentialUpsert
+ description: 'Payload for ``PUT /api/v1/llm/credentials``.
+
+
+ ``api_key`` is intentionally optional. Sending ``null`` (or omitting
+
+ it) on an *existing* row keeps the stored ciphertext untouched — that
+
+ lets operators flip ``enabled``, swap ``model``, or change the
+
+ ``base_url`` without re-typing a 100-character secret. On a *new*
+
+ row, ``api_key`` is required when the chosen provider mandates one
+
+ (we surface a 422 in that case rather than silently storing NULL).'
+ LlmCredentialView:
+ properties:
+ provider:
+ type: string
+ enum:
+ - openai
+ - anthropic
+ - azure-openai
+ - local-ollama
+ - local-vllm
+ - local-litellm
+ - custom
+ title: Provider
+ base_url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Base Url
+ model:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Model
+ has_api_key:
+ type: boolean
+ title: Has Api Key
+ settings:
+ additionalProperties: true
+ type: object
+ title: Settings
+ enabled:
+ type: boolean
+ title: Enabled
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ last_rotated_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Rotated At
+ type: object
+ required:
+ - provider
+ - base_url
+ - model
+ - has_api_key
+ - settings
+ - enabled
+ - created_at
+ - updated_at
+ - last_rotated_at
+ title: LlmCredentialView
+ description: 'Read-only projection of :class:`TenantLlmCredential`.
+
+
+ The plaintext key is intentionally absent. ``has_api_key`` is the
+
+ only signal we expose — same convention the OAuth credential view
+
+ uses (``has_secret``).'
+ LoginRequest:
+ properties:
+ email:
+ type: string
+ format: email
+ title: Email
+ password:
+ type: string
+ title: Password
+ type: object
+ required:
+ - email
+ - password
+ title: LoginRequest
+ MSSPKpiOverview:
+ properties:
+ total_tenants:
+ type: integer
+ title: Total Tenants
+ total_open_alerts:
+ type: integer
+ title: Total Open Alerts
+ total_critical_incidents:
+ type: integer
+ title: Total Critical Incidents
+ avg_health_score:
+ type: number
+ title: Avg Health Score
+ avg_mttr_minutes:
+ type: number
+ title: Avg Mttr Minutes
+ sla_breach_count:
+ type: integer
+ title: Sla Breach Count
+ connectors_online:
+ type: integer
+ title: Connectors Online
+ connectors_degraded:
+ type: integer
+ title: Connectors Degraded
+ type: object
+ required:
+ - total_tenants
+ - total_open_alerts
+ - total_critical_incidents
+ - avg_health_score
+ - avg_mttr_minutes
+ - sla_breach_count
+ - connectors_online
+ - connectors_degraded
+ title: MSSPKpiOverview
+ ManagedTenantRow:
+ properties:
+ tenant_id:
+ type: string
+ title: Tenant Id
+ name:
+ type: string
+ title: Name
+ health_score:
+ type: number
+ title: Health Score
+ open_alerts:
+ type: integer
+ title: Open Alerts
+ critical_alerts:
+ type: integer
+ title: Critical Alerts
+ sla_breaches:
+ type: integer
+ title: Sla Breaches
+ connector_status:
+ type: string
+ title: Connector Status
+ last_event_at:
+ type: string
+ title: Last Event At
+ type: object
+ required:
+ - tenant_id
+ - name
+ - health_score
+ - open_alerts
+ - critical_alerts
+ - sla_breaches
+ - connector_status
+ - last_event_at
+ title: ManagedTenantRow
+ MarketplaceItemSummary:
+ properties:
+ id:
+ type: string
+ title: Id
+ type:
+ type: string
+ title: Type
+ name:
+ type: string
+ title: Name
+ description:
+ type: string
+ title: Description
+ default: ''
+ version:
+ type: string
+ title: Version
+ default: 1.0.0
+ severity:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ category:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ source:
+ type: string
+ title: Source
+ default: core
+ verified:
+ type: boolean
+ title: Verified
+ default: false
+ sdks:
+ items:
+ type: string
+ type: array
+ title: Sdks
+ default: []
+ mitre_techniques:
+ items:
+ type: string
+ type: array
+ title: Mitre Techniques
+ default: []
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ default: []
+ type: object
+ required:
+ - id
+ - type
+ - name
+ title: MarketplaceItemSummary
+ MarketplaceListResponse:
+ properties:
+ total:
+ type: integer
+ title: Total
+ stats:
+ additionalProperties: true
+ type: object
+ title: Stats
+ mitre_coverage:
+ additionalProperties: true
+ type: object
+ title: Mitre Coverage
+ items:
+ items:
+ $ref: '#/components/schemas/MarketplaceItemSummary'
+ type: array
+ title: Items
+ installed_ids:
+ items:
+ type: string
+ type: array
+ title: Installed Ids
+ type: object
+ required:
+ - total
+ - stats
+ - mitre_coverage
+ - items
+ - installed_ids
+ title: MarketplaceListResponse
+ MaturityConfig:
+ properties:
+ maturity_tier:
+ type: integer
+ maximum: 4.0
+ minimum: 0.0
+ title: Maturity Tier
+ action_overrides:
+ additionalProperties: true
+ type: object
+ title: Action Overrides
+ type: object
+ required:
+ - maturity_tier
+ title: MaturityConfig
+ MaturityOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ maturity_tier:
+ type: integer
+ title: Maturity Tier
+ action_overrides:
+ additionalProperties: true
+ type: object
+ title: Action Overrides
+ changed_at:
+ type: string
+ title: Changed At
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - maturity_tier
+ - action_overrides
+ - changed_at
+ - created_at
+ title: MaturityOut
+ MetricsOut:
+ properties:
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ snapshot_at:
+ type: string
+ title: Snapshot At
+ open_alerts:
+ type: integer
+ title: Open Alerts
+ critical_alerts:
+ type: integer
+ title: Critical Alerts
+ open_cases:
+ type: integer
+ title: Open Cases
+ mttr_minutes:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Mttr Minutes
+ sla_breaches:
+ type: integer
+ title: Sla Breaches
+ connector_count:
+ type: integer
+ title: Connector Count
+ health_score:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Health Score
+ type: object
+ required:
+ - tenant_id
+ - snapshot_at
+ - open_alerts
+ - critical_alerts
+ - open_cases
+ - mttr_minutes
+ - sla_breaches
+ - connector_count
+ - health_score
+ title: MetricsOut
+ MitreCoverageCell:
+ properties:
+ techniqueId:
+ type: string
+ title: Techniqueid
+ techniqueName:
+ type: string
+ title: Techniquename
+ tactic:
+ type: string
+ title: Tactic
+ detections:
+ type: integer
+ title: Detections
+ alerts:
+ type: integer
+ title: Alerts
+ intensity:
+ type: number
+ title: Intensity
+ type: object
+ required:
+ - techniqueId
+ - techniqueName
+ - tactic
+ - detections
+ - alerts
+ - intensity
+ title: MitreCoverageCell
+ MitreCoverageItem:
+ properties:
+ technique_id:
+ type: string
+ title: Technique Id
+ name:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Name
+ tactic:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Tactic
+ alert_count:
+ type: integer
+ title: Alert Count
+ type: object
+ required:
+ - technique_id
+ - name
+ - tactic
+ - alert_count
+ title: MitreCoverageItem
+ MitreCoverageResponse:
+ properties:
+ tactics:
+ items:
+ type: string
+ type: array
+ title: Tactics
+ cells:
+ items:
+ $ref: '#/components/schemas/MitreCoverageCell'
+ type: array
+ title: Cells
+ generatedAt:
+ type: string
+ title: Generatedat
+ type: object
+ required:
+ - tactics
+ - cells
+ - generatedAt
+ title: MitreCoverageResponse
+ MitreTactic:
+ properties:
+ tactic:
+ type: string
+ title: Tactic
+ count:
+ type: integer
+ title: Count
+ type: object
+ required:
+ - tactic
+ - count
+ title: MitreTactic
+ ModelBreakdown:
+ properties:
+ model:
+ type: string
+ title: Model
+ runs:
+ type: integer
+ title: Runs
+ calls:
+ type: integer
+ title: Calls
+ total_prompt_tokens:
+ type: integer
+ title: Total Prompt Tokens
+ total_completion_tokens:
+ type: integer
+ title: Total Completion Tokens
+ total_cost_usd:
+ type: number
+ title: Total Cost Usd
+ imputed_public_cost_usd:
+ type: number
+ title: Imputed Public Cost Usd
+ avg_latency_ms:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Avg Latency Ms
+ type: object
+ required:
+ - model
+ - runs
+ - calls
+ - total_prompt_tokens
+ - total_completion_tokens
+ - total_cost_usd
+ - imputed_public_cost_usd
+ - avg_latency_ms
+ title: ModelBreakdown
+ description: Spend / volume rolled up per model over the window.
+ ModelCostBreakdown:
+ properties:
+ model:
+ type: string
+ title: Model
+ total_prompt_tokens:
+ type: integer
+ title: Total Prompt Tokens
+ total_completion_tokens:
+ type: integer
+ title: Total Completion Tokens
+ total_cost_usd:
+ type: number
+ title: Total Cost Usd
+ total_latency_ms:
+ type: integer
+ title: Total Latency Ms
+ call_count:
+ type: integer
+ title: Call Count
+ type: object
+ required:
+ - model
+ - total_prompt_tokens
+ - total_completion_tokens
+ - total_cost_usd
+ - total_latency_ms
+ - call_count
+ title: ModelCostBreakdown
+ description: 'Per-model cost telemetry for a single run.
+
+
+ Sourced from ``aisoc_run_costs`` (populated by ``CostTracker`` in the
+
+ agents service). Lets operators audit which model drove spend on a
+
+ given investigation.'
+ NLDetectionRequest:
+ properties:
+ description:
+ type: string
+ maxLength: 2000
+ minLength: 10
+ title: Description
+ description: Plain-English description of the threat behaviour to detect.
+ target_platforms:
+ items:
+ type: string
+ enum:
+ - sigma
+ - kql
+ - spl
+ - esql
+ type: array
+ title: Target Platforms
+ description: Which rule languages to generate.
+ default:
+ - sigma
+ - kql
+ - spl
+ - esql
+ severity:
+ type: string
+ enum:
+ - informational
+ - low
+ - medium
+ - high
+ - critical
+ title: Severity
+ default: medium
+ mitre_techniques:
+ items:
+ type: string
+ type: array
+ title: Mitre Techniques
+ type: object
+ required:
+ - description
+ title: NLDetectionRequest
+ NLDetectionResponse:
+ properties:
+ description:
+ type: string
+ title: Description
+ sigma:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Sigma
+ kql:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Kql
+ spl:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Spl
+ esql:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Esql
+ model_used:
+ type: string
+ title: Model Used
+ type: object
+ required:
+ - description
+ - model_used
+ title: NLDetectionResponse
+ NLQueryExecuteRequest:
+ properties:
+ question:
+ type: string
+ minLength: 10
+ title: Question
+ description: Plain-English security question (e.g. 'Show failed logins per
+ user in the last 24 h').
+ index_pattern:
+ type: string
+ title: Index Pattern
+ description: Elasticsearch index pattern to scope the ES|QL query.
+ default: logs-*,aisoc-events-*
+ time_range_hours:
+ type: integer
+ maximum: 8760.0
+ minimum: 1.0
+ title: Time Range Hours
+ description: Look-back window in hours.
+ default: 24
+ es_url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Es Url
+ description: Override Elasticsearch URL (defaults to settings.ES_URL if
+ set).
+ es_api_key:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Es Api Key
+ description: Override ES API key (defaults to settings.ES_API_KEY if set).
+ max_rows:
+ type: integer
+ maximum: 5000.0
+ minimum: 1.0
+ title: Max Rows
+ default: 500
+ type: object
+ required:
+ - question
+ title: NLQueryExecuteRequest
+ NLQueryExecuteResponse:
+ properties:
+ request_id:
+ type: string
+ format: uuid
+ title: Request Id
+ question:
+ type: string
+ title: Question
+ esql:
+ type: string
+ title: Esql
+ spl:
+ type: string
+ title: Spl
+ kql:
+ type: string
+ title: Kql
+ explanation:
+ type: string
+ title: Explanation
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ result:
+ anyOf:
+ - $ref: '#/components/schemas/QueryResult'
+ - type: 'null'
+ execution_error:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Execution Error
+ type: object
+ required:
+ - request_id
+ - question
+ - esql
+ - spl
+ - kql
+ - explanation
+ - created_at
+ title: NLQueryExecuteResponse
+ NLQueryTranslateRequest:
+ properties:
+ question:
+ type: string
+ minLength: 10
+ title: Question
+ description: Plain-English security question (e.g. 'Show failed logins per
+ user in the last 24 h').
+ index_pattern:
+ type: string
+ title: Index Pattern
+ description: Elasticsearch index pattern to scope the ES|QL query.
+ default: logs-*,aisoc-events-*
+ time_range_hours:
+ type: integer
+ maximum: 8760.0
+ minimum: 1.0
+ title: Time Range Hours
+ description: Look-back window in hours.
+ default: 24
+ type: object
+ required:
+ - question
+ title: NLQueryTranslateRequest
+ NLQueryTranslateResponse:
+ properties:
+ request_id:
+ type: string
+ format: uuid
+ title: Request Id
+ question:
+ type: string
+ title: Question
+ esql:
+ type: string
+ title: Esql
+ spl:
+ type: string
+ title: Spl
+ kql:
+ type: string
+ title: Kql
+ explanation:
+ type: string
+ title: Explanation
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - request_id
+ - question
+ - esql
+ - spl
+ - kql
+ - explanation
+ - created_at
+ title: NLQueryTranslateResponse
+ NodeCreate:
+ properties:
+ node_type:
+ type: string
+ title: Node Type
+ external_id:
+ type: string
+ title: External Id
+ display_name:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Display Name
+ source_system:
+ type: string
+ title: Source System
+ risk_score:
+ type: number
+ title: Risk Score
+ default: 0.0
+ privilege_tier:
+ type: integer
+ title: Privilege Tier
+ default: 0
+ last_activity:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Activity
+ attributes:
+ additionalProperties: true
+ type: object
+ title: Attributes
+ type: object
+ required:
+ - node_type
+ - external_id
+ - source_system
+ title: NodeCreate
+ NodeOut:
+ properties:
+ node_type:
+ type: string
+ title: Node Type
+ external_id:
+ type: string
+ title: External Id
+ display_name:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Display Name
+ source_system:
+ type: string
+ title: Source System
+ risk_score:
+ type: number
+ title: Risk Score
+ default: 0.0
+ privilege_tier:
+ type: integer
+ title: Privilege Tier
+ default: 0
+ last_activity:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Activity
+ attributes:
+ additionalProperties: true
+ type: object
+ title: Attributes
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ is_active:
+ type: boolean
+ title: Is Active
+ created_at:
+ type: string
+ title: Created At
+ updated_at:
+ type: string
+ title: Updated At
+ type: object
+ required:
+ - node_type
+ - external_id
+ - source_system
+ - id
+ - tenant_id
+ - is_active
+ - created_at
+ - updated_at
+ title: NodeOut
+ OAuthAppRegistration:
+ properties:
+ client_id:
+ type: string
+ maxLength: 512
+ minLength: 1
+ title: Client Id
+ client_secret:
+ type: string
+ maxLength: 4096
+ minLength: 1
+ title: Client Secret
+ authorize_url:
+ anyOf:
+ - type: string
+ maxLength: 512
+ - type: 'null'
+ title: Authorize Url
+ token_url:
+ anyOf:
+ - type: string
+ maxLength: 512
+ - type: 'null'
+ title: Token Url
+ scopes:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ maxItems: 64
+ - type: 'null'
+ title: Scopes
+ type: object
+ required:
+ - client_id
+ - client_secret
+ title: OAuthAppRegistration
+ description: Payload for ``PUT /api/v1/oauth/app/{connector_type}``.
+ OAuthAppView:
+ properties:
+ connector_type:
+ type: string
+ title: Connector Type
+ client_id:
+ type: string
+ title: Client Id
+ has_secret:
+ type: boolean
+ title: Has Secret
+ authorize_url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Authorize Url
+ token_url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Token Url
+ scopes:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Scopes
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ type: object
+ required:
+ - connector_type
+ - client_id
+ - has_secret
+ - authorize_url
+ - token_url
+ - scopes
+ - created_at
+ - updated_at
+ title: OAuthAppView
+ description: 'Read-only projection of an :class:`OAuthAppCredential`.
+
+
+ Never round-trips the secret — only ``has_secret: bool`` so the UI
+
+ can render a "credential present, last updated X days ago" badge.'
+ ObservableEdge:
+ properties:
+ source:
+ type: string
+ title: Source
+ target:
+ type: string
+ title: Target
+ relation:
+ type: string
+ title: Relation
+ type: object
+ required:
+ - source
+ - target
+ - relation
+ title: ObservableEdge
+ ObservableNode:
+ properties:
+ id:
+ type: string
+ title: Id
+ kind:
+ type: string
+ enum:
+ - ip
+ - user
+ - host
+ - domain
+ - hash
+ - file
+ - process
+ - alert
+ title: Kind
+ value:
+ type: string
+ title: Value
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ type: object
+ required:
+ - id
+ - kind
+ - value
+ title: ObservableNode
+ OnCallEntry:
+ properties:
+ user_id:
+ type: string
+ format: uuid
+ title: User Id
+ user_email:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: User Email
+ user_name:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: User Name
+ status:
+ type: string
+ title: Status
+ schedule_ref:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Schedule Ref
+ rotation:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Rotation
+ note:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Note
+ until:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Until
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ type: object
+ required:
+ - user_id
+ - status
+ - updated_at
+ title: OnCallEntry
+ OnCallListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/OnCallEntry'
+ type: array
+ title: Items
+ total:
+ type: integer
+ title: Total
+ type: object
+ required:
+ - items
+ - total
+ title: OnCallListResponse
+ OnCallUpdateRequest:
+ properties:
+ status:
+ type: string
+ enum:
+ - available
+ - busy
+ - offline
+ - snoozed
+ title: Status
+ note:
+ anyOf:
+ - type: string
+ maxLength: 500
+ - type: 'null'
+ title: Note
+ snooze_minutes:
+ anyOf:
+ - type: integer
+ maximum: 1440.0
+ minimum: 1.0
+ - type: 'null'
+ title: Snooze Minutes
+ rotation:
+ anyOf:
+ - type: string
+ maxLength: 80
+ - type: 'null'
+ title: Rotation
+ schedule_ref:
+ anyOf:
+ - type: string
+ maxLength: 200
+ - type: 'null'
+ title: Schedule Ref
+ type: object
+ required:
+ - status
+ title: OnCallUpdateRequest
+ OverrideEntryModel:
+ properties:
+ key:
+ type: string
+ title: Key
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ reason:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Reason
+ created_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Created At
+ value:
+ additionalProperties: true
+ type: object
+ title: Value
+ type: object
+ required:
+ - key
+ - tags
+ - reason
+ - created_at
+ - value
+ title: OverrideEntryModel
+ OverrideSummaryResponse:
+ properties:
+ total_overrides:
+ type: integer
+ title: Total Overrides
+ false_positive_corrections:
+ type: integer
+ title: False Positive Corrections
+ true_positive_corrections:
+ type: integer
+ title: True Positive Corrections
+ benign_corrections:
+ type: integer
+ title: Benign Corrections
+ escalate_corrections:
+ type: integer
+ title: Escalate Corrections
+ type: object
+ required:
+ - total_overrides
+ - false_positive_corrections
+ - true_positive_corrections
+ - benign_corrections
+ - escalate_corrections
+ title: OverrideSummaryResponse
+ PackAssignmentCreate:
+ properties:
+ child_tenant_id:
+ type: string
+ format: uuid
+ title: Child Tenant Id
+ enabled:
+ type: boolean
+ title: Enabled
+ default: true
+ parameter_overrides:
+ additionalProperties: true
+ type: object
+ title: Parameter Overrides
+ default: {}
+ type: object
+ required:
+ - child_tenant_id
+ title: PackAssignmentCreate
+ PackAssignmentOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ pack_id:
+ type: string
+ format: uuid
+ title: Pack Id
+ child_tenant_id:
+ type: string
+ format: uuid
+ title: Child Tenant Id
+ enabled:
+ type: boolean
+ title: Enabled
+ parameter_overrides:
+ additionalProperties: true
+ type: object
+ title: Parameter Overrides
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - id
+ - pack_id
+ - child_tenant_id
+ - enabled
+ - parameter_overrides
+ - created_at
+ title: PackAssignmentOut
+ PasskeyCredentialOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ device_name:
+ type: string
+ title: Device Name
+ transports:
+ items:
+ type: string
+ type: array
+ title: Transports
+ is_discoverable:
+ type: boolean
+ title: Is Discoverable
+ last_used_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Used At
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - id
+ - device_name
+ - transports
+ - is_discoverable
+ - last_used_at
+ - created_at
+ title: PasskeyCredentialOut
+ PeerGroupCreate:
+ properties:
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ criteria:
+ additionalProperties: true
+ type: object
+ title: Criteria
+ type: object
+ required:
+ - name
+ title: PeerGroupCreate
+ PeerGroupOut:
+ properties:
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ criteria:
+ additionalProperties: true
+ type: object
+ title: Criteria
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - name
+ - id
+ - tenant_id
+ - created_at
+ title: PeerGroupOut
+ PermissionOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ category:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ type: object
+ required:
+ - id
+ - name
+ - description
+ - category
+ title: PermissionOut
+ PluginManifestOut:
+ properties:
+ id:
+ type: string
+ title: Id
+ name:
+ type: string
+ title: Name
+ version:
+ type: string
+ title: Version
+ plugin_type:
+ type: string
+ title: Plugin Type
+ description:
+ type: string
+ title: Description
+ author:
+ type: string
+ title: Author
+ tags:
+ items:
+ type: string
+ type: array
+ title: Tags
+ config_schema:
+ additionalProperties: true
+ type: object
+ title: Config Schema
+ type: object
+ required:
+ - id
+ - name
+ - version
+ - plugin_type
+ - description
+ - author
+ - tags
+ - config_schema
+ title: PluginManifestOut
+ PluginOut:
+ properties:
+ id:
+ type: string
+ title: Id
+ manifest:
+ $ref: '#/components/schemas/PluginManifestOut'
+ enabled:
+ type: boolean
+ title: Enabled
+ loaded_at:
+ type: number
+ title: Loaded At
+ error:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ type: object
+ required:
+ - id
+ - manifest
+ - enabled
+ - loaded_at
+ - error
+ title: PluginOut
+ PostureSummary:
+ properties:
+ total:
+ type: integer
+ title: Total
+ critical:
+ type: integer
+ title: Critical
+ high:
+ type: integer
+ title: High
+ medium:
+ type: integer
+ title: Medium
+ low:
+ type: integer
+ title: Low
+ open:
+ type: integer
+ title: Open
+ resolved:
+ type: integer
+ title: Resolved
+ suppressed:
+ type: integer
+ title: Suppressed
+ type: object
+ required:
+ - total
+ - critical
+ - high
+ - medium
+ - low
+ - open
+ - resolved
+ - suppressed
+ title: PostureSummary
+ PreferencesPatch:
+ properties:
+ preferences:
+ additionalProperties: true
+ type: object
+ title: Preferences
+ type: object
+ required:
+ - preferences
+ title: PreferencesPatch
+ description: Partial update payload for user preferences (merged server-side).
+ ProposalResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Tenant Id
+ base_rule_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Base Rule Id
+ promoted_rule_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Promoted Rule Id
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ rule_language:
+ type: string
+ title: Rule Language
+ rule_body:
+ type: string
+ title: Rule Body
+ category:
+ type: string
+ title: Category
+ severity:
+ type: string
+ title: Severity
+ confidence:
+ type: integer
+ title: Confidence
+ mitre_tactics:
+ items: {}
+ type: array
+ title: Mitre Tactics
+ mitre_techniques:
+ items: {}
+ type: array
+ title: Mitre Techniques
+ tags:
+ items: {}
+ type: array
+ title: Tags
+ status:
+ type: string
+ title: Status
+ eval_result:
+ additionalProperties: true
+ type: object
+ title: Eval Result
+ review_comments:
+ items: {}
+ type: array
+ title: Review Comments
+ proposed_by_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Proposed By Id
+ decided_by_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Decided By Id
+ decision_comment:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Decision Comment
+ decided_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Decided At
+ github_pr_url:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Github Pr Url
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - base_rule_id
+ - promoted_rule_id
+ - name
+ - description
+ - rule_language
+ - rule_body
+ - category
+ - severity
+ - confidence
+ - mitre_tactics
+ - mitre_techniques
+ - tags
+ - status
+ - eval_result
+ - review_comments
+ - proposed_by_id
+ - decided_by_id
+ - decision_comment
+ - decided_at
+ - created_at
+ - updated_at
+ title: ProposalResponse
+ PublishStatus:
+ type: string
+ enum:
+ - pending
+ - approved
+ - rejected
+ title: PublishStatus
+ QueryRequest:
+ properties:
+ question:
+ type: string
+ minLength: 3
+ title: Question
+ doc_kinds:
+ items:
+ type: string
+ enum:
+ - runbook
+ - policy
+ - playbook
+ - sop
+ - wiki
+ - other
+ type: array
+ title: Doc Kinds
+ top_k:
+ type: integer
+ maximum: 20.0
+ minimum: 1.0
+ title: Top K
+ default: 5
+ synthesise:
+ type: boolean
+ title: Synthesise
+ description: Use LLM to synthesise an answer from retrieved chunks.
+ default: true
+ type: object
+ required:
+ - question
+ title: QueryRequest
+ QueryResponse:
+ properties:
+ question:
+ type: string
+ title: Question
+ chunks:
+ items:
+ $ref: '#/components/schemas/KBChunk'
+ type: array
+ title: Chunks
+ answer:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Answer
+ sources:
+ items:
+ type: string
+ type: array
+ title: Sources
+ type: object
+ required:
+ - question
+ - chunks
+ - answer
+ - sources
+ title: QueryResponse
+ QueryResult:
+ properties:
+ columns:
+ items:
+ type: string
+ type: array
+ title: Columns
+ rows:
+ items:
+ items: {}
+ type: array
+ type: array
+ title: Rows
+ total_rows:
+ type: integer
+ title: Total Rows
+ took_ms:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Took Ms
+ type: object
+ required:
+ - columns
+ - rows
+ - total_rows
+ title: QueryResult
+ RatingIn:
+ properties:
+ score:
+ type: integer
+ maximum: 5.0
+ minimum: 1.0
+ title: Score
+ comment:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Comment
+ type: object
+ required:
+ - score
+ title: RatingIn
+ RedispositionApplyRequest:
+ properties:
+ alert_ids:
+ items:
+ type: string
+ type: array
+ title: Alert Ids
+ new_disposition:
+ type: string
+ title: New Disposition
+ type: object
+ required:
+ - alert_ids
+ - new_disposition
+ title: RedispositionApplyRequest
+ RedispositionApplyResponse:
+ properties:
+ updated:
+ type: integer
+ title: Updated
+ new_disposition:
+ type: string
+ title: New Disposition
+ type: object
+ required:
+ - updated
+ - new_disposition
+ title: RedispositionApplyResponse
+ RedispositionCandidateModel:
+ properties:
+ alert_id:
+ type: string
+ title: Alert Id
+ title:
+ type: string
+ title: Title
+ severity:
+ type: string
+ title: Severity
+ current_disposition:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Current Disposition
+ proposed_disposition:
+ type: string
+ title: Proposed Disposition
+ event_time:
+ type: string
+ title: Event Time
+ type: object
+ required:
+ - alert_id
+ - title
+ - severity
+ - current_disposition
+ - proposed_disposition
+ - event_time
+ title: RedispositionCandidateModel
+ RefreshRequest:
+ properties:
+ refresh_token:
+ type: string
+ title: Refresh Token
+ type: object
+ required:
+ - refresh_token
+ title: RefreshRequest
+ RegisterBeginRequest:
+ properties:
+ device_name:
+ type: string
+ maxLength: 120
+ title: Device Name
+ default: My phone
+ type: object
+ title: RegisterBeginRequest
+ ReviewAction:
+ properties:
+ action:
+ type: string
+ pattern: ^(approve|reject)$
+ title: Action
+ notes:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Notes
+ type: object
+ required:
+ - action
+ title: ReviewAction
+ ReviewCommentRequest:
+ properties:
+ comment:
+ type: string
+ maxLength: 4000
+ minLength: 1
+ title: Comment
+ type: object
+ required:
+ - comment
+ title: ReviewCommentRequest
+ ReviewEvidenceRequest:
+ properties:
+ decision:
+ type: string
+ enum:
+ - accepted
+ - rejected
+ title: Decision
+ reviewer:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Reviewer
+ type: object
+ required:
+ - decision
+ title: ReviewEvidenceRequest
+ RiskProfileOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ user_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: User Id
+ external_user_ref:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: External User Ref
+ risk_score:
+ type: number
+ title: Risk Score
+ risk_tier:
+ type: string
+ title: Risk Tier
+ failed_auth_24h:
+ type: integer
+ title: Failed Auth 24H
+ off_hours_events_7d:
+ type: integer
+ title: Off Hours Events 7D
+ data_staging_score:
+ type: number
+ title: Data Staging Score
+ peer_anomaly_score:
+ type: number
+ title: Peer Anomaly Score
+ privilege_delta:
+ type: integer
+ title: Privilege Delta
+ is_watchlisted:
+ type: boolean
+ title: Is Watchlisted
+ watchlist_reason:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Watchlist Reason
+ last_evaluated_at:
+ type: string
+ title: Last Evaluated At
+ updated_at:
+ type: string
+ title: Updated At
+ type: object
+ required:
+ - id
+ - tenant_id
+ - user_id
+ - external_user_ref
+ - risk_score
+ - risk_tier
+ - failed_auth_24h
+ - off_hours_events_7d
+ - data_staging_score
+ - peer_anomaly_score
+ - privilege_delta
+ - is_watchlisted
+ - watchlist_reason
+ - last_evaluated_at
+ - updated_at
+ title: RiskProfileOut
+ RoleIn:
+ properties:
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ permission_ids:
+ items:
+ type: string
+ format: uuid
+ type: array
+ title: Permission Ids
+ default: []
+ type: object
+ required:
+ - name
+ title: RoleIn
+ RoleOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ is_system:
+ type: boolean
+ title: Is System
+ permissions:
+ items:
+ $ref: '#/components/schemas/PermissionOut'
+ type: array
+ title: Permissions
+ default: []
+ type: object
+ required:
+ - id
+ - tenant_id
+ - name
+ - description
+ - is_system
+ title: RoleOut
+ RoleUpdate:
+ properties:
+ name:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ permission_ids:
+ anyOf:
+ - items:
+ type: string
+ format: uuid
+ type: array
+ - type: 'null'
+ title: Permission Ids
+ type: object
+ title: RoleUpdate
+ RuleOverrideCreate:
+ properties:
+ child_tenant_id:
+ type: string
+ format: uuid
+ title: Child Tenant Id
+ rule_id:
+ type: string
+ format: uuid
+ title: Rule Id
+ action:
+ type: string
+ title: Action
+ note:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Note
+ severity_override:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity Override
+ parameter_overrides:
+ additionalProperties: true
+ type: object
+ title: Parameter Overrides
+ default: {}
+ type: object
+ required:
+ - child_tenant_id
+ - rule_id
+ - action
+ title: RuleOverrideCreate
+ RuleOverrideOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ parent_tenant_id:
+ type: string
+ format: uuid
+ title: Parent Tenant Id
+ child_tenant_id:
+ type: string
+ format: uuid
+ title: Child Tenant Id
+ rule_id:
+ type: string
+ format: uuid
+ title: Rule Id
+ action:
+ type: string
+ title: Action
+ note:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Note
+ severity_override:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity Override
+ parameter_overrides:
+ additionalProperties: true
+ type: object
+ title: Parameter Overrides
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - id
+ - parent_tenant_id
+ - child_tenant_id
+ - rule_id
+ - action
+ - note
+ - severity_override
+ - parameter_overrides
+ - created_at
+ title: RuleOverrideOut
+ RulePackCreate:
+ properties:
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ category:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ is_default:
+ type: boolean
+ title: Is Default
+ default: false
+ type: object
+ required:
+ - name
+ title: RulePackCreate
+ RulePackOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ category:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ is_default:
+ type: boolean
+ title: Is Default
+ created_at:
+ type: string
+ title: Created At
+ updated_at:
+ type: string
+ title: Updated At
+ type: object
+ required:
+ - id
+ - name
+ - description
+ - category
+ - is_default
+ - created_at
+ - updated_at
+ title: RulePackOut
+ RulePackRuleAdd:
+ properties:
+ rule_id:
+ type: string
+ format: uuid
+ title: Rule Id
+ type: object
+ required:
+ - rule_id
+ title: RulePackRuleAdd
+ RulePackUpdate:
+ properties:
+ name:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ category:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Category
+ is_default:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Is Default
+ type: object
+ title: RulePackUpdate
+ RunDetail:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ case_id:
+ type: string
+ title: Case Id
+ status:
+ type: string
+ title: Status
+ model_used:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Model Used
+ iterations:
+ type: integer
+ title: Iterations
+ total_tokens:
+ type: integer
+ title: Total Tokens
+ total_cost_usd:
+ type: number
+ title: Total Cost Usd
+ started_at:
+ type: string
+ format: date-time
+ title: Started At
+ completed_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Completed At
+ error:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ alert_summary:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Alert Summary
+ event_count:
+ type: integer
+ title: Event Count
+ artifact_count:
+ type: integer
+ title: Artifact Count
+ model_costs:
+ items:
+ $ref: '#/components/schemas/ModelCostBreakdown'
+ type: array
+ title: Model Costs
+ type: object
+ required:
+ - id
+ - case_id
+ - status
+ - model_used
+ - iterations
+ - total_tokens
+ - total_cost_usd
+ - started_at
+ - completed_at
+ - error
+ - alert_summary
+ - event_count
+ - artifact_count
+ - model_costs
+ title: RunDetail
+ description: Full run view including counts of attached children.
+ RunEvalRequest:
+ properties:
+ use_active_baseline:
+ type: boolean
+ title: Use Active Baseline
+ description: If true (default), the most recent active MITRE accuracy baseline
+ is materialised to a temp file and passed to run_evals.py via --baseline
+ so the runner can compute baseline_compare in-band.
+ default: true
+ max_regression_pp:
+ type: number
+ maximum: 100.0
+ minimum: 0.0
+ title: Max Regression Pp
+ description: Allowed MITRE accuracy regression vs the active baseline, in
+ percentage points. Forwarded to run_evals.py.
+ default: 1.0
+ timeout_seconds:
+ type: integer
+ maximum: 900.0
+ minimum: 10.0
+ title: Timeout Seconds
+ description: Hard timeout for the eval subprocess.
+ default: 180
+ type: object
+ title: RunEvalRequest
+ description: 'Trigger a local run of the offline eval harness.
+
+
+ The runner is `scripts/run_evals.py`. It is fully offline and deterministic
+
+ against the 200-incident synthetic benchmark, so this endpoint can be safely
+
+ called from the rule editor on every "Propose for review" action.'
+ RunEvalResponse:
+ properties:
+ report:
+ additionalProperties: true
+ type: object
+ title: Report
+ exit_code:
+ type: integer
+ title: Exit Code
+ duration_seconds:
+ type: number
+ title: Duration Seconds
+ ran_at:
+ type: string
+ format: date-time
+ title: Ran At
+ script:
+ type: string
+ title: Script
+ type: object
+ required:
+ - report
+ - exit_code
+ - duration_seconds
+ - ran_at
+ - script
+ title: RunEvalResponse
+ description: Wraps the JSON report emitted by `run_evals.py`.
+ RunHuntRequest:
+ properties:
+ platform:
+ type: string
+ enum:
+ - esql
+ - spl
+ - kql
+ title: Platform
+ default: esql
+ type: object
+ title: RunHuntRequest
+ RunRequest:
+ properties:
+ payload:
+ additionalProperties: true
+ type: object
+ title: Payload
+ default: {}
+ context:
+ additionalProperties: true
+ type: object
+ title: Context
+ default: {}
+ type: object
+ title: RunRequest
+ RunResponse:
+ properties:
+ plugin_id:
+ type: string
+ title: Plugin Id
+ result:
+ additionalProperties: true
+ type: object
+ title: Result
+ type: object
+ required:
+ - plugin_id
+ - result
+ title: RunResponse
+ RunSummary:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ case_id:
+ type: string
+ title: Case Id
+ status:
+ type: string
+ title: Status
+ model_used:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Model Used
+ iterations:
+ type: integer
+ title: Iterations
+ total_tokens:
+ type: integer
+ title: Total Tokens
+ total_cost_usd:
+ type: number
+ title: Total Cost Usd
+ started_at:
+ type: string
+ format: date-time
+ title: Started At
+ completed_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Completed At
+ error:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ type: object
+ required:
+ - id
+ - case_id
+ - status
+ - model_used
+ - iterations
+ - total_tokens
+ - total_cost_usd
+ - started_at
+ - completed_at
+ - error
+ title: RunSummary
+ description: Compact view of a run for list endpoints.
+ SLAConfigOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ severity:
+ type: string
+ title: Severity
+ mttd_target:
+ type: integer
+ title: Mttd Target
+ mttr_target:
+ type: integer
+ title: Mttr Target
+ mttc_target:
+ type: integer
+ title: Mttc Target
+ updated_at:
+ type: string
+ format: date-time
+ title: Updated At
+ type: object
+ required:
+ - id
+ - severity
+ - mttd_target
+ - mttr_target
+ - mttc_target
+ - updated_at
+ title: SLAConfigOut
+ SLAConfigUpdate:
+ properties:
+ mttd_target:
+ type: integer
+ maximum: 10080.0
+ minimum: 1.0
+ title: Mttd Target
+ description: Minutes
+ mttr_target:
+ type: integer
+ maximum: 10080.0
+ minimum: 1.0
+ title: Mttr Target
+ description: Minutes
+ mttc_target:
+ type: integer
+ maximum: 10080.0
+ minimum: 1.0
+ title: Mttc Target
+ description: Minutes
+ type: object
+ required:
+ - mttd_target
+ - mttr_target
+ - mttc_target
+ title: SLAConfigUpdate
+ SLAEventCreate:
+ properties:
+ alert_id:
+ type: string
+ format: uuid
+ title: Alert Id
+ severity:
+ type: string
+ title: Severity
+ event_type:
+ type: string
+ title: Event Type
+ occurred_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Occurred At
+ metadata:
+ additionalProperties: true
+ type: object
+ title: Metadata
+ type: object
+ required:
+ - alert_id
+ - severity
+ - event_type
+ title: SLAEventCreate
+ SLAEventOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ alert_id:
+ type: string
+ format: uuid
+ title: Alert Id
+ severity:
+ type: string
+ title: Severity
+ event_type:
+ type: string
+ title: Event Type
+ occurred_at:
+ type: string
+ format: date-time
+ title: Occurred At
+ metadata:
+ additionalProperties: true
+ type: object
+ title: Metadata
+ type: object
+ required:
+ - id
+ - alert_id
+ - severity
+ - event_type
+ - occurred_at
+ - metadata
+ title: SLAEventOut
+ SOCKpis:
+ properties:
+ mttd_hours:
+ type: number
+ title: Mttd Hours
+ mttr_hours:
+ type: number
+ title: Mttr Hours
+ mttc_hours:
+ type: number
+ title: Mttc Hours
+ false_positive_rate:
+ type: number
+ title: False Positive Rate
+ escalation_rate:
+ type: number
+ title: Escalation Rate
+ alert_volume_7d:
+ type: integer
+ title: Alert Volume 7D
+ cases_opened_7d:
+ type: integer
+ title: Cases Opened 7D
+ cases_closed_7d:
+ type: integer
+ title: Cases Closed 7D
+ analyst_overrides_7d:
+ type: integer
+ title: Analyst Overrides 7D
+ type: object
+ required:
+ - mttd_hours
+ - mttr_hours
+ - mttc_hours
+ - false_positive_rate
+ - escalation_rate
+ - alert_volume_7d
+ - cases_opened_7d
+ - cases_closed_7d
+ - analyst_overrides_7d
+ title: SOCKpis
+ SOCMetrics:
+ properties:
+ kpis:
+ $ref: '#/components/schemas/SOCKpis'
+ attack_heatmap:
+ items:
+ $ref: '#/components/schemas/AttackHeatmapCell'
+ type: array
+ title: Attack Heatmap
+ calibration_curve:
+ items:
+ $ref: '#/components/schemas/CalibrationBucket'
+ type: array
+ title: Calibration Curve
+ type: object
+ required:
+ - kpis
+ - attack_heatmap
+ - calibration_curve
+ title: SOCMetrics
+ STIXBundle:
+ properties:
+ type:
+ type: string
+ title: Type
+ default: bundle
+ id:
+ type: string
+ title: Id
+ spec_version:
+ type: string
+ title: Spec Version
+ default: '2.1'
+ created:
+ type: string
+ title: Created
+ objects:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Objects
+ type: object
+ required:
+ - id
+ - created
+ - objects
+ title: STIXBundle
+ STIXBundleCreate:
+ properties:
+ objects:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Objects
+ type: object
+ required:
+ - objects
+ title: STIXBundleCreate
+ STIXIndicator:
+ properties:
+ type:
+ type: string
+ title: Type
+ default: indicator
+ spec_version:
+ type: string
+ title: Spec Version
+ default: '2.1'
+ id:
+ type: string
+ title: Id
+ created:
+ type: string
+ title: Created
+ modified:
+ type: string
+ title: Modified
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ indicator_types:
+ items:
+ type: string
+ type: array
+ title: Indicator Types
+ default: []
+ pattern:
+ type: string
+ title: Pattern
+ pattern_type:
+ type: string
+ title: Pattern Type
+ default: stix
+ valid_from:
+ type: string
+ title: Valid From
+ valid_until:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Valid Until
+ confidence:
+ anyOf:
+ - type: integer
+ maximum: 100.0
+ minimum: 0.0
+ - type: 'null'
+ title: Confidence
+ labels:
+ items:
+ type: string
+ type: array
+ title: Labels
+ default: []
+ type: object
+ required:
+ - id
+ - created
+ - modified
+ - name
+ - pattern
+ - valid_from
+ title: STIXIndicator
+ STIXIndicatorCreate:
+ properties:
+ name:
+ type: string
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ indicator_types:
+ items:
+ type: string
+ type: array
+ title: Indicator Types
+ default: []
+ pattern:
+ type: string
+ title: Pattern
+ pattern_type:
+ type: string
+ title: Pattern Type
+ default: stix
+ valid_from:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Valid From
+ valid_until:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Valid Until
+ confidence:
+ anyOf:
+ - type: integer
+ maximum: 100.0
+ minimum: 0.0
+ - type: 'null'
+ title: Confidence
+ labels:
+ items:
+ type: string
+ type: array
+ title: Labels
+ default: []
+ type: object
+ required:
+ - name
+ - pattern
+ title: STIXIndicatorCreate
+ SavedViewModel:
+ properties:
+ id:
+ type: string
+ title: Id
+ view_type:
+ type: string
+ title: View Type
+ name:
+ type: string
+ title: Name
+ filters:
+ additionalProperties: true
+ type: object
+ title: Filters
+ columns:
+ anyOf:
+ - items: {}
+ type: array
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Columns
+ is_default:
+ type: boolean
+ title: Is Default
+ default: false
+ created_at:
+ type: string
+ title: Created At
+ updated_at:
+ type: string
+ title: Updated At
+ type: object
+ required:
+ - id
+ - view_type
+ - name
+ - created_at
+ - updated_at
+ title: SavedViewModel
+ description: Wire format for a saved view row.
+ ScanRequest:
+ properties:
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ org_query:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Org Query
+ ip_targets:
+ items:
+ type: string
+ type: array
+ title: Ip Targets
+ default: []
+ asset_type:
+ anyOf:
+ - $ref: '#/components/schemas/ExternalAssetType'
+ - type: 'null'
+ type: object
+ required:
+ - tenant_id
+ title: ScanRequest
+ ScanRunOut:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ cloud_provider:
+ type: string
+ title: Cloud Provider
+ cloud_account:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cloud Account
+ started_at:
+ type: string
+ title: Started At
+ completed_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Completed At
+ status:
+ type: string
+ title: Status
+ findings_total:
+ type: integer
+ title: Findings Total
+ findings_new:
+ type: integer
+ title: Findings New
+ findings_closed:
+ type: integer
+ title: Findings Closed
+ error_message:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error Message
+ type: object
+ required:
+ - id
+ - tenant_id
+ - cloud_provider
+ - cloud_account
+ - started_at
+ - completed_at
+ - status
+ - findings_total
+ - findings_new
+ - findings_closed
+ - error_message
+ title: ScanRunOut
+ ShiftAnalyst:
+ properties:
+ id:
+ type: string
+ title: Id
+ name:
+ type: string
+ title: Name
+ role:
+ type: string
+ title: Role
+ type: object
+ required:
+ - id
+ - name
+ - role
+ title: ShiftAnalyst
+ ShiftCreate:
+ properties:
+ name:
+ type: string
+ maxLength: 120
+ minLength: 1
+ title: Name
+ analysts:
+ items:
+ type: string
+ type: array
+ title: Analysts
+ description: Analyst user IDs
+ lead_id:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Lead Id
+ type: object
+ required:
+ - name
+ title: ShiftCreate
+ ShiftSummary:
+ properties:
+ id:
+ type: string
+ title: Id
+ name:
+ type: string
+ title: Name
+ started_at:
+ type: string
+ title: Started At
+ ended_at:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Ended At
+ status:
+ type: string
+ title: Status
+ lead:
+ $ref: '#/components/schemas/ShiftAnalyst'
+ analyst_count:
+ type: integer
+ title: Analyst Count
+ alerts_handled:
+ type: integer
+ title: Alerts Handled
+ escalations:
+ type: integer
+ title: Escalations
+ handoff_notes:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Handoff Notes
+ type: object
+ required:
+ - id
+ - name
+ - started_at
+ - status
+ - lead
+ - analyst_count
+ - alerts_handled
+ - escalations
+ title: ShiftSummary
+ SourceStat:
+ properties:
+ name:
+ type: string
+ title: Name
+ count:
+ type: integer
+ title: Count
+ status:
+ type: string
+ title: Status
+ type: object
+ required:
+ - name
+ - count
+ - status
+ title: SourceStat
+ SourceThreat:
+ properties:
+ source:
+ type: string
+ title: Source
+ count:
+ type: integer
+ title: Count
+ type: object
+ required:
+ - source
+ - count
+ title: SourceThreat
+ SourceVerdict:
+ properties:
+ connector_id:
+ type: string
+ format: uuid
+ title: Connector Id
+ connector_name:
+ type: string
+ title: Connector Name
+ connector_type:
+ type: string
+ title: Connector Type
+ status:
+ type: string
+ title: Status
+ row_count:
+ type: integer
+ title: Row Count
+ default: 0
+ duration_ms:
+ type: integer
+ title: Duration Ms
+ default: 0
+ error:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Error
+ type: object
+ required:
+ - connector_id
+ - connector_name
+ - connector_type
+ - status
+ title: SourceVerdict
+ description: "Per-backend outcome for a federated call.\n\n``status`` is one\
+ \ of:\n * ``ok`` — backend returned rows (possibly zero).\n * ``error``\
+ \ — backend raised something we caught; ``error`` field\n carries the human\
+ \ message. Other backends may still have\n succeeded.\n * ``unsupported``\
+ \ — connector type doesn't speak federated search\n (kept for forward-compat;\
+ \ today we pre-filter so this is rare)."
+ SubmissionResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ artifact_kind:
+ type: string
+ title: Artifact Kind
+ sender:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Sender
+ subject:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Subject
+ urls:
+ items:
+ type: string
+ type: array
+ title: Urls
+ verdict:
+ type: string
+ title: Verdict
+ confidence:
+ anyOf:
+ - type: number
+ - type: 'null'
+ title: Confidence
+ indicators:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Indicators
+ mitre_technique:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Mitre Technique
+ case_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Case Id
+ submitted_at:
+ type: string
+ format: date-time
+ title: Submitted At
+ triaged_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Triaged At
+ type: object
+ required:
+ - id
+ - artifact_kind
+ - sender
+ - subject
+ - urls
+ - verdict
+ - confidence
+ - indicators
+ - mitre_technique
+ - case_id
+ - submitted_at
+ - triaged_at
+ title: SubmissionResponse
+ SubmitRequest:
+ properties:
+ artifact_kind:
+ type: string
+ enum:
+ - email
+ - url
+ - attachment
+ - domain
+ title: Artifact Kind
+ default: email
+ raw_content:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Raw Content
+ description: Raw email source or URL to analyse.
+ sender:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Sender
+ subject:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Subject
+ urls:
+ items:
+ type: string
+ type: array
+ title: Urls
+ type: object
+ title: SubmitRequest
+ SuggestRequest:
+ properties:
+ alert_id:
+ type: string
+ format: uuid
+ title: Alert Id
+ description: ID of the FP-flagged alert.
+ analyst_note:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Analyst Note
+ description: Free-text note explaining why this is a FP.
+ type: object
+ required:
+ - alert_id
+ title: SuggestRequest
+ SuggestionListResponse:
+ properties:
+ suggestions:
+ items:
+ $ref: '#/components/schemas/SuggestionResponse'
+ type: array
+ title: Suggestions
+ total:
+ type: integer
+ title: Total
+ type: object
+ required:
+ - suggestions
+ - total
+ title: SuggestionListResponse
+ SuggestionResponse:
+ properties:
+ suggestion_id:
+ type: string
+ format: uuid
+ title: Suggestion Id
+ alert_id:
+ type: string
+ format: uuid
+ title: Alert Id
+ base_rule_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Base Rule Id
+ draft_rule_name:
+ type: string
+ title: Draft Rule Name
+ draft_sigma_yaml:
+ type: string
+ title: Draft Sigma Yaml
+ rationale:
+ type: string
+ title: Rationale
+ proposal_id:
+ anyOf:
+ - type: string
+ format: uuid
+ - type: 'null'
+ title: Proposal Id
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - suggestion_id
+ - alert_id
+ - base_rule_id
+ - draft_rule_name
+ - draft_sigma_yaml
+ - rationale
+ - proposal_id
+ - created_at
+ title: SuggestionResponse
+ SuppressRequest:
+ properties:
+ reason:
+ type: string
+ title: Reason
+ type: object
+ required:
+ - reason
+ title: SuppressRequest
+ TAXIICollection:
+ properties:
+ id:
+ type: string
+ title: Id
+ title:
+ type: string
+ title: Title
+ description:
+ type: string
+ title: Description
+ can_read:
+ type: boolean
+ title: Can Read
+ default: true
+ can_write:
+ type: boolean
+ title: Can Write
+ default: false
+ media_types:
+ items:
+ type: string
+ type: array
+ title: Media Types
+ default:
+ - application/stix+json;version=2.1
+ type: object
+ required:
+ - id
+ - title
+ - description
+ title: TAXIICollection
+ TAXIICollectionListResponse:
+ properties:
+ items:
+ items:
+ $ref: '#/components/schemas/TAXIICollection'
+ type: array
+ title: Items
+ total:
+ type: integer
+ title: Total
+ type: object
+ required:
+ - items
+ - total
+ title: TAXIICollectionListResponse
+ TacticConfidence:
+ properties:
+ tactic:
+ type: string
+ title: Tactic
+ rules:
+ type: integer
+ title: Rules
+ activeRules:
+ type: integer
+ title: Activerules
+ avgConfidence:
+ type: number
+ title: Avgconfidence
+ avgConfidenceActive:
+ type: number
+ title: Avgconfidenceactive
+ type: object
+ required:
+ - tactic
+ - rules
+ - activeRules
+ - avgConfidence
+ - avgConfidenceActive
+ title: TacticConfidence
+ description: 'Average rule confidence within one MITRE tactic.
+
+
+ Useful for the "where is my coverage weakest?" question — analysts
+
+ plot tactics as bars and immediately see that, e.g. *exfiltration*
+
+ averages 38/100 while *execution* averages 78/100.'
+ TaskResponse:
+ properties:
+ id:
+ type: string
+ title: Id
+ title:
+ type: string
+ title: Title
+ status:
+ type: string
+ enum:
+ - todo
+ - in_progress
+ - done
+ title: Status
+ assignee:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Assignee
+ dueAt:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Dueat
+ createdAt:
+ type: string
+ format: date-time
+ title: Createdat
+ type: object
+ required:
+ - id
+ - title
+ - status
+ - createdAt
+ title: TaskResponse
+ TemplateCreate:
+ properties:
+ name:
+ type: string
+ title: Name
+ report_type:
+ type: string
+ title: Report Type
+ cron_schedule:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cron Schedule
+ timezone:
+ type: string
+ title: Timezone
+ default: UTC
+ sections:
+ items:
+ additionalProperties: true
+ type: object
type: array
- title: Mitre Tactics
- mitre_techniques:
- items: {}
+ title: Sections
+ recipients:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Recipients
+ output_format:
+ type: string
+ title: Output Format
+ default: pdf
+ type: object
+ required:
+ - name
+ - report_type
+ title: TemplateCreate
+ TemplateOut:
+ properties:
+ name:
+ type: string
+ title: Name
+ report_type:
+ type: string
+ title: Report Type
+ cron_schedule:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Cron Schedule
+ timezone:
+ type: string
+ title: Timezone
+ default: UTC
+ sections:
+ items:
+ additionalProperties: true
+ type: object
type: array
- title: Mitre Techniques
- connector_type:
+ title: Sections
+ recipients:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Recipients
+ output_format:
+ type: string
+ title: Output Format
+ default: pdf
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ is_enabled:
+ type: boolean
+ title: Is Enabled
+ last_run_at:
anyOf:
- type: string
- type: 'null'
- title: Connector Type
- ai_score:
+ title: Last Run At
+ created_at:
+ type: string
+ title: Created At
+ updated_at:
+ type: string
+ title: Updated At
+ type: object
+ required:
+ - name
+ - report_type
+ - id
+ - tenant_id
+ - is_enabled
+ - created_at
+ - updated_at
+ title: TemplateOut
+ TenantNoteCreate:
+ properties:
+ child_id:
+ type: string
+ format: uuid
+ title: Child Id
+ body:
+ type: string
+ title: Body
+ type: object
+ required:
+ - child_id
+ - body
+ title: TenantNoteCreate
+ TenantNoteOut:
+ properties:
+ child_id:
+ type: string
+ format: uuid
+ title: Child Id
+ body:
+ type: string
+ title: Body
+ id:
+ type: string
+ format: uuid
+ title: Id
+ parent_id:
+ type: string
+ format: uuid
+ title: Parent Id
+ author_id:
anyOf:
- - type: number
+ - type: string
+ format: uuid
- type: 'null'
- title: Ai Score
- ai_summary:
+ title: Author Id
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - child_id
+ - body
+ - id
+ - parent_id
+ - author_id
+ - created_at
+ title: TenantNoteOut
+ TenantResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ name:
+ type: string
+ title: Name
+ slug:
+ type: string
+ title: Slug
+ plan:
+ type: string
+ title: Plan
+ is_active:
+ type: boolean
+ title: Is Active
+ settings:
+ additionalProperties: true
+ type: object
+ title: Settings
+ limits:
+ additionalProperties: true
+ type: object
+ title: Limits
+ created_at:
+ type: string
+ format: date-time
+ title: Created At
+ type: object
+ required:
+ - id
+ - name
+ - slug
+ - plan
+ - is_active
+ - settings
+ - limits
+ - created_at
+ title: TenantResponse
+ TestBody:
+ properties:
+ language:
+ type: string
+ title: Language
+ body:
+ type: string
+ title: Body
+ sample:
anyOf:
- type: string
- type: 'null'
- title: Ai Summary
- ai_recommendations:
- items: {}
- type: array
- title: Ai Recommendations
- affected_ips:
- items: {}
- type: array
- title: Affected Ips
- affected_hosts:
- items: {}
- type: array
- title: Affected Hosts
- affected_users:
- items: {}
+ title: Sample
+ type: object
+ required:
+ - language
+ - body
+ title: TestBody
+ TestConnectionRequest:
+ properties:
+ connector_type:
+ type: string
+ maxLength: 100
+ minLength: 1
+ title: Connector Type
+ auth_config:
+ additionalProperties: true
+ type: object
+ title: Auth Config
+ connector_config:
+ additionalProperties: true
+ type: object
+ title: Connector Config
+ type: object
+ required:
+ - connector_type
+ title: TestConnectionRequest
+ description: 'Inline credential-test payload used by the wizard *before* saving.
+
+
+ The wizard collects credentials in-browser, calls this endpoint, and
+
+ only persists the connector if the test succeeds. We intentionally
+
+ do *not* let the wizard test against an existing instance — that''s
+
+ a separate path (:func:`test_existing_connector`) that decrypts the
+
+ stored creds first.'
+ TestResponse:
+ properties:
+ matches:
+ type: integer
+ title: Matches
+ preview:
+ items:
+ $ref: '#/components/schemas/HuntPreviewItem'
type: array
- title: Affected Users
- case_id:
+ title: Preview
+ type: object
+ required:
+ - matches
+ - preview
+ title: TestResponse
+ ThreatActorCreate:
+ properties:
+ name:
+ type: string
+ title: Name
+ aliases:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Aliases
+ motivation:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Motivation
+ sophistication:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Sophistication
+ country_of_origin:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Country Of Origin
+ target_sectors:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Target Sectors
+ ttps:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Ttps
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ first_observed:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: First Observed
+ last_activity:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Activity
+ context:
+ additionalProperties: true
+ type: object
+ title: Context
+ type: object
+ required:
+ - name
+ title: ThreatActorCreate
+ ThreatActorOut:
+ properties:
+ name:
+ type: string
+ title: Name
+ aliases:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Aliases
+ motivation:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Motivation
+ sophistication:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Sophistication
+ country_of_origin:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Country Of Origin
+ target_sectors:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Target Sectors
+ ttps:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Ttps
+ description:
anyOf:
- type: string
- format: uuid
- type: 'null'
- title: Case Id
- tags:
- items: {}
- type: array
- title: Tags
- event_time:
- type: string
- format: date-time
- title: Event Time
- first_seen:
+ title: Description
+ first_observed:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: First Observed
+ last_activity:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Last Activity
+ context:
+ additionalProperties: true
+ type: object
+ title: Context
+ id:
type: string
- format: date-time
- title: First Seen
- last_seen:
+ format: uuid
+ title: Id
+ tenant_id:
type: string
- format: date-time
- title: Last Seen
+ format: uuid
+ title: Tenant Id
+ is_active:
+ type: boolean
+ title: Is Active
created_at:
type: string
- format: date-time
title: Created At
- updated_at:
- type: string
- format: date-time
- title: Updated At
type: object
required:
+ - name
- id
- tenant_id
- - title
- - description
- - severity
- - status
- - priority
- - category
- - mitre_tactics
- - mitre_techniques
- - connector_type
- - ai_score
- - ai_summary
- - ai_recommendations
- - affected_ips
- - affected_hosts
- - affected_users
- - case_id
- - tags
- - event_time
- - first_seen
- - last_seen
+ - is_active
- created_at
- - updated_at
- title: AlertResponse
- AlertStatsResponse:
+ title: ThreatActorOut
+ ThresholdTriple:
properties:
- total:
- type: integer
- title: Total
- by_severity:
- additionalProperties:
- type: integer
- type: object
- title: By Severity
- by_status:
- additionalProperties:
- type: integer
- type: object
- title: By Status
- new_last_24h:
- type: integer
- title: New Last 24H
- critical_open:
- type: integer
- title: Critical Open
+ auto:
+ type: number
+ maximum: 1.0
+ minimum: 0.0
+ title: Auto
+ review:
+ type: number
+ maximum: 1.0
+ minimum: 0.0
+ title: Review
+ escalation:
+ type: number
+ maximum: 1.0
+ minimum: 0.0
+ title: Escalation
type: object
required:
- - total
- - by_severity
- - by_status
- - new_last_24h
- - critical_open
- title: AlertStatsResponse
- AlertUpdateRequest:
+ - auto
+ - review
+ - escalation
+ title: ThresholdTriple
+ description: 'Three confidence cutoffs for one action.
+
+
+ Invariant: ``escalation <= review <= auto`` and all are in ``[0.0, 1.0]``.'
+ ThresholdUpdateRequest:
properties:
- status:
+ auto:
+ type: number
+ maximum: 1.0
+ minimum: 0.0
+ title: Auto
+ review:
+ type: number
+ maximum: 1.0
+ minimum: 0.0
+ title: Review
+ escalation:
+ type: number
+ maximum: 1.0
+ minimum: 0.0
+ title: Escalation
+ reason:
anyOf:
- type: string
+ maxLength: 500
- type: 'null'
- title: Status
- priority:
+ title: Reason
+ description: Free-text justification — surfaced in the audit log.
+ type: object
+ required:
+ - auto
+ - review
+ - escalation
+ title: ThresholdUpdateRequest
+ ThresholdUpdateResponse:
+ properties:
+ action:
+ type: string
+ title: Action
+ thresholds:
+ $ref: '#/components/schemas/ThresholdTriple'
+ updated_at:
+ type: string
+ title: Updated At
+ updated_by:
+ type: string
+ title: Updated By
+ type: object
+ required:
+ - action
+ - thresholds
+ - updated_at
+ - updated_by
+ title: ThresholdUpdateResponse
+ TimelineDecision:
+ properties:
+ reason:
anyOf:
- - type: integer
+ - type: string
- type: 'null'
- title: Priority
- tags:
+ title: Reason
+ confidence:
anyOf:
- - items:
- type: string
- type: array
+ - type: number
- type: 'null'
- title: Tags
- assigned_to_id:
+ title: Confidence
+ next_phase:
anyOf:
- type: string
- format: uuid
- type: 'null'
- title: Assigned To Id
- case_id:
+ title: Next Phase
+ tool_name:
anyOf:
- type: string
- format: uuid
- type: 'null'
- title: Case Id
+ title: Tool Name
+ tool_args:
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Tool Args
+ tool_result_summary:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Tool Result Summary
type: object
- title: AlertUpdateRequest
- ApiKeyOut:
+ required:
+ - reason
+ - confidence
+ - next_phase
+ - tool_name
+ - tool_args
+ - tool_result_summary
+ title: TimelineDecision
+ description: Agent decision provenance annotation for a single timeline node.
+ TimelineNode:
properties:
- id:
+ seq:
+ type: integer
+ title: Seq
+ ts:
type: string
- format: uuid
- title: Id
- name:
+ format: date-time
+ title: Ts
+ kind:
type: string
- title: Name
- prefix:
+ title: Kind
+ agent:
type: string
- title: Prefix
- scopes:
- items:
- type: string
- type: array
- title: Scopes
- is_active:
- type: boolean
- title: Is Active
- expires_at:
+ title: Agent
+ summary:
+ type: string
+ title: Summary
+ duration_ms:
+ type: integer
+ title: Duration Ms
+ decision:
anyOf:
- - type: string
- format: date-time
+ - $ref: '#/components/schemas/TimelineDecision'
- type: 'null'
- title: Expires At
- last_used_at:
+ has_artifact:
+ type: boolean
+ title: Has Artifact
+ diff_vs_prev_attempt:
anyOf:
- type: string
- format: date-time
- type: 'null'
- title: Last Used At
- created_at:
+ title: Diff Vs Prev Attempt
+ type: object
+ required:
+ - seq
+ - ts
+ - kind
+ - agent
+ - summary
+ - duration_ms
+ - decision
+ - has_artifact
+ - diff_vs_prev_attempt
+ title: TimelineNode
+ description: One node in the scrubbable investigation timeline.
+ TokenResponse:
+ properties:
+ access_token:
type: string
- format: date-time
- title: Created At
+ title: Access Token
+ refresh_token:
+ type: string
+ title: Refresh Token
+ token_type:
+ type: string
+ title: Token Type
+ default: bearer
+ expires_in:
+ type: integer
+ title: Expires In
+ default: 1800
type: object
required:
- - id
- - name
- - prefix
- - scopes
- - is_active
- - expires_at
- - last_used_at
- - created_at
- title: ApiKeyOut
- AttackPathResponse:
+ - access_token
+ - refresh_token
+ title: TokenResponse
+ TopCostCase:
properties:
case_id:
type: string
title: Case Id
- nodes:
- items:
- $ref: '#/components/schemas/GraphNode'
- type: array
- title: Nodes
- edges:
- items:
- $ref: '#/components/schemas/GraphEdge'
- type: array
- title: Edges
- node_count:
+ runs:
type: integer
- title: Node Count
- edge_count:
+ title: Runs
+ total_cost_usd:
+ type: number
+ title: Total Cost Usd
+ total_tokens:
type: integer
- title: Edge Count
+ title: Total Tokens
type: object
required:
- case_id
- - nodes
- - edges
- - node_count
- - edge_count
- title: AttackPathResponse
- BlastRadiusResponse:
+ - runs
+ - total_cost_usd
+ - total_tokens
+ title: TopCostCase
+ description: 'The most expensive cases over the window.
+
+
+ Top-cost playbooks ≈ top-cost cases in the AiSOC data model: a
+
+ case is the unit of work an analyst (or playbook) drives, and
+
+ ``investigation_runs.case_id`` is the only stable join we can make
+
+ between LLM cost and "what was this money spent on?".'
+ TranslateRequest:
properties:
- entity_id:
+ source_format:
type: string
- title: Entity Id
- entity_type:
+ enum:
+ - sigma
+ - spl
+ - kql
+ - esql
+ - yara_l2
+ - udm
+ title: Source Format
+ description: Format of the input rule.
+ source_rule:
type: string
- title: Entity Type
- hops:
- type: integer
- title: Hops
- affected_nodes:
+ minLength: 5
+ title: Source Rule
+ description: The raw rule text to translate.
+ target_formats:
items:
- $ref: '#/components/schemas/GraphNode'
+ type: string
+ enum:
+ - sigma
+ - spl
+ - kql
+ - esql
+ - yara_l2
+ - udm
type: array
- title: Affected Nodes
- total_affected:
- type: integer
- title: Total Affected
- type_breakdown:
- additionalProperties:
- type: integer
- type: object
- title: Type Breakdown
- blast_radius_score:
- type: number
- title: Blast Radius Score
+ title: Target Formats
+ description: Output formats to produce.
+ default:
+ - sigma
+ - spl
+ - kql
+ - esql
type: object
required:
- - entity_id
- - entity_type
- - hops
- - affected_nodes
- - total_affected
- - type_breakdown
- - blast_radius_score
- title: BlastRadiusResponse
- CaseListResponse:
+ - source_format
+ - source_rule
+ title: TranslateRequest
+ TranslateResponse:
properties:
- items:
+ source_format:
+ type: string
+ enum:
+ - sigma
+ - spl
+ - kql
+ - esql
+ - yara_l2
+ - udm
+ title: Source Format
+ results:
items:
- $ref: '#/components/schemas/CaseResponse'
+ $ref: '#/components/schemas/TranslationResult'
type: array
- title: Items
- total:
- type: integer
- title: Total
- page:
- type: integer
- title: Page
- page_size:
- type: integer
- title: Page Size
- pages:
- type: integer
- title: Pages
+ title: Results
+ warnings:
+ items:
+ type: string
+ type: array
+ title: Warnings
+ default: []
type: object
required:
- - items
- - total
- - page
- - page_size
- - pages
- title: CaseListResponse
- CaseResponse:
+ - source_format
+ - results
+ title: TranslateResponse
+ TranslationResult:
properties:
- id:
- type: string
- format: uuid
- title: Id
- tenant_id:
+ format:
type: string
- format: uuid
- title: Tenant Id
- case_number:
+ enum:
+ - sigma
+ - spl
+ - kql
+ - esql
+ - yara_l2
+ - udm
+ title: Format
+ label:
type: string
- title: Case Number
- title:
+ title: Label
+ rule:
type: string
- title: Title
- description:
+ title: Rule
+ notes:
anyOf:
- type: string
- type: 'null'
- title: Description
- status:
- type: string
- title: Status
- priority:
+ title: Notes
+ type: object
+ required:
+ - format
+ - label
+ - rule
+ title: TranslationResult
+ TrendPoint:
+ properties:
+ timestamp:
type: string
- title: Priority
+ title: Timestamp
+ count:
+ type: integer
+ title: Count
severity:
type: string
title: Severity
- case_type:
+ type: object
+ required:
+ - timestamp
+ - count
+ - severity
+ title: TrendPoint
+ TroubleshootRequest:
+ properties:
+ connector_type:
type: string
- title: Case Type
- mitre_tactics:
- items: {}
+ maxLength: 100
+ minLength: 1
+ title: Connector Type
+ error:
+ type: string
+ maxLength: 4000
+ minLength: 1
+ title: Error
+ auth_config_keys:
+ items:
+ type: string
type: array
- title: Mitre Tactics
- mitre_techniques:
- items: {}
+ title: Auth Config Keys
+ description: Names of fields the operator filled in. Values are intentionally
+ *not* sent — the troubleshooter doesn't need plaintext credentials to
+ diagnose '401 Unauthorized'.
+ type: object
+ required:
+ - connector_type
+ - error
+ title: TroubleshootRequest
+ description: AI-troubleshooter input from the wizard's failure UX.
+ TroubleshootResponse:
+ properties:
+ likely_cause:
+ type: string
+ title: Likely Cause
+ fix_steps:
+ items:
+ type: string
type: array
- title: Mitre Techniques
- assigned_to_id:
- anyOf:
- - type: string
- format: uuid
- - type: 'null'
- title: Assigned To Id
- sla_deadline:
+ title: Fix Steps
+ doc_link:
anyOf:
- type: string
- format: date-time
- type: 'null'
- title: Sla Deadline
- sla_breached:
- type: boolean
- title: Sla Breached
- alert_ids:
- items: {}
- type: array
- title: Alert Ids
- tags:
- items: {}
- type: array
- title: Tags
- ticket_refs:
- items: {}
- type: array
- title: Ticket Refs
- summary:
+ title: Doc Link
+ type: object
+ required:
+ - likely_cause
+ - fix_steps
+ title: TroubleshootResponse
+ description: Structured guidance the wizard renders next to a failed test.
+ UpdateApiKeyRequest:
+ properties:
+ name:
anyOf:
- type: string
+ maxLength: 255
+ minLength: 1
- type: 'null'
- title: Summary
- resolution:
+ title: Name
+ scopes:
anyOf:
- - type: string
+ - items:
+ type: string
+ type: array
- type: 'null'
- title: Resolution
- closed_at:
+ title: Scopes
+ expires_in_days:
anyOf:
- - type: string
- format: date-time
+ - type: integer
+ maximum: 3650.0
+ minimum: 1.0
- type: 'null'
- title: Closed At
- created_at:
- type: string
- format: date-time
- title: Created At
- updated_at:
- type: string
- format: date-time
- title: Updated At
+ title: Expires In Days
+ description: Reset TTL from now; 0 = never
type: object
- required:
- - id
- - tenant_id
- - case_number
- - title
- - description
- - status
- - priority
- - severity
- - case_type
- - mitre_tactics
- - mitre_techniques
- - assigned_to_id
- - sla_deadline
- - sla_breached
- - alert_ids
- - tags
- - ticket_refs
- - summary
- - resolution
- - closed_at
- - created_at
- - updated_at
- title: CaseResponse
- ConnectorResponse:
+ title: UpdateApiKeyRequest
+ UpdateBody:
properties:
- id:
- type: string
- format: uuid
- title: Id
- tenant_id:
- type: string
- format: uuid
- title: Tenant Id
name:
- type: string
+ anyOf:
+ - type: string
+ - type: 'null'
title: Name
- connector_type:
- type: string
- title: Connector Type
- category:
- type: string
- title: Category
- is_enabled:
- type: boolean
- title: Is Enabled
- health_status:
- type: string
- title: Health Status
- last_health_check:
+ description:
anyOf:
- type: string
- format: date-time
- type: 'null'
- title: Last Health Check
- last_sync:
+ title: Description
+ language:
anyOf:
- type: string
- format: date-time
- type: 'null'
- title: Last Sync
- events_ingested:
- type: integer
- title: Events Ingested
- error_count:
- type: integer
- title: Error Count
+ title: Language
+ body:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Body
+ enabled:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Enabled
tags:
- items: {}
- type: array
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
title: Tags
- created_at:
- type: string
- format: date-time
- title: Created At
- updated_at:
- type: string
- format: date-time
- title: Updated At
- type: object
- required:
- - id
- - tenant_id
- - name
- - connector_type
- - category
- - is_enabled
- - health_status
- - last_health_check
- - last_sync
- - events_ingested
- - error_count
- - tags
- - created_at
- - updated_at
- title: ConnectorResponse
- CreateApiKeyRequest:
- properties:
- name:
- type: string
- maxLength: 255
- minLength: 1
- title: Name
- description: Human-readable name
- scopes:
- items:
- type: string
- type: array
- title: Scopes
- description: Permission scopes granted to this key
- expires_in_days:
+ mitre:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Mitre
+ severity:
anyOf:
- - type: integer
- maximum: 3650.0
- minimum: 1.0
+ - type: string
- type: 'null'
- title: Expires In Days
- description: TTL in days; None = never expires
+ title: Severity
type: object
- required:
- - name
- title: CreateApiKeyRequest
- CreateApiKeyResponse:
+ title: UpdateBody
+ UpdateCapabilitiesRequest:
properties:
- id:
- type: string
- format: uuid
- title: Id
- name:
- type: string
- title: Name
- key:
- type: string
- title: Key
- description: Raw API key — shown ONCE, store securely
- prefix:
- type: string
- title: Prefix
- scopes:
- items:
- type: string
- type: array
- title: Scopes
- expires_at:
+ allowed_capabilities:
anyOf:
- - type: string
- format: date-time
+ - items:
+ type: string
+ type: array
- type: 'null'
- title: Expires At
- created_at:
- type: string
- format: date-time
- title: Created At
+ title: Allowed Capabilities
+ description: Capability strings (e.g. ['pull_alerts','query_logs']) the
+ agent is permitted to invoke against this instance. None = no downscope.
type: object
- required:
- - id
- - name
- - key
- - prefix
- - scopes
- - expires_at
- - created_at
- title: CreateApiKeyResponse
- CreateCaseRequest:
+ title: UpdateCapabilitiesRequest
+ description: 'Per-instance capability downscoping payload (Workstream 4).
+
+
+ ``None`` removes the downscope ("agent may use every capability the
+
+ connector class declares"). An explicit list — possibly empty —
+
+ becomes the canonical allow-list. Validation against the connector
+
+ class''s declared capabilities happens server-side so a tampered
+
+ request can''t widen the agent''s reach beyond what the connector
+
+ code actually implements.'
+ UpdateCaseRequest:
properties:
title:
- type: string
+ anyOf:
+ - type: string
+ - type: 'null'
title: Title
description:
anyOf:
- type: string
- type: 'null'
title: Description
- priority:
- type: string
- title: Priority
- default: medium
severity:
- type: string
+ anyOf:
+ - type: string
+ enum:
+ - info
+ - low
+ - medium
+ - high
+ - critical
+ - type: 'null'
title: Severity
- default: medium
- case_type:
- type: string
- title: Case Type
- default: security_incident
- alert_ids:
- items:
- type: string
- format: uuid
- type: array
- title: Alert Ids
- default: []
+ status:
+ anyOf:
+ - type: string
+ enum:
+ - new
+ - triaged
+ - investigating
+ - contained
+ - resolved
+ - closed
+ - type: 'null'
+ title: Status
+ assignee:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Assignee
+ mitre_techniques:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Mitre Techniques
+ compliance_frameworks:
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
+ title: Compliance Frameworks
tags:
- items:
- type: string
- type: array
+ anyOf:
+ - additionalProperties:
+ type: string
+ type: object
+ - type: 'null'
title: Tags
- default: []
+ sla_due_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Sla Due At
type: object
- required:
- - title
- title: CreateCaseRequest
- CreateConnectorRequest:
+ title: UpdateCaseRequest
+ UpdateChannel:
+ type: string
+ enum:
+ - stable
+ - beta
+ - nightly
+ - manual
+ title: UpdateChannel
+ UpdateConnectorRequest:
properties:
name:
- type: string
+ anyOf:
+ - type: string
+ - type: 'null'
title: Name
- connector_type:
- type: string
- title: Connector Type
- category:
- type: string
- title: Category
+ is_enabled:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Is Enabled
auth_config:
- additionalProperties: true
- type: object
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
title: Auth Config
- default: {}
connector_config:
- additionalProperties: true
- type: object
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
title: Connector Config
- default: {}
tags:
- items:
- type: string
- type: array
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
title: Tags
- default: []
type: object
- required:
- - name
- - connector_type
- - category
- title: CreateConnectorRequest
- CreateRuleRequest:
+ title: UpdateConnectorRequest
+ UpdateHuntRequest:
properties:
- name:
- type: string
- title: Name
- description:
+ title:
anyOf:
- type: string
- type: 'null'
- title: Description
- rule_language:
- type: string
- title: Rule Language
- rule_body:
- type: string
- title: Rule Body
- category:
- type: string
- title: Category
- severity:
- type: string
- title: Severity
- default: medium
- confidence:
- type: integer
- title: Confidence
- default: 50
- mitre_tactics:
- items:
- type: string
- type: array
- title: Mitre Tactics
- default: []
- mitre_techniques:
- items:
- type: string
- type: array
- title: Mitre Techniques
- default: []
- tags:
- items:
- type: string
- type: array
- title: Tags
- default: []
- type: object
- required:
- - name
- - rule_language
- - rule_body
- - category
- title: CreateRuleRequest
- CreateUserRequest:
- properties:
- email:
- type: string
- format: email
- title: Email
- username:
- type: string
- title: Username
- password:
- type: string
- title: Password
- role:
- type: string
- title: Role
- default: soc_analyst
- type: object
- required:
- - email
- - username
- - password
- title: CreateUserRequest
- DetectionRuleResponse:
- properties:
- id:
- type: string
- format: uuid
- title: Id
- tenant_id:
+ title: Title
+ hypothesis:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Hypothesis
+ mitre_tactic:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Mitre Tactic
+ mitre_technique:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Mitre Technique
+ status:
+ anyOf:
+ - type: string
+ enum:
+ - draft
+ - active
+ - completed
+ - archived
+ - type: 'null'
+ title: Status
+ priority:
anyOf:
- type: string
- format: uuid
+ enum:
+ - low
+ - medium
+ - high
+ - critical
- type: 'null'
- title: Tenant Id
- name:
- type: string
- title: Name
- description:
+ title: Priority
+ assigned_to:
anyOf:
- type: string
- type: 'null'
- title: Description
- rule_language:
- type: string
- title: Rule Language
- rule_body:
- type: string
- title: Rule Body
- category:
- type: string
- title: Category
- status:
- type: string
- title: Status
- severity:
- type: string
- title: Severity
- confidence:
- type: integer
- title: Confidence
- mitre_tactics:
- items: {}
- type: array
- title: Mitre Tactics
- mitre_techniques:
- items: {}
- type: array
- title: Mitre Techniques
- fp_rate:
- type: number
- title: Fp Rate
- total_hits:
- type: integer
- title: Total Hits
- last_triggered:
+ title: Assigned To
+ query_esql:
anyOf:
- type: string
- format: date-time
- type: 'null'
- title: Last Triggered
+ title: Query Esql
+ query_spl:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Query Spl
+ query_kql:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Query Kql
tags:
- items: {}
- type: array
+ anyOf:
+ - items:
+ type: string
+ type: array
+ - type: 'null'
title: Tags
- is_builtin:
- type: boolean
- title: Is Builtin
- version:
- type: integer
- title: Version
- created_at:
- type: string
- format: date-time
- title: Created At
- updated_at:
- type: string
- format: date-time
- title: Updated At
- type: object
- required:
- - id
- - tenant_id
- - name
- - description
- - rule_language
- - rule_body
- - category
- - status
- - severity
- - confidence
- - mitre_tactics
- - mitre_techniques
- - fp_rate
- - total_hits
- - last_triggered
- - tags
- - is_builtin
- - version
- - created_at
- - updated_at
- title: DetectionRuleResponse
- DiscoverResponse:
- properties:
- discovered:
- items:
- type: string
- type: array
- title: Discovered
type: object
- required:
- - discovered
- title: DiscoverResponse
- EntityNeighborsResponse:
+ title: UpdateHuntRequest
+ UpdateObservablesRequest:
properties:
- entity_id:
- type: string
- title: Entity Id
- entity_type:
- type: string
- title: Entity Type
- source:
- anyOf:
- - $ref: '#/components/schemas/GraphNode'
- - type: 'null'
- neighbors:
+ nodes:
items:
- additionalProperties: true
- type: object
+ $ref: '#/components/schemas/ObservableNode'
type: array
- title: Neighbors
- neighbor_count:
- type: integer
- title: Neighbor Count
- default: 0
- type: object
- required:
- - entity_id
- - entity_type
- - source
- - neighbors
- title: EntityNeighborsResponse
- ExecuteRuleRequest:
- properties:
- events:
+ title: Nodes
+ edges:
items:
- additionalProperties: true
- type: object
+ $ref: '#/components/schemas/ObservableEdge'
type: array
- maxItems: 1000
- title: Events
- description: Events to test the rule against
+ title: Edges
type: object
- required:
- - events
- title: ExecuteRuleRequest
- description: Payload for ad-hoc rule execution.
- ExecuteRuleResponse:
+ title: UpdateObservablesRequest
+ UpdateRuleRequest:
properties:
- rule_id:
- type: string
- title: Rule Id
- rule_name:
- type: string
- title: Rule Name
- rule_language:
- type: string
- title: Rule Language
- severity:
- type: string
- title: Severity
- matched:
- type: boolean
- title: Matched
- match_count:
- type: integer
- title: Match Count
- matched_events:
- items:
- additionalProperties: true
- type: object
- type: array
- title: Matched Events
- score:
- type: number
- title: Score
- error:
+ name:
anyOf:
- type: string
- type: 'null'
- title: Error
- execution_time_ms:
- type: number
- title: Execution Time Ms
- type: object
- required:
- - rule_id
- - rule_name
- - rule_language
- - severity
- - matched
- - match_count
- - matched_events
- - score
- - error
- - execution_time_ms
- title: ExecuteRuleResponse
- GraphEdge:
- properties:
- source:
- type: string
- title: Source
- target:
- type: string
- title: Target
- type:
- type: string
- title: Type
- type: object
- required:
- - source
- - target
- - type
- title: GraphEdge
- GraphNode:
- properties:
- id:
- type: string
- title: Id
- label:
- type: string
- title: Label
- properties:
- additionalProperties: true
- type: object
- title: Properties
- type: object
- required:
- - id
- - label
- title: GraphNode
- HTTPValidationError:
- properties:
- detail:
- items:
- $ref: '#/components/schemas/ValidationError'
- type: array
- title: Detail
- type: object
- title: HTTPValidationError
- HuntRequest:
- properties:
- rule_ids:
+ title: Name
+ description:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Description
+ rule_body:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Rule Body
+ status:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Status
+ severity:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ confidence:
+ anyOf:
+ - type: integer
+ - type: 'null'
+ title: Confidence
+ tags:
anyOf:
- items:
type: string
- format: uuid
type: array
- type: 'null'
- title: Rule Ids
- description: Specific rule IDs to hunt with; omit to use all active rules
- rule_language:
+ title: Tags
+ type: object
+ title: UpdateRuleRequest
+ UpdateSavedViewRequest:
+ properties:
+ name:
anyOf:
- type: string
+ maxLength: 120
+ minLength: 1
- type: 'null'
- title: Rule Language
- description: Filter rules by language (sigma, yara, kql, eql)
- events:
- items:
- additionalProperties: true
- type: object
- type: array
- maxItems: 5000
- title: Events
- description: Events to hunt through
- type: object
- required:
- - events
- title: HuntRequest
- description: Payload for threat hunting across events.
- HuntResponse:
- properties:
- hunt_id:
- type: string
- title: Hunt Id
- rules_evaluated:
- type: integer
- title: Rules Evaluated
- rules_matched:
- type: integer
- title: Rules Matched
- total_events_scanned:
- type: integer
- title: Total Events Scanned
- matched_events:
- items:
- additionalProperties: true
+ title: Name
+ filters:
+ anyOf:
+ - additionalProperties: true
type: object
- type: array
- title: Matched Events
- match_summary:
- items:
- additionalProperties: true
+ - type: 'null'
+ title: Filters
+ columns:
+ anyOf:
+ - items: {}
+ type: array
+ - additionalProperties: true
type: object
- type: array
- title: Match Summary
- execution_time_ms:
- type: number
- title: Execution Time Ms
- errors:
- items:
- type: string
- type: array
- title: Errors
- type: object
- required:
- - hunt_id
- - rules_evaluated
- - rules_matched
- - total_events_scanned
- - matched_events
- - match_summary
- - execution_time_ms
- - errors
- title: HuntResponse
- InvestigateRequest:
- properties:
- alert_summary:
- type: string
- title: Alert Summary
- default: ''
- raw_alert:
- additionalProperties: true
- type: object
- title: Raw Alert
- default: {}
+ - type: 'null'
+ title: Columns
+ is_default:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Is Default
+ additionalProperties: false
type: object
- title: InvestigateRequest
- InvestigateResponse:
+ title: UpdateSavedViewRequest
+ description: 'Partial update — every field is optional.
+
+
+ Sending an empty body is a no-op (returns the row unchanged). To
+
+ *clear* ``columns`` and fall back to the page default column set,
+
+ the caller passes ``columns: null`` explicitly — the optional /
+
+ null distinction is preserved in the JSON.'
+ UpdateTaskRequest:
properties:
- run_id:
- type: string
- title: Run Id
- case_id:
- type: string
- title: Case Id
+ title:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Title
status:
- type: string
+ anyOf:
+ - type: string
+ enum:
+ - todo
+ - in_progress
+ - done
+ - type: 'null'
title: Status
- message:
- type: string
- title: Message
+ assignee:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Assignee
+ dueAt:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Dueat
type: object
- required:
- - run_id
- - case_id
- - status
- - message
- title: InvestigateResponse
- LoginRequest:
+ title: UpdateTaskRequest
+ UpdateTenantSettingsRequest:
properties:
- email:
- type: string
- format: email
- title: Email
- password:
- type: string
- title: Password
+ settings:
+ additionalProperties: true
+ type: object
+ title: Settings
+ default: {}
type: object
- required:
- - email
- - password
- title: LoginRequest
- MitreCoverageItem:
+ title: UpdateTenantSettingsRequest
+ UpdateUserRequest:
properties:
- technique_id:
- type: string
- title: Technique Id
- name:
+ username:
anyOf:
- type: string
- type: 'null'
- title: Name
- tactic:
+ title: Username
+ role:
anyOf:
- type: string
- type: 'null'
- title: Tactic
- alert_count:
- type: integer
- title: Alert Count
+ title: Role
+ is_active:
+ anyOf:
+ - type: boolean
+ - type: 'null'
+ title: Is Active
type: object
- required:
- - technique_id
- - name
- - tactic
- - alert_count
- title: MitreCoverageItem
- PluginManifestOut:
+ title: UpdateUserRequest
+ UpsertAlertGraphRequest:
properties:
- id:
- type: string
- title: Id
- name:
- type: string
- title: Name
- version:
- type: string
- title: Version
- plugin_type:
+ alert_id:
type: string
- title: Plugin Type
- description:
+ title: Alert Id
+ title:
type: string
- title: Description
- author:
+ title: Title
+ severity:
type: string
- title: Author
- tags:
+ title: Severity
+ mitre_techniques:
items:
type: string
type: array
- title: Tags
- config_schema:
- additionalProperties: true
- type: object
- title: Config Schema
- type: object
- required:
- - id
- - name
- - version
- - plugin_type
- - description
- - author
- - tags
- - config_schema
- title: PluginManifestOut
- PluginOut:
- properties:
- id:
- type: string
- title: Id
- manifest:
- $ref: '#/components/schemas/PluginManifestOut'
- enabled:
- type: boolean
- title: Enabled
- loaded_at:
- type: number
- title: Loaded At
- error:
+ title: Mitre Techniques
+ host_id:
anyOf:
- type: string
- type: 'null'
- title: Error
+ title: Host Id
+ user_id:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: User Id
+ ioc_values:
+ items:
+ type: string
+ type: array
+ title: Ioc Values
type: object
required:
- - id
- - manifest
- - enabled
- - loaded_at
- - error
- title: PluginOut
- RefreshRequest:
+ - alert_id
+ - title
+ - severity
+ title: UpsertAlertGraphRequest
+ UpsertCaseGraphRequest:
properties:
- refresh_token:
+ case_id:
type: string
- title: Refresh Token
+ title: Case Id
+ title:
+ type: string
+ title: Title
+ severity:
+ type: string
+ title: Severity
+ alert_ids:
+ items:
+ type: string
+ type: array
+ title: Alert Ids
type: object
required:
- - refresh_token
- title: RefreshRequest
- RunRequest:
+ - case_id
+ - title
+ - severity
+ title: UpsertCaseGraphRequest
+ UpsertHostRequest:
properties:
- payload:
- additionalProperties: true
- type: object
- title: Payload
- default: {}
- context:
- additionalProperties: true
- type: object
- title: Context
- default: {}
+ host_id:
+ type: string
+ title: Host Id
+ hostname:
+ type: string
+ title: Hostname
+ ip_address:
+ type: string
+ title: Ip Address
+ default: ''
+ os:
+ type: string
+ title: Os
+ default: ''
+ criticality:
+ type: string
+ title: Criticality
+ default: medium
type: object
- title: RunRequest
- RunResponse:
+ required:
+ - host_id
+ - hostname
+ title: UpsertHostRequest
+ UpsertUserRequest:
properties:
- plugin_id:
+ user_id:
type: string
- title: Plugin Id
- result:
- additionalProperties: true
- type: object
- title: Result
+ title: User Id
+ username:
+ type: string
+ title: Username
+ email:
+ type: string
+ title: Email
+ default: ''
+ department:
+ type: string
+ title: Department
+ default: ''
+ risk_score:
+ type: number
+ title: Risk Score
+ default: 0.0
type: object
required:
- - plugin_id
- - result
- title: RunResponse
- TenantResponse:
+ - user_id
+ - username
+ title: UpsertUserRequest
+ UserMeResponse:
properties:
id:
type: string
format: uuid
title: Id
- name:
+ tenant_id:
type: string
- title: Name
- slug:
+ format: uuid
+ title: Tenant Id
+ email:
type: string
- title: Slug
- plan:
+ title: Email
+ username:
type: string
- title: Plan
+ title: Username
+ role:
+ type: string
+ title: Role
is_active:
type: boolean
title: Is Active
- settings:
- additionalProperties: true
- type: object
- title: Settings
- limits:
+ preferences:
additionalProperties: true
type: object
- title: Limits
- created_at:
- type: string
- format: date-time
- title: Created At
+ title: Preferences
+ default: {}
type: object
required:
- id
- - name
- - slug
- - plan
+ - tenant_id
+ - email
+ - username
+ - role
- is_active
- - settings
- - limits
- - created_at
- title: TenantResponse
- TimelineEventResponse:
+ title: UserMeResponse
+ UserResponse:
properties:
id:
type: string
format: uuid
title: Id
- case_id:
+ tenant_id:
type: string
format: uuid
- title: Case Id
- event_type:
+ title: Tenant Id
+ email:
type: string
- title: Event Type
- content:
+ title: Email
+ username:
type: string
- title: Content
- metadata:
- additionalProperties: true
- type: object
- title: Metadata
- user_id:
+ title: Username
+ role:
+ type: string
+ title: Role
+ is_active:
+ type: boolean
+ title: Is Active
+ last_login:
anyOf:
- type: string
- format: uuid
+ format: date-time
- type: 'null'
- title: User Id
- is_automated:
- type: boolean
- title: Is Automated
+ title: Last Login
created_at:
type: string
format: date-time
@@ -3490,423 +22371,585 @@ components:
type: object
required:
- id
- - case_id
- - event_type
- - content
- - user_id
- - is_automated
+ - tenant_id
+ - email
+ - username
+ - role
+ - is_active
+ - last_login
- created_at
- title: TimelineEventResponse
- TokenResponse:
+ title: UserResponse
+ UserRoleAssignment:
properties:
- access_token:
+ user_id:
type: string
- title: Access Token
- refresh_token:
+ format: uuid
+ title: User Id
+ role_id:
type: string
- title: Refresh Token
- token_type:
+ format: uuid
+ title: Role Id
+ type: object
+ required:
+ - user_id
+ - role_id
+ title: UserRoleAssignment
+ UserRoleOut:
+ properties:
+ user_id:
type: string
- title: Token Type
- default: bearer
- expires_in:
- type: integer
- title: Expires In
- default: 1800
+ format: uuid
+ title: User Id
+ role_id:
+ type: string
+ format: uuid
+ title: Role Id
+ role_name:
+ type: string
+ title: Role Name
type: object
required:
- - access_token
- - refresh_token
- title: TokenResponse
- UpdateApiKeyRequest:
+ - user_id
+ - role_id
+ - role_name
+ title: UserRoleOut
+ ValidationError:
properties:
- name:
- anyOf:
- - type: string
- maxLength: 255
- minLength: 1
- - type: 'null'
- title: Name
- scopes:
- anyOf:
- - items:
- type: string
- type: array
- - type: 'null'
- title: Scopes
- expires_in_days:
- anyOf:
- - type: integer
- maximum: 3650.0
- minimum: 1.0
- - type: 'null'
- title: Expires In Days
- description: Reset TTL from now; 0 = never
+ loc:
+ items:
+ anyOf:
+ - type: string
+ - type: integer
+ type: array
+ title: Location
+ msg:
+ type: string
+ title: Message
+ type:
+ type: string
+ title: Error Type
+ input:
+ title: Input
+ ctx:
+ type: object
+ title: Context
type: object
- title: UpdateApiKeyRequest
- UpdateCaseRequest:
+ required:
+ - loc
+ - msg
+ - type
+ title: ValidationError
+ VulnerabilityCreate:
properties:
- title:
+ asset_id:
+ type: string
+ format: uuid
+ title: Asset Id
+ cve_id:
anyOf:
- type: string
- type: 'null'
+ title: Cve Id
+ title:
+ type: string
title: Title
description:
anyOf:
- type: string
- type: 'null'
title: Description
- status:
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ cvss_score:
anyOf:
- - type: string
+ - type: number
- type: 'null'
- title: Status
- priority:
+ title: Cvss Score
+ cvss_vector:
anyOf:
- type: string
- type: 'null'
- title: Priority
- severity:
+ title: Cvss Vector
+ epss_score:
anyOf:
- - type: string
+ - type: number
- type: 'null'
- title: Severity
- assigned_to_id:
+ title: Epss Score
+ is_exploited:
+ type: boolean
+ title: Is Exploited
+ default: false
+ source:
+ type: string
+ title: Source
+ external_id:
anyOf:
- type: string
- format: uuid
- - type: 'null'
- title: Assigned To Id
- tags:
- anyOf:
- - items:
- type: string
- type: array
- type: 'null'
- title: Tags
- resolution:
+ title: External Id
+ metadata:
+ additionalProperties: true
+ type: object
+ title: Metadata
+ type: object
+ required:
+ - asset_id
+ - title
+ - source
+ title: VulnerabilityCreate
+ VulnerabilityOut:
+ properties:
+ asset_id:
+ type: string
+ format: uuid
+ title: Asset Id
+ cve_id:
anyOf:
- type: string
- type: 'null'
- title: Resolution
- lessons_learned:
+ title: Cve Id
+ title:
+ type: string
+ title: Title
+ description:
anyOf:
- type: string
- type: 'null'
- title: Lessons Learned
- type: object
- title: UpdateCaseRequest
- UpdateConnectorRequest:
- properties:
- name:
+ title: Description
+ severity:
+ type: string
+ title: Severity
+ default: medium
+ cvss_score:
anyOf:
- - type: string
+ - type: number
- type: 'null'
- title: Name
- is_enabled:
+ title: Cvss Score
+ cvss_vector:
anyOf:
- - type: boolean
+ - type: string
- type: 'null'
- title: Is Enabled
- auth_config:
+ title: Cvss Vector
+ epss_score:
anyOf:
- - additionalProperties: true
- type: object
+ - type: number
- type: 'null'
- title: Auth Config
- connector_config:
+ title: Epss Score
+ is_exploited:
+ type: boolean
+ title: Is Exploited
+ default: false
+ source:
+ type: string
+ title: Source
+ external_id:
anyOf:
- - additionalProperties: true
- type: object
+ - type: string
- type: 'null'
- title: Connector Config
- tags:
+ title: External Id
+ metadata:
+ additionalProperties: true
+ type: object
+ title: Metadata
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ first_found:
+ type: string
+ title: First Found
+ last_found:
+ type: string
+ title: Last Found
+ remediated_at:
anyOf:
- - items:
- type: string
- type: array
+ - type: string
- type: 'null'
- title: Tags
+ title: Remediated At
+ asset_metadata:
+ additionalProperties: true
+ type: object
+ title: Asset Metadata
type: object
- title: UpdateConnectorRequest
- UpdateRuleRequest:
+ required:
+ - asset_id
+ - title
+ - source
+ - id
+ - tenant_id
+ - first_found
+ - last_found
+ - remediated_at
+ title: VulnerabilityOut
+ WatchlistUpdate:
properties:
- name:
+ is_watchlisted:
+ type: boolean
+ title: Is Watchlisted
+ watchlist_reason:
anyOf:
- type: string
- type: 'null'
- title: Name
- description:
+ title: Watchlist Reason
+ type: object
+ required:
+ - is_watchlisted
+ title: WatchlistUpdate
+ WhitelistCreate:
+ properties:
+ action_type:
+ type: string
+ title: Action Type
+ blast_radius:
+ type: string
+ title: Blast Radius
+ constraints:
+ additionalProperties: true
+ type: object
+ title: Constraints
+ expires_at:
anyOf:
- type: string
+ format: date-time
- type: 'null'
- title: Description
- rule_body:
+ title: Expires At
+ type: object
+ required:
+ - action_type
+ - blast_radius
+ title: WhitelistCreate
+ WhitelistOut:
+ properties:
+ action_type:
+ type: string
+ title: Action Type
+ blast_radius:
+ type: string
+ title: Blast Radius
+ constraints:
+ additionalProperties: true
+ type: object
+ title: Constraints
+ expires_at:
anyOf:
- type: string
+ format: date-time
- type: 'null'
- title: Rule Body
- status:
+ title: Expires At
+ id:
+ type: string
+ format: uuid
+ title: Id
+ tenant_id:
+ type: string
+ format: uuid
+ title: Tenant Id
+ approved_by:
anyOf:
- type: string
+ format: uuid
- type: 'null'
- title: Status
- severity:
+ title: Approved By
+ created_at:
+ type: string
+ title: Created At
+ type: object
+ required:
+ - action_type
+ - blast_radius
+ - id
+ - tenant_id
+ - approved_by
+ - created_at
+ title: WhitelistOut
+ app__api__v1__endpoints__cases__TimelineEvent:
+ properties:
+ id:
+ type: string
+ title: Id
+ type:
+ type: string
+ title: Type
+ timestamp:
+ type: string
+ format: date-time
+ title: Timestamp
+ title:
+ type: string
+ title: Title
+ description:
anyOf:
- type: string
- type: 'null'
- title: Severity
- confidence:
- anyOf:
- - type: integer
- - type: 'null'
- title: Confidence
- tags:
+ title: Description
+ actor:
anyOf:
- - items:
- type: string
- type: array
+ - type: string
- type: 'null'
- title: Tags
+ title: Actor
type: object
- title: UpdateRuleRequest
- UpdateTenantSettingsRequest:
+ required:
+ - id
+ - type
+ - timestamp
+ - title
+ title: TimelineEvent
+ app__api__v1__endpoints__cases__TimelineResponse:
properties:
- settings:
- additionalProperties: true
- type: object
- title: Settings
- default: {}
+ events:
+ items:
+ $ref: '#/components/schemas/app__api__v1__endpoints__cases__TimelineEvent'
+ type: array
+ title: Events
type: object
- title: UpdateTenantSettingsRequest
- UpdateUserRequest:
+ required:
+ - events
+ title: TimelineResponse
+ app__api__v1__endpoints__detection_rules__HuntResponse:
properties:
- username:
+ hunt_id:
+ type: string
+ title: Hunt Id
+ rules_evaluated:
+ type: integer
+ title: Rules Evaluated
+ rules_matched:
+ type: integer
+ title: Rules Matched
+ total_events_scanned:
+ type: integer
+ title: Total Events Scanned
+ matched_events:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Matched Events
+ match_summary:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ title: Match Summary
+ execution_time_ms:
+ type: number
+ title: Execution Time Ms
+ errors:
+ items:
+ type: string
+ type: array
+ title: Errors
+ type: object
+ required:
+ - hunt_id
+ - rules_evaluated
+ - rules_matched
+ - total_events_scanned
+ - matched_events
+ - match_summary
+ - execution_time_ms
+ - errors
+ title: HuntResponse
+ app__api__v1__endpoints__hunts__HuntResponse:
+ properties:
+ id:
+ type: string
+ format: uuid
+ title: Id
+ title:
+ type: string
+ title: Title
+ hypothesis:
+ type: string
+ title: Hypothesis
+ mitre_tactic:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Mitre Tactic
+ mitre_technique:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Mitre Technique
+ status:
+ type: string
+ title: Status
+ priority:
+ type: string
+ title: Priority
+ query_esql:
anyOf:
- type: string
- type: 'null'
- title: Username
- role:
+ title: Query Esql
+ query_spl:
anyOf:
- type: string
- type: 'null'
- title: Role
- is_active:
+ title: Query Spl
+ query_kql:
anyOf:
- - type: boolean
+ - type: string
- type: 'null'
- title: Is Active
- type: object
- title: UpdateUserRequest
- UpsertAlertGraphRequest:
- properties:
- alert_id:
- type: string
- title: Alert Id
- title:
- type: string
- title: Title
- severity:
- type: string
- title: Severity
- mitre_techniques:
+ title: Query Kql
+ findings:
items:
- type: string
+ additionalProperties: true
+ type: object
type: array
- title: Mitre Techniques
- host_id:
+ title: Findings
+ false_positive_rate:
anyOf:
- - type: string
+ - type: number
- type: 'null'
- title: Host Id
- user_id:
+ title: False Positive Rate
+ assigned_to:
anyOf:
- type: string
- type: 'null'
- title: User Id
- ioc_values:
+ title: Assigned To
+ tags:
items:
type: string
type: array
- title: Ioc Values
- type: object
- required:
- - alert_id
- - title
- - severity
- title: UpsertAlertGraphRequest
- UpsertCaseGraphRequest:
- properties:
- case_id:
- type: string
- title: Case Id
- title:
+ title: Tags
+ created_at:
type: string
- title: Title
- severity:
+ format: date-time
+ title: Created At
+ updated_at:
type: string
- title: Severity
- alert_ids:
- items:
- type: string
- type: array
- title: Alert Ids
+ format: date-time
+ title: Updated At
+ completed_at:
+ anyOf:
+ - type: string
+ format: date-time
+ - type: 'null'
+ title: Completed At
+ created_by:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Created By
type: object
required:
- - case_id
+ - id
- title
- - severity
- title: UpsertCaseGraphRequest
- UpsertHostRequest:
- properties:
- host_id:
- type: string
- title: Host Id
- hostname:
- type: string
- title: Hostname
- ip_address:
- type: string
- title: Ip Address
- default: ''
- os:
- type: string
- title: Os
- default: ''
- criticality:
- type: string
- title: Criticality
- default: medium
- type: object
- required:
- - host_id
- - hostname
- title: UpsertHostRequest
- UpsertUserRequest:
- properties:
- user_id:
- type: string
- title: User Id
- username:
- type: string
- title: Username
- email:
- type: string
- title: Email
- default: ''
- department:
- type: string
- title: Department
- default: ''
- risk_score:
- type: number
- title: Risk Score
- default: 0.0
- type: object
- required:
- - user_id
- - username
- title: UpsertUserRequest
- UserMeResponse:
+ - hypothesis
+ - mitre_tactic
+ - mitre_technique
+ - status
+ - priority
+ - query_esql
+ - query_spl
+ - query_kql
+ - findings
+ - false_positive_rate
+ - assigned_to
+ - tags
+ - created_at
+ - updated_at
+ - completed_at
+ - created_by
+ title: HuntResponse
+ app__api__v1__endpoints__identity_timeline__TimelineEvent:
properties:
- id:
+ event_id:
type: string
format: uuid
- title: Id
- tenant_id:
+ title: Event Id
+ timestamp:
type: string
- format: uuid
- title: Tenant Id
- email:
+ format: date-time
+ title: Timestamp
+ event_type:
type: string
- title: Email
- username:
+ enum:
+ - alert
+ - login
+ - process
+ - network
+ - file
+ - other
+ title: Event Type
+ source:
type: string
- title: Username
- role:
+ title: Source
+ description:
type: string
- title: Role
- is_active:
- type: boolean
- title: Is Active
+ title: Description
+ severity:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Severity
+ mitre_technique:
+ anyOf:
+ - type: string
+ - type: 'null'
+ title: Mitre Technique
+ raw:
+ anyOf:
+ - additionalProperties: true
+ type: object
+ - type: 'null'
+ title: Raw
type: object
required:
- - id
- - tenant_id
- - email
- - username
- - role
- - is_active
- title: UserMeResponse
- UserResponse:
+ - event_id
+ - timestamp
+ - event_type
+ - source
+ - description
+ title: TimelineEvent
+ app__api__v1__endpoints__investigations__TimelineResponse:
properties:
- id:
- type: string
- format: uuid
- title: Id
- tenant_id:
+ run_id:
type: string
format: uuid
- title: Tenant Id
- email:
- type: string
- title: Email
- username:
- type: string
- title: Username
- role:
+ title: Run Id
+ case_id:
type: string
- title: Role
- is_active:
- type: boolean
- title: Is Active
- last_login:
- anyOf:
- - type: string
- format: date-time
- - type: 'null'
- title: Last Login
- created_at:
+ title: Case Id
+ status:
type: string
- format: date-time
- title: Created At
- type: object
- required:
- - id
- - tenant_id
- - email
- - username
- - role
- - is_active
- - last_login
- - created_at
- title: UserResponse
- ValidationError:
- properties:
- loc:
+ title: Status
+ total_duration_ms:
+ type: integer
+ title: Total Duration Ms
+ attempt_count:
+ type: integer
+ title: Attempt Count
+ nodes:
items:
- anyOf:
- - type: string
- - type: integer
+ $ref: '#/components/schemas/TimelineNode'
type: array
- title: Location
- msg:
- type: string
- title: Message
- type:
- type: string
- title: Error Type
- input:
- title: Input
- ctx:
- type: object
- title: Context
+ title: Nodes
type: object
required:
- - loc
- - msg
- - type
- title: ValidationError
+ - run_id
+ - case_id
+ - status
+ - total_duration_ms
+ - attempt_count
+ - nodes
+ title: TimelineResponse
+ description: 'Full timeline for a closed or in-progress run.
+
+
+ ``nodes`` are ordered by ``seq`` ascending. ``total_duration_ms`` is the
+
+ wall-clock span from first to last event. ``attempt_count`` counts unique
+
+ retry attempts inferred from ``agent_start`` events.'
securitySchemes:
HTTPBearer:
type: http
diff --git a/marketplace/curated.json b/marketplace/curated.json
index 119fb750b..746e88ee3 100644
--- a/marketplace/curated.json
+++ b/marketplace/curated.json
@@ -1,38 +1,39 @@
{
"$schema": "https://aisoc.example.com/schemas/curated/v1.json",
"version": "1.0.0",
- "generated": "2026-05-10T14:50:52Z",
+ "generated": "2026-05-10T18:54:09Z",
"stats": {
- "considered": 1011,
- "eligible": 1008,
- "selected": 411,
+ "considered": 1047,
+ "eligible": 1043,
+ "selected": 416,
"min_per_family": 25,
"min_total": 300,
"quality_floor": 0.55,
- "unique_techniques": 113,
+ "unique_techniques": 117,
"selected_by_tier": {
- "imported": 41,
- "native": 370
+ "imported": 42,
+ "native": 374
},
"selected_by_severity": {
"critical": 99,
- "high": 206,
+ "high": 208,
"low": 6,
- "medium": 100
+ "medium": 103
},
"selected_by_category": {
+ "_migrated": 1,
"application": 29,
- "cloud": 162,
+ "cloud": 164,
"data-exfil": 20,
- "endpoint": 112,
- "identity": 76,
+ "endpoint": 115,
+ "identity": 75,
"network": 12
}
},
"families": {
"ransomware": {
"label": "Ransomware",
- "count": 46,
+ "count": 48,
"rule_ids": [
"det-application-050",
"det-cloud-004",
@@ -71,6 +72,7 @@
"det-endpoint-179",
"det-endpoint-181",
"det-endpoint-182",
+ "det-endpoint-286",
"det-identity-121",
"mitre-car-car-2021-01-009",
"mitre-car-car-2021-05-003",
@@ -79,7 +81,8 @@
"sigmahq-sigma-37222991-11e9-4b6d-8bdf-60fbe48f753e",
"sigmahq-sigma-87df9ee1-5416-453a-8a08-e8d4a51e9ce1",
"sigmahq-sigma-add64136-62e5-48ea-807e-88638d02df1e",
- "sigmahq-sigma-c947b146-0abc-4c87-9c64-b17e9d7274a2"
+ "sigmahq-sigma-c947b146-0abc-4c87-9c64-b17e9d7274a2",
+ "splunk-security-content-0c320fea-6e87-4b99-a884-74d09d4b655d"
],
"min_target": 25,
"covered": true
@@ -177,7 +180,7 @@
},
"lateral": {
"label": "Lateral Movement",
- "count": 32,
+ "count": 33,
"rule_ids": [
"det-endpoint-010",
"det-endpoint-111",
@@ -185,6 +188,7 @@
"det-endpoint-113",
"det-endpoint-114",
"det-endpoint-226",
+ "det-endpoint-298",
"det-identity-102",
"det-identity-103",
"det-identity-104",
@@ -226,13 +230,13 @@
"det-cloud-184",
"det-cloud-186",
"det-cloud-192",
- "det-cloud-192",
"det-cloud-195",
"det-cloud-196",
- "det-cloud-196",
"det-cloud-203",
"det-cloud-204",
"det-cloud-206",
+ "det-cloud-221",
+ "det-cloud-222",
"det-data-exfil-001",
"det-data-exfil-002",
"det-data-exfil-003",
@@ -354,7 +358,7 @@
"det-cloud-185",
"det-cloud-190",
"det-cloud-191",
- "det-cloud-194",
+ "det-cloud-225",
"det-endpoint-178",
"det-endpoint-245",
"det-endpoint-246",
@@ -444,6 +448,7 @@
"det-endpoint-263",
"det-endpoint-264",
"det-endpoint-265",
+ "det-endpoint-300",
"det-identity-001",
"det-identity-002",
"det-identity-003",
@@ -453,7 +458,6 @@
"det-identity-009",
"det-identity-011",
"det-identity-012",
- "det-identity-013",
"det-identity-020",
"det-identity-021",
"det-identity-027",
@@ -617,15 +621,17 @@
"T1012": 1,
"T1016": 1,
"T1018": 1,
- "T1020": 1,
+ "T1020": 2,
"T1021": 11,
"T1021.001": 1,
"T1021.002": 6,
"T1021.003": 1,
"T1021.004": 1,
"T1021.006": 4,
+ "T1027": 1,
"T1029": 1,
"T1033": 1,
+ "T1036.005": 1,
"T1039": 1,
"T1040": 3,
"T1041": 7,
@@ -635,15 +641,15 @@
"T1052": 1,
"T1053": 1,
"T1057": 1,
- "T1059": 2,
+ "T1059": 3,
"T1059.001": 2,
"T1059.004": 2,
"T1069": 1,
"T1069.003": 1,
"T1070": 4,
"T1071.001": 1,
- "T1078": 15,
- "T1078.001": 3,
+ "T1078": 16,
+ "T1078.001": 2,
"T1078.004": 27,
"T1082": 1,
"T1087": 1,
@@ -651,7 +657,7 @@
"T1098": 15,
"T1098.001": 13,
"T1098.003": 7,
- "T1098.004": 4,
+ "T1098.004": 5,
"T1098.007": 1,
"T1105": 1,
"T1110": 7,
@@ -660,8 +666,9 @@
"T1110.004": 2,
"T1112": 1,
"T1114.002": 3,
- "T1114.003": 2,
+ "T1114.003": 3,
"T1133": 3,
+ "T1136": 1,
"T1136.001": 2,
"T1187": 1,
"T1190": 6,
@@ -669,10 +676,11 @@
"T1199": 14,
"T1210": 1,
"T1212": 2,
+ "T1213.002": 1,
"T1484.002": 1,
"T1485": 30,
"T1486": 5,
- "T1489": 1,
+ "T1489": 3,
"T1490": 11,
"T1496": 6,
"T1505.003": 2,
@@ -681,7 +689,7 @@
"T1528": 5,
"T1530": 24,
"T1531": 2,
- "T1537": 9,
+ "T1537": 10,
"T1539": 2,
"T1543": 1,
"T1550": 4,
@@ -711,7 +719,7 @@
"T1567": 10,
"T1567.002": 2,
"T1569": 1,
- "T1570": 5,
+ "T1570": 6,
"T1574": 1,
"T1606": 1,
"T1606.002": 1,
@@ -5196,31 +5204,6 @@
"log_source_product": "m365",
"has_executable_body": true
},
- {
- "id": "det-cloud-194",
- "name": "M365 Unified Audit Log Disabled",
- "path": "detections/cloud/m365-unified-audit-log-disabled.yaml",
- "tier": "native",
- "source": "core",
- "category": "cloud",
- "severity": "critical",
- "mitre_techniques": [
- "T1562.008"
- ],
- "mitre_tactics": [],
- "families": [
- "cloud"
- ],
- "quality_score": 1.0,
- "quality_notes": [
- "tier:native(+0.5)",
- "mitre_techniques:1(+0.2)",
- "severity:critical(+0.150)",
- "executable(+0.15)"
- ],
- "log_source_product": "m365",
- "has_executable_body": true
- },
{
"id": "det-cloud-195",
"name": "M365 eDiscovery Search Results Exported",
@@ -5250,26 +5233,26 @@
},
{
"id": "det-cloud-196",
- "name": "M365 SharePoint External Sharing Enabled Tenant-Wide",
- "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-tenant.yaml",
+ "name": "M365 SharePoint External Sharing Enabled at Org Level",
+ "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-org.yaml",
"tier": "native",
"source": "core",
"category": "cloud",
- "severity": "high",
+ "severity": "medium",
"mitre_techniques": [
- "T1567",
- "T1537"
+ "T1537",
+ "T1213.002"
],
"mitre_tactics": [],
"families": [
"exfil",
"cloud"
],
- "quality_score": 0.977,
+ "quality_score": 0.955,
"quality_notes": [
"tier:native(+0.5)",
"mitre_techniques:2(+0.2)",
- "severity:high(+0.128)",
+ "severity:medium(+0.105)",
"executable(+0.15)"
],
"log_source_product": "m365",
@@ -5653,6 +5636,85 @@
"log_source_product": "azure",
"has_executable_body": true
},
+ {
+ "id": "det-cloud-221",
+ "name": "M365 Exchange Transport Rule Redirects Mail Externally",
+ "path": "detections/cloud/m365-exchange-transport-rule-redirect-external.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "cloud",
+ "severity": "high",
+ "mitre_techniques": [
+ "T1114.003",
+ "T1020"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "exfil",
+ "cloud"
+ ],
+ "quality_score": 0.977,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:2(+0.2)",
+ "severity:high(+0.128)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "m365",
+ "has_executable_body": true
+ },
+ {
+ "id": "det-cloud-222",
+ "name": "M365 SharePoint External Sharing Enabled Tenant-Wide",
+ "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-tenant.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "cloud",
+ "severity": "high",
+ "mitre_techniques": [
+ "T1567",
+ "T1537"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "exfil",
+ "cloud"
+ ],
+ "quality_score": 0.977,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:2(+0.2)",
+ "severity:high(+0.128)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "m365",
+ "has_executable_body": true
+ },
+ {
+ "id": "det-cloud-225",
+ "name": "M365 Unified Audit Log Disabled",
+ "path": "detections/cloud/m365-unified-audit-log-disabled.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "cloud",
+ "severity": "critical",
+ "mitre_techniques": [
+ "T1562.008"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "cloud"
+ ],
+ "quality_score": 1.0,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:1(+0.2)",
+ "severity:critical(+0.150)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "m365",
+ "has_executable_body": true
+ },
{
"id": "det-data-exfil-001",
"name": "Large Outbound Transfer to Personal Cloud Storage",
@@ -8004,6 +8066,86 @@
"log_source_product": "endpoint",
"has_executable_body": true
},
+ {
+ "id": "det-endpoint-286",
+ "name": "Linux osqueryd Service Stop Detected via auditd",
+ "path": "detections/endpoint/osquery-linux-auditd-service-stop.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "endpoint",
+ "severity": "high",
+ "mitre_techniques": [
+ "T1489"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "ransomware"
+ ],
+ "quality_score": 0.977,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:1(+0.2)",
+ "severity:high(+0.128)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "linux",
+ "has_executable_body": true
+ },
+ {
+ "id": "det-endpoint-298",
+ "name": "Executable Dropped in World-Writable Directory (FIM)",
+ "path": "detections/endpoint/fim-binary-dropped-writable-dir.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "endpoint",
+ "severity": "medium",
+ "mitre_techniques": [
+ "T1027",
+ "T1059",
+ "T1036.005",
+ "T1570"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "lateral"
+ ],
+ "quality_score": 0.955,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:4(+0.2)",
+ "severity:medium(+0.105)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "osquery",
+ "has_executable_body": true
+ },
+ {
+ "id": "det-endpoint-300",
+ "name": "SSH authorized_keys File Modified (FIM)",
+ "path": "detections/endpoint/fim-ssh-authorized-keys-changed.yaml",
+ "tier": "native",
+ "source": "core",
+ "category": "endpoint",
+ "severity": "high",
+ "mitre_techniques": [
+ "T1098.004",
+ "T1078",
+ "T1136"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "identity"
+ ],
+ "quality_score": 0.977,
+ "quality_notes": [
+ "tier:native(+0.5)",
+ "mitre_techniques:3(+0.2)",
+ "severity:high(+0.128)",
+ "executable(+0.15)"
+ ],
+ "log_source_product": "osquery",
+ "has_executable_body": true
+ },
{
"id": "det-identity-001",
"name": "Authentication Brute-Force Burst",
@@ -8266,31 +8408,6 @@
"log_source_product": "linux",
"has_executable_body": true
},
- {
- "id": "det-identity-013",
- "name": "Login with Vendor Default Credentials",
- "path": "detections/identity/default-credential-login.yaml",
- "tier": "native",
- "source": "core",
- "category": "identity",
- "severity": "high",
- "mitre_techniques": [
- "T1078.001"
- ],
- "mitre_tactics": [],
- "families": [
- "identity"
- ],
- "quality_score": 0.977,
- "quality_notes": [
- "tier:native(+0.5)",
- "mitre_techniques:1(+0.2)",
- "severity:high(+0.128)",
- "executable(+0.15)"
- ],
- "log_source_product": "linux",
- "has_executable_body": true
- },
{
"id": "det-identity-020",
"name": "Kubernetes ClusterRoleBinding to cluster-admin",
@@ -11336,6 +11453,31 @@
],
"log_source_product": "windows",
"has_executable_body": true
+ },
+ {
+ "id": "splunk-security-content-0c320fea-6e87-4b99-a884-74d09d4b655d",
+ "name": "Linux Auditd Osquery Service Stop",
+ "path": "detections/splunk-imports/_migrated/linux-auditd-osquery-service-stop.yaml",
+ "tier": "imported",
+ "source": "splunk-security-content",
+ "category": "_migrated",
+ "severity": "medium",
+ "mitre_techniques": [
+ "T1489"
+ ],
+ "mitre_tactics": [],
+ "families": [
+ "ransomware"
+ ],
+ "quality_score": 0.605,
+ "quality_notes": [
+ "tier:imported(+0.3)",
+ "mitre_techniques:1(+0.2)",
+ "severity:medium(+0.105)",
+ "no_executable_body(0)"
+ ],
+ "log_source_product": "splunk",
+ "has_executable_body": false
}
]
}
diff --git a/marketplace/index.json b/marketplace/index.json
index acb637e34..28752861d 100644
--- a/marketplace/index.json
+++ b/marketplace/index.json
@@ -1,7 +1,7 @@
{
"$schema": "https://example.com/schemas/marketplace/v1.json",
"version": "1.0.0",
- "generated": "2026-05-10T14:50:51Z",
+ "generated": "2026-05-10T18:54:21Z",
"categories": [
{
"id": "playbooks",
@@ -20,22 +20,22 @@
}
],
"stats": {
- "total": 7077,
+ "total": 7098,
"playbooks": 62,
- "detections": 6973,
- "plugins": 42,
- "verified": 962,
+ "detections": 6993,
+ "plugins": 43,
+ "verified": 982,
"community": 0,
"by_tier": {
- "beta": 2,
+ "beta": 3,
"imported": 6113,
- "stable": 962
+ "stable": 982
},
"detections_by_tier": {
"imported": 6113,
- "stable": 860
+ "stable": 880
},
- "quarantined": 5937
+ "quarantined": 5921
},
"mitre_coverage": {
"techniques": {
@@ -47,7 +47,7 @@
"T1003.004": 13,
"T1003.005": 9,
"T1003.006": 13,
- "T1003.008": 4,
+ "T1003.008": 5,
"T1005": 18,
"T1006": 1,
"T1007": 11,
@@ -55,7 +55,7 @@
"T1010": 2,
"T1011": 1,
"T1012": 24,
- "T1014": 6,
+ "T1014": 7,
"T1016": 20,
"T1016.001": 1,
"T1018": 42,
@@ -70,7 +70,7 @@
"T1021.006": 22,
"T1021.007": 5,
"T1025": 3,
- "T1027": 102,
+ "T1027": 103,
"T1027.001": 3,
"T1027.002": 1,
"T1027.003": 5,
@@ -81,20 +81,20 @@
"T1027.011": 3,
"T1027.013": 1,
"T1029": 1,
- "T1030": 5,
+ "T1030": 6,
"T1033": 45,
"T1036": 50,
"T1036.002": 5,
"T1036.003": 36,
"T1036.004": 2,
- "T1036.005": 20,
+ "T1036.005": 21,
"T1036.006": 1,
"T1036.007": 3,
"T1036.008": 3,
"T1036.009": 2,
- "T1037": 2,
+ "T1037": 3,
"T1037.001": 5,
- "T1037.002": 1,
+ "T1037.002": 2,
"T1037.004": 3,
"T1037.005": 1,
"T1039": 4,
@@ -111,7 +111,7 @@
"T1053": 22,
"T1053.001": 1,
"T1053.002": 12,
- "T1053.003": 20,
+ "T1053.003": 21,
"T1053.005": 58,
"T1053.006": 5,
"T1053.007": 2,
@@ -125,26 +125,26 @@
"T1055.012": 6,
"T1055.013": 1,
"T1056": 2,
- "T1056.001": 3,
+ "T1056.001": 4,
"T1056.002": 4,
"T1057": 8,
- "T1059": 120,
+ "T1059": 121,
"T1059.001": 243,
- "T1059.002": 10,
+ "T1059.002": 11,
"T1059.003": 41,
- "T1059.004": 28,
+ "T1059.004": 29,
"T1059.005": 31,
"T1059.006": 4,
"T1059.007": 25,
"T1059.009": 4,
"T1059.012": 9,
"T1059.013": 1,
- "T1068": 37,
+ "T1068": 38,
"T1069": 8,
"T1069.001": 29,
"T1069.002": 35,
"T1069.003": 4,
- "T1070": 34,
+ "T1070": 35,
"T1070.001": 8,
"T1070.002": 1,
"T1070.003": 13,
@@ -160,7 +160,7 @@
"T1072": 9,
"T1074": 3,
"T1074.001": 6,
- "T1078": 127,
+ "T1078": 128,
"T1078.001": 10,
"T1078.002": 14,
"T1078.003": 11,
@@ -181,7 +181,7 @@
"T1098.001": 26,
"T1098.002": 6,
"T1098.003": 34,
- "T1098.004": 10,
+ "T1098.004": 11,
"T1098.005": 7,
"T1098.007": 1,
"T1102": 17,
@@ -218,9 +218,9 @@
"T1134.003": 3,
"T1134.004": 3,
"T1134.005": 5,
- "T1135": 14,
- "T1136": 10,
- "T1136.001": 31,
+ "T1135": 15,
+ "T1136": 11,
+ "T1136.001": 32,
"T1136.002": 7,
"T1136.003": 24,
"T1137": 11,
@@ -288,7 +288,7 @@
"T1485": 83,
"T1485.001": 2,
"T1486": 27,
- "T1489": 37,
+ "T1489": 38,
"T1490": 48,
"T1491": 2,
"T1491.001": 4,
@@ -326,8 +326,8 @@
"T1542.001": 4,
"T1542.003": 2,
"T1542.005": 1,
- "T1543": 24,
- "T1543.001": 7,
+ "T1543": 25,
+ "T1543.001": 8,
"T1543.002": 4,
"T1543.003": 60,
"T1543.004": 4,
@@ -359,7 +359,7 @@
"T1547.014": 3,
"T1547.015": 3,
"T1548": 34,
- "T1548.001": 10,
+ "T1548.001": 12,
"T1548.002": 76,
"T1548.003": 38,
"T1548.004": 1,
@@ -377,14 +377,14 @@
"T1552.006": 7,
"T1552.007": 9,
"T1553": 4,
- "T1553.001": 6,
+ "T1553.001": 7,
"T1553.002": 2,
"T1553.003": 4,
"T1553.004": 13,
"T1553.005": 11,
"T1554": 10,
"T1555": 13,
- "T1555.001": 6,
+ "T1555.001": 7,
"T1555.003": 15,
"T1555.004": 6,
"T1555.005": 5,
@@ -422,7 +422,7 @@
"T1562.012": 5,
"T1563.002": 4,
"T1564": 14,
- "T1564.001": 9,
+ "T1564.001": 10,
"T1564.002": 4,
"T1564.003": 11,
"T1564.004": 25,
@@ -444,7 +444,7 @@
"T1569": 5,
"T1569.001": 1,
"T1569.002": 50,
- "T1570": 9,
+ "T1570": 10,
"T1571": 9,
"T1572": 38,
"T1573": 7,
@@ -453,7 +453,7 @@
"T1574.001": 95,
"T1574.002": 4,
"T1574.005": 2,
- "T1574.006": 9,
+ "T1574.006": 10,
"T1574.007": 2,
"T1574.008": 1,
"T1574.009": 1,
@@ -514,7 +514,7 @@
"T1620": 6,
"T1621": 25,
"T1622": 1,
- "T1647": 1,
+ "T1647": 2,
"T1649": 22,
"T1653": 1,
"T1654": 1,
@@ -534,7 +534,7 @@
"T1690": 1
},
"unique_techniques": 493,
- "total_with_mitre": 5757,
+ "total_with_mitre": 5777,
"by_tier": {
"stable": {
"T1003": 2,
@@ -542,8 +542,9 @@
"T1003.002": 1,
"T1003.003": 2,
"T1003.006": 3,
- "T1003.008": 1,
+ "T1003.008": 2,
"T1011": 1,
+ "T1014": 1,
"T1018": 5,
"T1020": 2,
"T1021": 1,
@@ -551,9 +552,12 @@
"T1021.002": 7,
"T1021.004": 1,
"T1021.006": 3,
- "T1027": 4,
- "T1037": 1,
+ "T1027": 5,
+ "T1030": 1,
+ "T1036.005": 1,
+ "T1037": 2,
"T1037.001": 1,
+ "T1037.002": 1,
"T1037.004": 2,
"T1040": 2,
"T1041": 8,
@@ -564,20 +568,21 @@
"T1052": 2,
"T1052.001": 1,
"T1053.001": 1,
- "T1053.003": 4,
+ "T1053.003": 5,
"T1053.005": 4,
"T1053.006": 1,
"T1055": 2,
"T1055.001": 1,
"T1055.012": 1,
- "T1059": 7,
+ "T1056.001": 1,
+ "T1059": 8,
"T1059.001": 5,
- "T1059.002": 2,
- "T1059.004": 7,
+ "T1059.002": 3,
+ "T1059.004": 8,
"T1059.005": 1,
- "T1068": 2,
+ "T1068": 3,
"T1069.003": 1,
- "T1070": 2,
+ "T1070": 3,
"T1070.001": 3,
"T1070.002": 1,
"T1070.003": 2,
@@ -585,7 +590,7 @@
"T1071.001": 10,
"T1071.004": 5,
"T1074.001": 1,
- "T1078": 36,
+ "T1078": 37,
"T1078.001": 4,
"T1078.002": 3,
"T1078.003": 1,
@@ -600,7 +605,7 @@
"T1098": 28,
"T1098.001": 21,
"T1098.003": 8,
- "T1098.004": 6,
+ "T1098.004": 7,
"T1098.007": 1,
"T1105": 3,
"T1110": 9,
@@ -614,9 +619,9 @@
"T1127.001": 1,
"T1133": 13,
"T1134": 1,
- "T1135": 2,
- "T1136": 2,
- "T1136.001": 4,
+ "T1135": 3,
+ "T1136": 3,
+ "T1136.001": 5,
"T1136.003": 2,
"T1140": 1,
"T1176": 1,
@@ -647,7 +652,7 @@
"T1484.002": 2,
"T1485": 28,
"T1486": 8,
- "T1489": 1,
+ "T1489": 2,
"T1490": 7,
"T1496": 2,
"T1498": 4,
@@ -663,7 +668,8 @@
"T1537": 10,
"T1539": 4,
"T1542.001": 1,
- "T1543.001": 3,
+ "T1543": 1,
+ "T1543.001": 4,
"T1543.002": 2,
"T1543.003": 3,
"T1543.004": 2,
@@ -683,7 +689,7 @@
"T1547.010": 1,
"T1547.015": 2,
"T1548": 1,
- "T1548.001": 4,
+ "T1548.001": 6,
"T1548.002": 4,
"T1548.003": 2,
"T1548.004": 1,
@@ -697,12 +703,12 @@
"T1552.005": 2,
"T1552.007": 1,
"T1553": 1,
- "T1553.001": 4,
+ "T1553.001": 5,
"T1553.002": 1,
"T1553.004": 2,
"T1554": 1,
"T1555": 1,
- "T1555.001": 4,
+ "T1555.001": 5,
"T1555.003": 3,
"T1555.004": 1,
"T1555.005": 1,
@@ -728,6 +734,7 @@
"T1562.007": 1,
"T1562.008": 13,
"T1562.012": 2,
+ "T1564.001": 1,
"T1564.008": 1,
"T1565.001": 4,
"T1565.002": 1,
@@ -739,13 +746,13 @@
"T1567.002": 7,
"T1568.001": 2,
"T1568.002": 2,
- "T1570": 2,
+ "T1570": 3,
"T1572": 9,
"T1573": 1,
"T1573.002": 7,
"T1574": 1,
"T1574.002": 4,
- "T1574.006": 2,
+ "T1574.006": 3,
"T1578.002": 1,
"T1583.001": 4,
"T1592": 2,
@@ -759,6 +766,7 @@
"T1612": 1,
"T1620": 2,
"T1621": 5,
+ "T1647": 1,
"T1656": 1,
"T1659": 1
},
@@ -34638,30 +34646,6 @@
"enabled": true,
"path": "detections/cloud/m365-exchange-transport-rule-external-redirect.yaml"
},
- {
- "id": "det-cloud-192",
- "type": "detection",
- "name": "M365 Exchange Transport Rule Redirects Mail Externally",
- "description": "A transport rule was created or modified to redirect or BCC mail to an external domain. Attackers use this for persistent email exfiltration that survives password resets.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "high",
- "category": "cloud",
- "mitre_techniques": [
- "T1114.003",
- "T1020"
- ],
- "log_source": "m365",
- "playbook": "tpl-collection",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-exchange-transport-rule-redirect-external.yaml"
- },
{
"id": "det-cloud-193",
"type": "detection",
@@ -34685,30 +34669,6 @@
"enabled": true,
"path": "detections/cloud/m365-exchange-audit-bypass-enabled.yaml"
},
- {
- "id": "det-cloud-193",
- "type": "detection",
- "name": "M365 eDiscovery Compliance Search Created",
- "description": "Detects creation of an eDiscovery compliance search in Microsoft Purview. Insider threats and compromised admin accounts abuse eDiscovery to search and export mailbox contents at scale.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "high",
- "category": "cloud",
- "mitre_techniques": [
- "T1114.002",
- "T1213"
- ],
- "log_source": "m365",
- "playbook": "tpl-collection",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-exchange-ediscovery-search-created.yaml"
- },
{
"id": "det-cloud-194",
"type": "detection",
@@ -34733,29 +34693,6 @@
"enabled": true,
"path": "detections/cloud/m365-exchange-ediscovery-search-all-mailboxes.yaml"
},
- {
- "id": "det-cloud-194",
- "type": "detection",
- "name": "M365 Unified Audit Log Disabled",
- "description": "Detects disabling of the Microsoft 365 unified audit log. Attackers disable auditing early in a compromise to erase their trail across Exchange, SharePoint, Teams, and Entra ID.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "critical",
- "category": "cloud",
- "mitre_techniques": [
- "T1562.008"
- ],
- "log_source": "m365",
- "playbook": "tpl-defense-evasion",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-unified-audit-log-disabled.yaml"
- },
{
"id": "det-cloud-195",
"type": "detection",
@@ -34780,29 +34717,6 @@
"enabled": true,
"path": "detections/cloud/m365-exchange-ediscovery-export.yaml"
},
- {
- "id": "det-cloud-195",
- "type": "detection",
- "name": "M365 Exchange Inbound Connector From Untrusted Domain",
- "description": "Detects creation of an Exchange Online inbound connector that accepts mail from a specific external sender domain. Adversaries create connectors to bypass spam filters for phishing infrastructure.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "medium",
- "category": "cloud",
- "mitre_techniques": [
- "T1566"
- ],
- "log_source": "m365",
- "playbook": "tpl-initial-access",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-exchange-mail-connector-external-domain.yaml"
- },
{
"id": "det-cloud-196",
"type": "detection",
@@ -34827,30 +34741,6 @@
"enabled": true,
"path": "detections/cloud/m365-sharepoint-external-sharing-enabled-org.yaml"
},
- {
- "id": "det-cloud-196",
- "type": "detection",
- "name": "M365 SharePoint External Sharing Enabled Tenant-Wide",
- "description": "Detects tenant-level SharePoint sharing policy changed to allow external or anonymous sharing. Widens the data-loss attack surface across all sites.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "high",
- "category": "cloud",
- "mitre_techniques": [
- "T1567",
- "T1537"
- ],
- "log_source": "m365",
- "playbook": "tpl-exfiltration",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-tenant.yaml"
- },
{
"id": "det-cloud-197",
"type": "detection",
@@ -34874,29 +34764,6 @@
"enabled": true,
"path": "detections/cloud/m365-sharepoint-site-admin-external-user.yaml"
},
- {
- "id": "det-cloud-197",
- "type": "detection",
- "name": "M365 SharePoint Site Collection Admin Added",
- "description": "A new site collection administrator was added. Site collection admins bypass item-level permissions and can access all content including OneDrive for Business sites.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "medium",
- "category": "cloud",
- "mitre_techniques": [
- "T1098.003"
- ],
- "log_source": "m365",
- "playbook": "tpl-persistence",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-sharepoint-site-collection-admin-added.yaml"
- },
{
"id": "det-cloud-198",
"type": "detection",
@@ -34920,29 +34787,6 @@
"enabled": true,
"path": "detections/cloud/m365-teams-external-access-domain-added.yaml"
},
- {
- "id": "det-cloud-198",
- "type": "detection",
- "name": "M365 Teams External Access Policy Enabled",
- "description": "Teams external access was changed to allow federation with all external domains or specific unblocked domains. Attackers leverage external access to phish internal users via Teams chat.",
- "version": "1.0.0",
- "author": "AiSOC",
- "tags": [
- "tlp.white"
- ],
- "severity": "medium",
- "category": "cloud",
- "mitre_techniques": [
- "T1566.003"
- ],
- "log_source": "m365",
- "playbook": "tpl-initial-access",
- "verified": true,
- "source": "core",
- "tier": "stable",
- "enabled": true,
- "path": "detections/cloud/m365-teams-external-access-enabled.yaml"
- },
{
"id": "det-cloud-199",
"type": "detection",
@@ -35415,6 +35259,170 @@
"enabled": true,
"path": "detections/cloud/gcp-audit-log-sink-deleted.yaml"
},
+ {
+ "id": "det-cloud-219",
+ "type": "detection",
+ "name": "M365 eDiscovery Compliance Search Created",
+ "description": "Detects creation of an eDiscovery compliance search in Microsoft Purview. Insider threats and compromised admin accounts abuse eDiscovery to search and export mailbox contents at scale.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1114.002",
+ "T1213"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-collection",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-exchange-ediscovery-search-created.yaml"
+ },
+ {
+ "id": "det-cloud-220",
+ "type": "detection",
+ "name": "M365 Exchange Inbound Connector From Untrusted Domain",
+ "description": "Detects creation of an Exchange Online inbound connector that accepts mail from a specific external sender domain. Adversaries create connectors to bypass spam filters for phishing infrastructure.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1566"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-initial-access",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-exchange-mail-connector-external-domain.yaml"
+ },
+ {
+ "id": "det-cloud-221",
+ "type": "detection",
+ "name": "M365 Exchange Transport Rule Redirects Mail Externally",
+ "description": "A transport rule was created or modified to redirect or BCC mail to an external domain. Attackers use this for persistent email exfiltration that survives password resets.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1114.003",
+ "T1020"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-collection",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-exchange-transport-rule-redirect-external.yaml"
+ },
+ {
+ "id": "det-cloud-222",
+ "type": "detection",
+ "name": "M365 SharePoint External Sharing Enabled Tenant-Wide",
+ "description": "Detects tenant-level SharePoint sharing policy changed to allow external or anonymous sharing. Widens the data-loss attack surface across all sites.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1567",
+ "T1537"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-exfiltration",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-sharepoint-external-sharing-enabled-tenant.yaml"
+ },
+ {
+ "id": "det-cloud-223",
+ "type": "detection",
+ "name": "M365 SharePoint Site Collection Admin Added",
+ "description": "A new site collection administrator was added. Site collection admins bypass item-level permissions and can access all content including OneDrive for Business sites.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1098.003"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-sharepoint-site-collection-admin-added.yaml"
+ },
+ {
+ "id": "det-cloud-224",
+ "type": "detection",
+ "name": "M365 Teams External Access Policy Enabled",
+ "description": "Teams external access was changed to allow federation with all external domains or specific unblocked domains. Attackers leverage external access to phish internal users via Teams chat.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1566.003"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-initial-access",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-teams-external-access-enabled.yaml"
+ },
+ {
+ "id": "det-cloud-225",
+ "type": "detection",
+ "name": "M365 Unified Audit Log Disabled",
+ "description": "Detects disabling of the Microsoft 365 unified audit log. Attackers disable auditing early in a compromise to erase their trail across Exchange, SharePoint, Teams, and Entra ID.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "critical",
+ "category": "cloud",
+ "mitre_techniques": [
+ "T1562.008"
+ ],
+ "log_source": "m365",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/cloud/m365-unified-audit-log-disabled.yaml"
+ },
{
"id": "det-data-exfil-001",
"type": "detection",
@@ -42326,6 +42334,484 @@
"enabled": true,
"path": "detections/endpoint/host-sccm-client-untrusted.yaml"
},
+ {
+ "id": "det-endpoint-281",
+ "type": "detection",
+ "name": "AMoS Stealer Virtual Machine Detection via osquery",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'AMoS Stealer Virtual Machine Detection via osquery'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1059.002"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-malware-execution",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-amos-stealer-vm-check.yaml"
+ },
+ {
+ "id": "det-endpoint-282",
+ "type": "detection",
+ "name": "macOS Data Chunking via dd or split",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Data Chunking via dd or split'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1030"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-data-exfil",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-data-chunking.yaml"
+ },
+ {
+ "id": "det-endpoint-283",
+ "type": "detection",
+ "name": "macOS Gatekeeper Bypass Attempt",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Gatekeeper Bypass Attempt'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1553.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-gatekeeper-bypass.yaml"
+ },
+ {
+ "id": "det-endpoint-284",
+ "type": "detection",
+ "name": "Suspicious PlistBuddy LaunchAgent Modification",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'Suspicious PlistBuddy LaunchAgent Modification'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1543.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-suspicious-plistbuddy.yaml"
+ },
+ {
+ "id": "det-endpoint-285",
+ "type": "detection",
+ "name": "Baron Samedit CVE-2021-3156 Exploit Attempt",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'Baron Samedit CVE-2021-3156 Exploit Attempt'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1068"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-privilege-escalation",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-linux-baron-samedit-cve-2021-3156.yaml"
+ },
+ {
+ "id": "det-endpoint-286",
+ "type": "detection",
+ "name": "Linux osqueryd Service Stop Detected via auditd",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'Linux osqueryd Service Stop Detected via auditd'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1489"
+ ],
+ "log_source": "linux",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-linux-auditd-service-stop.yaml"
+ },
+ {
+ "id": "det-endpoint-287",
+ "type": "detection",
+ "name": "macOS Local User Account Created",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Local User Account Created'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1136.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-account-anomaly",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-account-created.yaml"
+ },
+ {
+ "id": "det-endpoint-288",
+ "type": "detection",
+ "name": "macOS Hidden File or Directory Created",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Hidden File or Directory Created'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1564.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-hidden-file-directory.yaml"
+ },
+ {
+ "id": "det-endpoint-289",
+ "type": "detection",
+ "name": "macOS Kernel Extension Loaded via kextload",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Kernel Extension Loaded via kextload'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1543"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-kextload.yaml"
+ },
+ {
+ "id": "det-endpoint-290",
+ "type": "detection",
+ "name": "macOS Keychain Dumping Attempt",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Keychain Dumping Attempt'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1555.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-credential-theft",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-keychain-dump.yaml"
+ },
+ {
+ "id": "det-endpoint-291",
+ "type": "detection",
+ "name": "macOS System Log Removed or Manually Rotated",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS System Log Removed or Manually Rotated'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1070"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-log-removal.yaml"
+ },
+ {
+ "id": "det-endpoint-292",
+ "type": "detection",
+ "name": "macOS LoginHook Persistence via defaults write",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS LoginHook Persistence via defaults write'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1037.002"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-loginhook-persistence.yaml"
+ },
+ {
+ "id": "det-endpoint-293",
+ "type": "detection",
+ "name": "macOS Suspicious Living-Off-The-Land Binary Execution",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Suspicious Living-Off-The-Land Binary Execution'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "low",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1059.004"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-execution",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-lolbin-execution.yaml"
+ },
+ {
+ "id": "det-endpoint-294",
+ "type": "detection",
+ "name": "macOS Network Share Discovery via showmount or smbutil",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Network Share Discovery via showmount or smbutil'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "low",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1135"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-discovery",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-network-share-discovery.yaml"
+ },
+ {
+ "id": "det-endpoint-295",
+ "type": "detection",
+ "name": "macOS Plist Modification via plutil",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'macOS Plist Modification via plutil'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1647"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-plutil-plist-modification.yaml"
+ },
+ {
+ "id": "det-endpoint-296",
+ "type": "detection",
+ "name": "Process Tapping macOS Keyboard Events",
+ "description": "AiSOC v1 curated detection. Triggers on the endpoint signal described by 'Process Tapping macOS Keyboard Events'. Watch the 1 documented false-positive case before tuning.",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1056.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-collection",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/osquery-macos-keyboard-event-tap.yaml"
+ },
+ {
+ "id": "det-endpoint-297",
+ "type": "detection",
+ "name": "Sensitive System File Modified (FIM)",
+ "description": "A file in a sensitive system path (/etc/passwd, /etc/shadow, /etc/sudoers, /etc/crontab, /etc/hosts, /etc/ssh/sshd_config, /etc/ld.so.*) was created, deleted, or modified as reported by osquery file_events via the AiSOC FIM pipeline. Adversaries commonly target these files for credential theft (T1003.008), persistence (T1037, T1053.003), lateral movement, and privilege escalation (T1548.001).",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white",
+ "data_source.osquery",
+ "data_source.fim"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1003.008",
+ "T1037",
+ "T1053.003",
+ "T1548.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-credential-access",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/fim-sensitive-file-modified.yaml"
+ },
+ {
+ "id": "det-endpoint-298",
+ "type": "detection",
+ "name": "Executable Dropped in World-Writable Directory (FIM)",
+ "description": "An osquery file_events CREATED event was recorded for a file with a common executable extension (.sh, .py, .pl, .rb, .elf, .bin, no extension + executable path) under a world-writable path (/tmp, /var/tmp, /dev/shm, /run/shm). This is a classic indicator of malware staging, web shell deployment, or attacker tool transfer (T1027, T1059, T1036.005).",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white",
+ "data_source.osquery",
+ "data_source.fim"
+ ],
+ "severity": "medium",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1027",
+ "T1059",
+ "T1036.005",
+ "T1570"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-defense-evasion",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/fim-binary-dropped-writable-dir.yaml"
+ },
+ {
+ "id": "det-endpoint-299",
+ "type": "detection",
+ "name": "LD_PRELOAD / ld.so.preload Tampered (FIM)",
+ "description": "The dynamic linker preload file /etc/ld.so.preload or any shared library under /etc/ld.so.conf.d/ was created or modified, as detected by osquery file_events via the AiSOC FIM pipeline. Attackers use ld.so.preload to inject arbitrary shared libraries into every process at startup, achieving rootkit-level stealth, credential capture, or privilege escalation (T1574.006 \u2013 Dynamic Linker Hijacking).",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white",
+ "data_source.osquery",
+ "data_source.fim"
+ ],
+ "severity": "critical",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1574.006",
+ "T1014",
+ "T1548.001"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/fim-ld-preload-modified.yaml"
+ },
+ {
+ "id": "det-endpoint-300",
+ "type": "detection",
+ "name": "SSH authorized_keys File Modified (FIM)",
+ "description": "An osquery file_events event recorded a change (CREATED, UPDATED, or ATTRIBUTES_MODIFIED) to any ~/.ssh/authorized_keys file across the fleet. Adversaries add their own public keys to authorized_keys files to establish persistent SSH backdoors that survive password resets and remain invisible to normal login monitoring (T1098.004 \u2013 Account Manipulation: SSH Authorized Keys).",
+ "version": "1.0.0",
+ "author": "AiSOC",
+ "tags": [
+ "tlp.white",
+ "data_source.osquery",
+ "data_source.fim"
+ ],
+ "severity": "high",
+ "category": "endpoint",
+ "mitre_techniques": [
+ "T1098.004",
+ "T1078",
+ "T1136"
+ ],
+ "log_source": "osquery",
+ "playbook": "tpl-persistence",
+ "verified": true,
+ "source": "core",
+ "tier": "stable",
+ "enabled": true,
+ "path": "detections/endpoint/fim-ssh-authorized-keys-changed.yaml"
+ },
{
"id": "det-identity-001",
"type": "detection",
@@ -158003,7 +158489,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1489"
],
@@ -158013,8 +158499,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/linux-auditd-osquery-service-stop.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/linux-auditd-osquery-service-stop.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "0c320fea-6e87-4b99-a884-74d09d4b655d",
@@ -163150,7 +163635,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1068"
],
@@ -163160,8 +163645,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/detect-baron-samedit-cve-2021-3156-via-osquery.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/detect-baron-samedit-cve-2021-3156-via-osquery.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "1de31d5d-8fa6-4ee0-af89-17069134118a",
@@ -163985,7 +164469,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1543.001"
],
@@ -163995,8 +164479,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/suspicious-plistbuddy-usage-via-osquery.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/suspicious-plistbuddy-usage-via-osquery.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "20ba6c32-c733-4a32-b64e-2688cf231399",
@@ -166285,7 +166768,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [],
"log_source": null,
"playbook": null,
@@ -166293,8 +166776,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/processes-tapping-keyboard-events.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/processes-tapping-keyboard-events.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "2a371608-331d-4034-ae2c-21dda8f1d0ec",
@@ -166942,7 +167424,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1553.001"
],
@@ -166952,8 +167434,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-gatekeeper-bypass.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-gatekeeper-bypass.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "2c9346f3-bbeb-48ce-8411-fc13d09d83a5",
@@ -173571,7 +174052,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1136"
],
@@ -173581,8 +174062,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-account-created.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-account-created.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "491004ae-694f-453e-b1e0-fc1e65daeea1",
@@ -174936,7 +175416,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1059.002"
],
@@ -174946,8 +175426,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-amos-stealer-virtual-machine-check-activity.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-amos-stealer-virtual-machine-check-activity.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "4e41ad21-9761-426d-8aa1-083712ff9f30",
@@ -175700,7 +176179,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1564.001"
],
@@ -175710,8 +176189,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-hidden-files-and-directories.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-hidden-files-and-directories.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "51c43b7b-e406-45d2-9bad-5c67f07e6528",
@@ -177528,7 +178006,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1059.004"
],
@@ -177538,8 +178016,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-lolbin.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-lolbin.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "58d270fb-5b39-418e-a855-4b8ac046805e",
@@ -186656,7 +187133,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1030"
],
@@ -186666,8 +187143,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-data-chunking.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-data-chunking.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "7f1c8bed-9bd4-40b0-a1df-c262cbade0fc",
@@ -195025,7 +195501,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1543"
],
@@ -195035,8 +195511,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-kextload-usage.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-kextload-usage.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "9d680775-84a6-4625-a8ea-8182b9427ce4",
@@ -195760,7 +196235,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1037.002"
],
@@ -195770,8 +196245,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-loginhook-persistence.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-loginhook-persistence.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "a04832e7-9d1d-49b1-a684-e31bcd775c77",
@@ -197590,7 +198064,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1135"
],
@@ -197600,8 +198074,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-network-share-discovery.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-network-share-discovery.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "a5f5fe52-8e50-4fb0-ad1b-780be6c0d857",
@@ -197956,7 +198429,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1070"
],
@@ -197966,8 +198439,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-log-removal.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-log-removal.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "a7f2e891-3c4d-4a1b-9e6f-2b8d0c5a1f3e",
@@ -204859,7 +205331,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1647"
],
@@ -204869,8 +205341,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-plutil.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-plutil.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "c11f2b57-92c1-4cd2-b46c-064eafb833ac",
@@ -212577,7 +213048,7 @@
"categories.endpoint"
],
"severity": "medium",
- "category": "_quarantine",
+ "category": "_migrated",
"mitre_techniques": [
"T1555.001"
],
@@ -212587,8 +213058,7 @@
"source": "splunk-security-content",
"tier": "imported",
"enabled": false,
- "path": "detections/splunk-imports/_quarantine/macos-keychains-dumped.yaml",
- "quarantine_reason": "imported rule; upstream query language not directly executable by the AiSOC engine yet",
+ "path": "detections/splunk-imports/_migrated/macos-keychains-dumped.yaml",
"provenance": {
"source": "splunk/security_content",
"source_id": "dcb45a09-5e6f-441e-b2f8-cbbf923e36d9",
@@ -223376,6 +223846,25 @@
"enabled": true,
"path": "playbooks/packs/v1/web-compromise/web-compromise-response.playbook.json"
},
+ {
+ "id": "aisoc-direct",
+ "type": "plugin",
+ "name": "AiSOC Direct (osquery TLS)",
+ "description": "Virtual connector that receives osquery telemetry from agents enrolled directly against AiSOC's built-in TLS endpoint (services/osquery-tls). No external fleet manager is required.",
+ "version": "0.1.0",
+ "author": "AiSOC Community",
+ "tags": [],
+ "plugin_type": null,
+ "license": "MIT",
+ "homepage": null,
+ "min_aisoc_version": null,
+ "sdks": [],
+ "mitre_techniques": [],
+ "verified": false,
+ "source": "core",
+ "tier": "beta",
+ "path": "plugins/aisoc-direct/plugin.yaml"
+ },
{
"id": "auth0",
"type": "plugin",
diff --git a/packages/aisoc-cli/src/aisoc_cli/main.py b/packages/aisoc-cli/src/aisoc_cli/main.py
index 0753282ea..6e3d1f598 100644
--- a/packages/aisoc-cli/src/aisoc_cli/main.py
+++ b/packages/aisoc-cli/src/aisoc_cli/main.py
@@ -13,6 +13,7 @@ from __future__ import annotations
import base64
import json
import sys
+from pathlib import Path
from typing import Any
import click
diff --git a/services/actions/app/clients/aisoc_direct_client.py b/services/actions/app/clients/aisoc_direct_client.py
index e4e718949..2f1b90910 100644
--- a/services/actions/app/clients/aisoc_direct_client.py
+++ b/services/actions/app/clients/aisoc_direct_client.py
@@ -8,6 +8,7 @@ Authentication uses a bearer token passed in the ``Authorization`` header.
The token is typically an internal service-account secret managed the same
way as any other AiSOC credential.
"""
+
from __future__ import annotations
import asyncio
@@ -95,23 +96,13 @@ class AiSOCDirectClient:
params = template_params or {}
sql = render_query(template, **params)
- async with httpx.AsyncClient(
- verify=self._verify_tls, timeout=30.0
- ) as client:
- query_ids = await self._enqueue_for_hosts(
- client, target_hosts, sql
- )
- results = await self._poll_results(
- client, query_ids, timeout_seconds
- )
+ async with httpx.AsyncClient(verify=self._verify_tls, timeout=30.0) as client:
+ query_ids = await self._enqueue_for_hosts(client, target_hosts, sql)
+ results = await self._poll_results(client, query_ids, timeout_seconds)
errors = [r for r in results.values() if "error" in r]
return {
- "results": {
- host: results[qid].get("rows", [])
- for host, qid in zip(target_hosts, query_ids)
- if qid in results
- },
+ "results": {host: results[qid].get("rows", []) for host, qid in zip(target_hosts, query_ids, strict=False) if qid in results},
"error": errors[0]["error"] if errors else None,
}
@@ -135,9 +126,7 @@ class AiSOCDirectClient:
data = resp.json()
query_ids.append(data["query_id"])
except httpx.HTTPError as exc:
- raise AiSOCDirectError(
- f"Failed to enqueue query for host {host}: {exc}"
- ) from exc
+ raise AiSOCDirectError(f"Failed to enqueue query for host {host}: {exc}") from exc
return query_ids
async def _poll_results(
diff --git a/services/actions/app/clients/aws_security_groups.py b/services/actions/app/clients/aws_security_groups.py
index 9715860b2..218e970a1 100644
--- a/services/actions/app/clients/aws_security_groups.py
+++ b/services/actions/app/clients/aws_security_groups.py
@@ -20,10 +20,8 @@ Credentials expected in ActionRequest.parameters:
from __future__ import annotations
-import json
from typing import Any
-import httpx
import structlog
logger = structlog.get_logger()
@@ -76,6 +74,7 @@ class AWSSGClient:
async def _boto3_available(self) -> bool:
try:
import boto3 # noqa: F401
+
return True
except ImportError:
return False
@@ -117,8 +116,14 @@ class AWSSGClient:
return await self._httpx_authorize(key_id, secret, token, ip, protocol, from_port, to_port, action="unblock")
async def _boto3_authorize_egress_block(
- self, key_id: str, secret: str, token: str | None,
- ip: str, protocol: str, from_port: int, to_port: int,
+ self,
+ key_id: str,
+ secret: str,
+ token: str | None,
+ ip: str,
+ protocol: str,
+ from_port: int,
+ to_port: int,
) -> dict[str, Any]:
import boto3
@@ -133,12 +138,14 @@ class AWSSGClient:
try:
ec2.authorize_security_group_ingress(
GroupId=self._sg_id,
- IpPermissions=[{
- "IpProtocol": protocol,
- "FromPort": from_port,
- "ToPort": to_port,
- "IpRanges": [{"CidrIp": cidr, "Description": "AiSOC block"}],
- }],
+ IpPermissions=[
+ {
+ "IpProtocol": protocol,
+ "FromPort": from_port,
+ "ToPort": to_port,
+ "IpRanges": [{"CidrIp": cidr, "Description": "AiSOC block"}],
+ }
+ ],
)
logger.info("aws_sg.block_ip.success", sg=self._sg_id, cidr=cidr)
return {"success": True, "action": "block_ip", "ip": ip, "sg_id": self._sg_id, "cidr": cidr}
@@ -149,8 +156,14 @@ class AWSSGClient:
raise
async def _boto3_revoke_block(
- self, key_id: str, secret: str, token: str | None,
- ip: str, protocol: str, from_port: int, to_port: int,
+ self,
+ key_id: str,
+ secret: str,
+ token: str | None,
+ ip: str,
+ protocol: str,
+ from_port: int,
+ to_port: int,
) -> dict[str, Any]:
import boto3
@@ -165,12 +178,14 @@ class AWSSGClient:
try:
ec2.revoke_security_group_ingress(
GroupId=self._sg_id,
- IpPermissions=[{
- "IpProtocol": protocol,
- "FromPort": from_port,
- "ToPort": to_port,
- "IpRanges": [{"CidrIp": cidr}],
- }],
+ IpPermissions=[
+ {
+ "IpProtocol": protocol,
+ "FromPort": from_port,
+ "ToPort": to_port,
+ "IpRanges": [{"CidrIp": cidr}],
+ }
+ ],
)
logger.info("aws_sg.unblock_ip.success", sg=self._sg_id, cidr=cidr)
return {"success": True, "action": "unblock_ip", "ip": ip, "sg_id": self._sg_id}
@@ -181,8 +196,15 @@ class AWSSGClient:
raise
async def _httpx_authorize(
- self, key_id: str, secret: str, token: str | None,
- ip: str, protocol: str, from_port: int, to_port: int, action: str,
+ self,
+ key_id: str,
+ secret: str,
+ token: str | None,
+ ip: str,
+ protocol: str,
+ from_port: int,
+ to_port: int,
+ action: str,
) -> dict[str, Any]:
"""Fallback: direct AWS EC2 API call without boto3.
This is a placeholder; production use should install boto3."""
diff --git a/services/actions/app/clients/crowdstrike_rtr.py b/services/actions/app/clients/crowdstrike_rtr.py
index cbf31a474..084814284 100644
--- a/services/actions/app/clients/crowdstrike_rtr.py
+++ b/services/actions/app/clients/crowdstrike_rtr.py
@@ -10,7 +10,6 @@ Credentials are expected in ActionRequest.parameters:
from __future__ import annotations
-import asyncio
from typing import Any
import httpx
diff --git a/services/actions/app/clients/elastic_client.py b/services/actions/app/clients/elastic_client.py
index c18209221..a928520d0 100644
--- a/services/actions/app/clients/elastic_client.py
+++ b/services/actions/app/clients/elastic_client.py
@@ -70,7 +70,7 @@ class ElasticClient:
data = resp.json()
columns = [col["name"] for col in data.get("columns", [])]
rows = data.get("values", [])
- results = [dict(zip(columns, row)) for row in rows]
+ results = [dict(zip(columns, row, strict=False)) for row in rows]
logger.info("elastic.esql.complete", query=query[:80], results=len(results))
return results
diff --git a/services/actions/app/clients/fleetdm_client.py b/services/actions/app/clients/fleetdm_client.py
index 2ce6c8c4d..3a28a362a 100644
--- a/services/actions/app/clients/fleetdm_client.py
+++ b/services/actions/app/clients/fleetdm_client.py
@@ -76,9 +76,7 @@ class FleetDMClient:
poll_interval: float = _DEFAULT_POLL_INTERVAL,
) -> None:
if not api_token and not (username and password):
- raise ValueError(
- "FleetDMClient requires either api_token or (username, password)."
- )
+ raise ValueError("FleetDMClient requires either api_token or (username, password).")
self._base_url = base_url.rstrip("/")
self._api_token = api_token
self._username = username
@@ -176,9 +174,7 @@ class FleetDMClient:
json={"email": self._username, "password": self._password},
)
if resp.status_code != 200:
- raise FleetDMError(
- f"FleetDM login failed: HTTP {resp.status_code} — {resp.text[:300]}"
- )
+ raise FleetDMError(f"FleetDM login failed: HTTP {resp.status_code} — {resp.text[:300]}")
data = resp.json()
token = data.get("token") or (data.get("user") or {}).get("token")
if not token:
@@ -199,17 +195,10 @@ class FleetDMClient:
}
resp = await http.post(url, json=payload, headers=self._auth_headers())
if resp.status_code not in (200, 201):
- raise FleetDMError(
- f"FleetDM campaign creation failed: HTTP {resp.status_code} — {resp.text[:300]}"
- )
+ raise FleetDMError(f"FleetDM campaign creation failed: HTTP {resp.status_code} — {resp.text[:300]}")
data = resp.json()
campaign = data.get("campaign") or data
- campaign_id = str(
- campaign.get("id")
- or campaign.get("campaign_id")
- or campaign.get("uuid")
- or ""
- )
+ campaign_id = str(campaign.get("id") or campaign.get("campaign_id") or campaign.get("uuid") or "")
if not campaign_id:
raise FleetDMError(f"FleetDM returned no campaign ID: {data}")
return campaign_id
@@ -243,20 +232,13 @@ class FleetDMClient:
await asyncio.sleep(min(self._poll_interval, remaining))
continue
if resp.status_code != 200:
- raise FleetDMError(
- f"FleetDM campaign poll failed: HTTP {resp.status_code} — {resp.text[:300]}"
- )
+ raise FleetDMError(f"FleetDM campaign poll failed: HTTP {resp.status_code} — {resp.text[:300]}")
data = resp.json()
# FleetDM returns {results: [{host: {...}, rows: [...]}, ...]}
for item in data.get("results") or (data if isinstance(data, list) else []):
host_info = item.get("host") or {}
- node = (
- host_info.get("hostname")
- or host_info.get("uuid")
- or item.get("hostname")
- or "unknown"
- )
+ node = host_info.get("hostname") or host_info.get("uuid") or item.get("hostname") or "unknown"
rows = item.get("rows") or []
if node not in results:
results[node] = []
diff --git a/services/actions/app/clients/osctrl_client.py b/services/actions/app/clients/osctrl_client.py
index 5dd0dbb49..1a65b78fa 100644
--- a/services/actions/app/clients/osctrl_client.py
+++ b/services/actions/app/clients/osctrl_client.py
@@ -34,8 +34,8 @@ from app.clients.osquery_allowlist import AllowlistError, render_query
logger = logging.getLogger(__name__)
-_DEFAULT_POLL_INTERVAL = 3.0 # seconds between result-polling retries
-_DEFAULT_TIMEOUT = 60 # seconds before we stop polling
+_DEFAULT_POLL_INTERVAL = 3.0 # seconds between result-polling retries
+_DEFAULT_TIMEOUT = 60 # seconds before we stop polling
_MAX_REDIRECT = 5
@@ -130,9 +130,7 @@ class OsctrlClient:
extra={"query_id": query_id, "env": self._environment, "hosts": target_hosts},
)
- return await self._poll_results(
- http, query_id, expected_hosts=set(target_hosts), timeout=timeout_seconds
- )
+ return await self._poll_results(http, query_id, expected_hosts=set(target_hosts), timeout=timeout_seconds)
# ------------------------------------------------------------------
# Internal helpers
@@ -161,14 +159,10 @@ class OsctrlClient:
resp = await http.post(url, json=payload)
if resp.status_code not in (200, 201):
- raise OsctrlError(
- f"osctrl query submission failed: HTTP {resp.status_code} — {resp.text[:300]}"
- )
+ raise OsctrlError(f"osctrl query submission failed: HTTP {resp.status_code} — {resp.text[:300]}")
data = resp.json()
- query_id: str | None = (
- data.get("id") or data.get("query_id") or data.get("uuid")
- )
+ query_id: str | None = data.get("id") or data.get("query_id") or data.get("uuid")
if not query_id:
raise OsctrlError(f"osctrl returned no query ID in response: {data}")
return str(query_id)
@@ -203,9 +197,7 @@ class OsctrlClient:
await asyncio.sleep(min(self._poll_interval, remaining))
continue
if resp.status_code != 200:
- raise OsctrlError(
- f"osctrl result poll failed: HTTP {resp.status_code} — {resp.text[:300]}"
- )
+ raise OsctrlError(f"osctrl result poll failed: HTTP {resp.status_code} — {resp.text[:300]}")
data = resp.json()
# osctrl returns a list of result objects, each with "node" and "rows".
diff --git a/services/actions/app/clients/osquery_allowlist.py b/services/actions/app/clients/osquery_allowlist.py
index 7a9030015..577e5da0d 100644
--- a/services/actions/app/clients/osquery_allowlist.py
+++ b/services/actions/app/clients/osquery_allowlist.py
@@ -49,12 +49,7 @@ TEMPLATES: dict[str, str] = {
"AND remote_port != 0 "
"LIMIT {limit};"
),
- "logged_in_users": (
- "SELECT type, user, host, tty, time "
- "FROM logged_in_users "
- "ORDER BY time DESC "
- "LIMIT {limit};"
- ),
+ "logged_in_users": ("SELECT type, user, host, tty, time FROM logged_in_users ORDER BY time DESC LIMIT {limit};"),
"recent_files": (
"SELECT path, directory, filename, size, type, "
"atime, mtime, ctime, uid, gid "
@@ -148,10 +143,7 @@ def render_query(template_id: str, **params: Any) -> str:
is supplied, or if a required parameter has no default.
"""
if template_id not in TEMPLATES:
- raise AllowlistError(
- f"Unknown template '{template_id}'. "
- f"Available: {', '.join(list_templates())}"
- )
+ raise AllowlistError(f"Unknown template '{template_id}'. Available: {', '.join(list_templates())}")
allowed_keys = PARAM_SPECS[template_id]
unknown = set(params) - allowed_keys
@@ -169,10 +161,7 @@ def render_query(template_id: str, **params: Any) -> str:
required = {m.group(1) for m in _PLACEHOLDER_RE.finditer(TEMPLATES[template_id])}
missing = required - set(merged)
if missing:
- raise AllowlistError(
- f"Template '{template_id}' requires "
- f"parameter(s) with no default: {', '.join(sorted(missing))}"
- )
+ raise AllowlistError(f"Template '{template_id}' requires parameter(s) with no default: {', '.join(sorted(missing))}")
# Basic sanitisation: reject values that contain SQL comment sequences or
# statement terminators other than the trailing semicolon already in the
@@ -181,9 +170,7 @@ def render_query(template_id: str, **params: Any) -> str:
for key, value in merged.items():
val_str = str(value)
if "--" in val_str or "/*" in val_str or ";" in val_str:
- raise AllowlistError(
- f"Parameter '{key}' contains disallowed characters."
- )
+ raise AllowlistError(f"Parameter '{key}' contains disallowed characters.")
return TEMPLATES[template_id].format_map(merged)
@@ -207,7 +194,4 @@ def validate_raw_sql(sql: str) -> None:
continue
if normalised == " ".join(rendered.split()):
return
- raise AllowlistError(
- "SQL does not match any approved template. "
- "Use render_query() with an approved template ID."
- )
+ raise AllowlistError("SQL does not match any approved template. Use render_query() with an approved template ID.")
diff --git a/services/actions/app/clients/splunk_client.py b/services/actions/app/clients/splunk_client.py
index 3ab49fa2b..d7158b207 100644
--- a/services/actions/app/clients/splunk_client.py
+++ b/services/actions/app/clients/splunk_client.py
@@ -12,7 +12,6 @@ Credentials expected in ActionRequest.parameters:
from __future__ import annotations
-import asyncio
from typing import Any
import httpx
diff --git a/services/actions/app/executors/endpoint.py b/services/actions/app/executors/endpoint.py
index 7b139146f..7fc86a398 100644
--- a/services/actions/app/executors/endpoint.py
+++ b/services/actions/app/executors/endpoint.py
@@ -23,7 +23,7 @@ import structlog
from app.clients.crowdstrike_rtr import CrowdStrikeRTRClient
from app.clients.defender_client import DefenderClient
-from app.executors.base import BaseExecutor, _SIM_FUNNEL_CTA
+from app.executors.base import _SIM_FUNNEL_CTA, BaseExecutor
from app.models.action import ActionRequest, ActionResult, ActionStatus, BlastRadius
logger = structlog.get_logger()
@@ -125,8 +125,7 @@ class IsolateHostExecutor(BaseExecutor):
"isolation_id": f"SIM-ISO-{hostname}",
"note": (
"Simulation mode — provide cs_client_id/cs_client_secret or "
- "mde_tenant_id/mde_client_id/mde_client_secret to enable live execution."
- + _SIM_FUNNEL_CTA
+ "mde_tenant_id/mde_client_id/mde_client_secret to enable live execution." + _SIM_FUNNEL_CTA
),
},
rollback_data={"hostname": hostname},
@@ -191,10 +190,7 @@ class QuarantineFileExecutor(BaseExecutor):
"path": file_path,
"hash": file_hash,
"quarantine_id": f"SIM-QRN-{file_hash[:8] if file_hash else 'NOHASH'}",
- "note": (
- "Simulation mode — provide cs_client_id/cs_client_secret to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide cs_client_id/cs_client_secret to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={"file_path": file_path, "file_hash": file_hash},
completed_at=datetime.utcnow(),
@@ -250,10 +246,7 @@ class KillProcessExecutor(BaseExecutor):
"action": "kill_process",
"process": process_name,
"pid": pid,
- "note": (
- "Simulation mode — provide cs_client_id/cs_client_secret to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide cs_client_id/cs_client_secret to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={},
completed_at=datetime.utcnow(),
@@ -311,10 +304,7 @@ class RunScriptExecutor(BaseExecutor):
"action": "run_script",
"hostname": hostname,
"script_name": script_name,
- "note": (
- "Simulation mode — provide cs_client_id/cs_client_secret to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide cs_client_id/cs_client_secret to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={},
completed_at=datetime.utcnow(),
@@ -371,8 +361,7 @@ class RunAVScanExecutor(BaseExecutor):
"hostname": hostname,
"scan_type": scan_type,
"note": (
- "Simulation mode — provide mde_tenant_id/mde_client_id/mde_client_secret to enable live execution."
- + _SIM_FUNNEL_CTA
+ "Simulation mode — provide mde_tenant_id/mde_client_id/mde_client_secret to enable live execution." + _SIM_FUNNEL_CTA
),
},
rollback_data={},
diff --git a/services/actions/app/executors/identity.py b/services/actions/app/executors/identity.py
index 99d0d022b..f0b434d84 100644
--- a/services/actions/app/executors/identity.py
+++ b/services/actions/app/executors/identity.py
@@ -15,7 +15,7 @@ from datetime import datetime
import structlog
from app.clients.okta_client import OktaClient
-from app.executors.base import BaseExecutor, _SIM_FUNNEL_CTA
+from app.executors.base import _SIM_FUNNEL_CTA, BaseExecutor
from app.models.action import ActionRequest, ActionResult, ActionStatus, BlastRadius
logger = structlog.get_logger()
@@ -75,10 +75,7 @@ class DisableUserExecutor(BaseExecutor):
output={
"action": "disable_user",
"user": user_id,
- "note": (
- "Simulation mode — provide okta_domain and okta_api_token to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide okta_domain and okta_api_token to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={"user_id": user_id},
completed_at=datetime.utcnow(),
@@ -139,10 +136,7 @@ class ResetPasswordExecutor(BaseExecutor):
"action": "reset_password",
"user": user_id,
"send_email": send_email,
- "note": (
- "Simulation mode — provide okta_domain and okta_api_token to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide okta_domain and okta_api_token to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={"user_id": user_id},
completed_at=datetime.utcnow(),
@@ -204,10 +198,7 @@ class SuspendSessionExecutor(BaseExecutor):
output={
"action": "suspend_session",
"user": user_id,
- "note": (
- "Simulation mode — provide okta_domain and okta_api_token to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide okta_domain and okta_api_token to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={"user_id": user_id},
completed_at=datetime.utcnow(),
@@ -266,10 +257,7 @@ class ForceMFAExecutor(BaseExecutor):
output={
"action": "force_mfa",
"user": user_id,
- "note": (
- "Simulation mode — provide okta_domain and okta_api_token to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide okta_domain and okta_api_token to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={"user_id": user_id},
completed_at=datetime.utcnow(),
diff --git a/services/actions/app/executors/network.py b/services/actions/app/executors/network.py
index 818a93565..a188a56da 100644
--- a/services/actions/app/executors/network.py
+++ b/services/actions/app/executors/network.py
@@ -19,7 +19,7 @@ from datetime import datetime
import structlog
from app.clients.aws_security_groups import AWSSecurityGroupsClient
-from app.executors.base import BaseExecutor, _SIM_FUNNEL_CTA
+from app.executors.base import _SIM_FUNNEL_CTA, BaseExecutor
from app.models.action import ActionRequest, ActionResult, ActionStatus, BlastRadius
logger = structlog.get_logger()
diff --git a/services/actions/app/executors/notification.py b/services/actions/app/executors/notification.py
index 79b27358d..26c9bf2f4 100644
--- a/services/actions/app/executors/notification.py
+++ b/services/actions/app/executors/notification.py
@@ -9,7 +9,7 @@ from datetime import datetime
import httpx
import structlog
-from app.executors.base import BaseExecutor, _SIM_FUNNEL_CTA
+from app.executors.base import _SIM_FUNNEL_CTA, BaseExecutor
from app.models.action import ActionRequest, ActionResult, ActionStatus
logger = structlog.get_logger()
@@ -74,10 +74,7 @@ class CreateTicketExecutor(BaseExecutor):
output={
"ticket_system": system,
"ticket_id": f"SIM-TICKET-{str(request.incident_id)[:8].upper()}",
- "note": (
- "Simulation mode — integrate with Jira, ServiceNow, or PagerDuty API to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — integrate with Jira, ServiceNow, or PagerDuty API to enable live execution." + _SIM_FUNNEL_CTA),
},
completed_at=datetime.utcnow(),
)
diff --git a/services/actions/app/executors/siem.py b/services/actions/app/executors/siem.py
index a8b83c41d..20145af67 100644
--- a/services/actions/app/executors/siem.py
+++ b/services/actions/app/executors/siem.py
@@ -23,7 +23,7 @@ import structlog
from app.clients.elastic_client import ElasticClient
from app.clients.splunk_client import SplunkClient
-from app.executors.base import BaseExecutor, _SIM_FUNNEL_CTA
+from app.executors.base import _SIM_FUNNEL_CTA, BaseExecutor
from app.models.action import ActionRequest, ActionResult, ActionStatus, BlastRadius
logger = structlog.get_logger()
@@ -200,10 +200,7 @@ class CreateNotableEventExecutor(BaseExecutor):
"action": "create_notable_event",
"title": title,
"severity": severity,
- "note": (
- "Simulation mode — provide splunk_url/splunk_token to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide splunk_url/splunk_token to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={},
completed_at=datetime.utcnow(),
@@ -271,10 +268,7 @@ class SyncDetectionRuleExecutor(BaseExecutor):
output={
"action": "sync_detection_rule",
"rule_name": rule_config.get("name"),
- "note": (
- "Simulation mode — provide elastic_url/elastic_api_key/kibana_url to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide elastic_url/elastic_api_key/kibana_url to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={},
completed_at=datetime.utcnow(),
@@ -339,10 +333,7 @@ class UpdateWatcherExecutor(BaseExecutor):
output={
"action": "update_watcher",
"watcher_id": watcher_id,
- "note": (
- "Simulation mode — provide elastic_url/elastic_api_key to enable live execution."
- + _SIM_FUNNEL_CTA
- ),
+ "note": ("Simulation mode — provide elastic_url/elastic_api_key to enable live execution." + _SIM_FUNNEL_CTA),
},
rollback_data={"watcher_id": watcher_id},
completed_at=datetime.utcnow(),
diff --git a/services/actions/tests/test_fleetdm_client.py b/services/actions/tests/test_fleetdm_client.py
index 3fcbb6e43..ade02fe96 100644
--- a/services/actions/tests/test_fleetdm_client.py
+++ b/services/actions/tests/test_fleetdm_client.py
@@ -7,11 +7,9 @@ from typing import Any
import httpx
import pytest
import respx
-
from app.clients.fleetdm_client import FleetDMClient, FleetDMError
from app.clients.osquery_allowlist import AllowlistError
-
BASE = "https://fleet.example.com"
TOKEN = "fleet-api-token-xyz"
@@ -78,9 +76,7 @@ class TestTokenAuth:
)
client = _make_client_token()
- result = await client.live_query(
- ["host1"], template="running_processes", timeout_seconds=5
- )
+ result = await client.live_query(["host1"], template="running_processes", timeout_seconds=5)
assert captured.get("authorization") == f"Bearer {TOKEN}"
assert result["partial"] is False
@@ -94,12 +90,8 @@ class TestPasswordAuth:
session_token = "session-tok-001"
with respx.mock:
- respx.post(LOGIN_URL).mock(
- return_value=httpx.Response(200, json={"token": session_token})
- )
- respx.post(CAMPAIGN_URL).mock(
- return_value=httpx.Response(200, json={"campaign": {"id": campaign_id}})
- )
+ respx.post(LOGIN_URL).mock(return_value=httpx.Response(200, json={"token": session_token}))
+ respx.post(CAMPAIGN_URL).mock(return_value=httpx.Response(200, json={"campaign": {"id": campaign_id}}))
respx.get(CAMPAIGN_STATUS_TMPL.format(campaign_id)).mock(
return_value=httpx.Response(
200,
@@ -126,9 +118,7 @@ class TestPollingTimeout:
async def test_partial_when_results_incomplete(self) -> None:
campaign_id = 7
with respx.mock:
- respx.post(CAMPAIGN_URL).mock(
- return_value=httpx.Response(200, json={"campaign": {"id": campaign_id}})
- )
+ respx.post(CAMPAIGN_URL).mock(return_value=httpx.Response(200, json={"campaign": {"id": campaign_id}}))
# Returns only 0/2 results
respx.get(CAMPAIGN_STATUS_TMPL.format(campaign_id)).mock(
return_value=httpx.Response(
@@ -172,9 +162,7 @@ class TestErrorHandling:
@pytest.mark.asyncio
async def test_missing_campaign_id_raises(self) -> None:
with respx.mock:
- respx.post(CAMPAIGN_URL).mock(
- return_value=httpx.Response(200, json={"campaign": {}})
- )
+ respx.post(CAMPAIGN_URL).mock(return_value=httpx.Response(200, json={"campaign": {}}))
client = _make_client_token()
with pytest.raises(FleetDMError, match="no campaign ID"):
@@ -187,18 +175,14 @@ class TestPartialResponse:
campaign_id = 55
with respx.mock:
- respx.post(CAMPAIGN_URL).mock(
- return_value=httpx.Response(200, json={"campaign": {"id": campaign_id}})
- )
+ respx.post(CAMPAIGN_URL).mock(return_value=httpx.Response(200, json={"campaign": {"id": campaign_id}}))
# host1 responds, host2 never does; we poll until timeout.
respx.get(CAMPAIGN_STATUS_TMPL.format(campaign_id)).mock(
return_value=httpx.Response(
200,
json={
"status": {"total_results_count": 1},
- "results": [
- {"rows": [{"pid": "42"}], "host": {"hostname": "host1"}}
- ],
+ "results": [{"rows": [{"pid": "42"}], "host": {"hostname": "host1"}}],
},
)
)
diff --git a/services/actions/tests/test_osctrl_client.py b/services/actions/tests/test_osctrl_client.py
index 9ae79ef2d..7ce788754 100644
--- a/services/actions/tests/test_osctrl_client.py
+++ b/services/actions/tests/test_osctrl_client.py
@@ -2,17 +2,14 @@
from __future__ import annotations
-import asyncio
from typing import Any
+import httpx
import pytest
import respx
-import httpx
-
from app.clients.osctrl_client import OsctrlClient, OsctrlError
from app.clients.osquery_allowlist import AllowlistError
-
BASE = "https://osctrl.example.com"
ENV = "prod"
TOKEN = "test-token-abc"
@@ -48,9 +45,7 @@ class TestSuccessPath:
results_url = RESULTS_URL_TMPL.format(query_id)
with respx.mock:
- respx.post(SUBMIT_URL).mock(
- return_value=httpx.Response(201, json={"id": query_id})
- )
+ respx.post(SUBMIT_URL).mock(return_value=httpx.Response(201, json={"id": query_id}))
respx.get(results_url).mock(
return_value=httpx.Response(
200,
@@ -59,9 +54,7 @@ class TestSuccessPath:
)
client = _make_client()
- result = await client.live_query(
- ["host1"], template="running_processes", timeout_seconds=5
- )
+ result = await client.live_query(["host1"], template="running_processes", timeout_seconds=5)
assert result["partial"] is False
assert "host1" in result["results"]
@@ -81,9 +74,7 @@ class TestSuccessPath:
with respx.mock:
respx.post(SUBMIT_URL).mock(side_effect=capture_submit)
- respx.get(results_url).mock(
- return_value=httpx.Response(200, json=[{"node": "host1", "rows": []}])
- )
+ respx.get(results_url).mock(return_value=httpx.Response(200, json=[{"node": "host1", "rows": []}]))
client = _make_client()
await client.live_query(["host1"], template="active_connections")
@@ -98,9 +89,7 @@ class TestPollingTimeout:
results_url = RESULTS_URL_TMPL.format(query_id)
with respx.mock:
- respx.post(SUBMIT_URL).mock(
- return_value=httpx.Response(200, json={"id": query_id})
- )
+ respx.post(SUBMIT_URL).mock(return_value=httpx.Response(200, json={"id": query_id}))
# Only host1 responds; host2 never appears.
respx.get(results_url).mock(
return_value=httpx.Response(
@@ -135,9 +124,7 @@ class TestErrorHandling:
results_url = RESULTS_URL_TMPL.format(query_id)
with respx.mock:
- respx.post(SUBMIT_URL).mock(
- return_value=httpx.Response(200, json={"id": query_id})
- )
+ respx.post(SUBMIT_URL).mock(return_value=httpx.Response(200, json={"id": query_id}))
respx.get(results_url).mock(return_value=httpx.Response(503, text="unavailable"))
client = _make_client()
@@ -164,14 +151,13 @@ class TestTemplateParams:
def capture(request: httpx.Request) -> httpx.Response:
import json
+
captured_body.update(json.loads(request.content))
return httpx.Response(201, json={"id": query_id})
with respx.mock:
respx.post(SUBMIT_URL).mock(side_effect=capture)
- respx.get(results_url).mock(
- return_value=httpx.Response(200, json=[{"node": "h1", "rows": []}])
- )
+ respx.get(results_url).mock(return_value=httpx.Response(200, json=[{"node": "h1", "rows": []}]))
client = _make_client()
await client.live_query(
diff --git a/services/actions/tests/test_osquery_allowlist.py b/services/actions/tests/test_osquery_allowlist.py
index ed5cfa2ae..9007a99ba 100644
--- a/services/actions/tests/test_osquery_allowlist.py
+++ b/services/actions/tests/test_osquery_allowlist.py
@@ -3,10 +3,8 @@
from __future__ import annotations
import pytest
-
from app.clients.osquery_allowlist import (
AllowlistError,
- TEMPLATES,
list_templates,
render_query,
validate_raw_sql,
diff --git a/services/agents/app/agents/attack_path_agent.py b/services/agents/app/agents/attack_path_agent.py
index a112d7b94..bf0ac8849 100644
--- a/services/agents/app/agents/attack_path_agent.py
+++ b/services/agents/app/agents/attack_path_agent.py
@@ -52,10 +52,7 @@ async def run_attack_path(state: InvestigationState) -> InvestigationState:
path = await get_attack_path(case_id=case_id, api_token=_SERVICE_TOKEN)
if path.get("error") or not path.get("nodes"):
- state.add_finding(
- f"Attack-path graph empty for case {case_id} "
- f"(node_count={path.get('node_count', 0)})."
- )
+ state.add_finding(f"Attack-path graph empty for case {case_id} (node_count={path.get('node_count', 0)}).")
return state
# ---- Summarise the path ----
@@ -72,9 +69,7 @@ async def run_attack_path(state: InvestigationState) -> InvestigationState:
# how far through the kill chain the attacker has progressed.
tactic_chain = _extract_tactic_chain(nodes)
if tactic_chain:
- state.add_finding(
- f"Kill-chain stages reached: {' → '.join(tactic_chain)}."
- )
+ state.add_finding(f"Kill-chain stages reached: {' → '.join(tactic_chain)}.")
# ---- Pick high-value entities to compute blast radius for ----
pivot_targets = _select_blast_targets(nodes)
@@ -115,17 +110,11 @@ async def run_attack_path(state: InvestigationState) -> InvestigationState:
state.proposed_actions.append(
ProposedAction(
action_type=("isolate_host" if top["label"] == "Host" else "disable_user"),
- description=(
- f"Isolate {top['label'].lower()} '{top['name']}' — "
- f"{top['total_affected']} downstream entities at risk."
- ),
+ description=(f"Isolate {top['label'].lower()} '{top['name']}' — {top['total_affected']} downstream entities at risk."),
risk_level=ActionRisk.HIGH,
target=top["name"],
requires_approval=True,
- rationale=(
- f"Graph blast radius {top['blast_radius_score']:.2f} "
- f"with {top['total_affected']} reachable entities."
- ),
+ rationale=(f"Graph blast radius {top['blast_radius_score']:.2f} with {top['total_affected']} reachable entities."),
parameters={
"entity_type": top["entity_type"],
"entity_id": top["entity_id"],
@@ -175,11 +164,7 @@ async def run_attack_path(state: InvestigationState) -> InvestigationState:
def _resolve_case_id(state: InvestigationState) -> str | None:
"""Find the case id on the state, tolerant of where the orchestrator put it."""
raw = state.raw_alert or {}
- return (
- raw.get("case_id")
- or raw.get("caseId")
- or (state.threat_intel or {}).get("case_id")
- )
+ return raw.get("case_id") or raw.get("caseId") or (state.threat_intel or {}).get("case_id")
def _extract_tactic_chain(nodes: list[dict[str, Any]]) -> list[str]:
diff --git a/services/agents/app/agents/auto_triage_agent.py b/services/agents/app/agents/auto_triage_agent.py
index f5d4b8d10..47c0b7eb1 100644
--- a/services/agents/app/agents/auto_triage_agent.py
+++ b/services/agents/app/agents/auto_triage_agent.py
@@ -73,9 +73,7 @@ def get_metrics() -> dict[str, Any]:
"""Return a copy of current auto-triage metrics."""
m = _metrics.copy()
total = m["total_processed"]
- m["auto_resolution_rate"] = (
- m["auto_resolved_count"] / total if total > 0 else 0.0
- )
+ m["auto_resolution_rate"] = m["auto_resolved_count"] / total if total > 0 else 0.0
m["fp_rate"] = m["fp_count"] / total if total > 0 else 0.0
m["avg_confidence"] = m["confidence_sum"] / total if total > 0 else 0.0
return m
@@ -134,7 +132,7 @@ def _parse_llm_response(text: str) -> dict[str, Any]:
cleaned = text.strip()
if cleaned.startswith("```"):
lines = cleaned.split("\n")
- lines = [l for l in lines if not l.strip().startswith("```")]
+ lines = [line for line in lines if not line.strip().startswith("```")]
cleaned = "\n".join(lines).strip()
try:
@@ -180,10 +178,12 @@ async def run_auto_triage(state: InvestigationState) -> InvestigationState:
t0 = time.monotonic()
try:
- response = await llm.ainvoke([
- SystemMessage(content=_SYSTEM_PROMPT),
- HumanMessage(content=alert_context),
- ])
+ response = await llm.ainvoke(
+ [
+ SystemMessage(content=_SYSTEM_PROMPT),
+ HumanMessage(content=alert_context),
+ ]
+ )
raw_text = response.content
result = _parse_llm_response(raw_text)
except Exception as exc:
@@ -216,24 +216,15 @@ async def run_auto_triage(state: InvestigationState) -> InvestigationState:
f"Rationale: {rationale}",
]
- state.add_finding(
- f"Auto-triage: verdict={verdict}, confidence={confidence:.2f}, "
- f"latency={elapsed_ms}ms"
- )
+ state.add_finding(f"Auto-triage: verdict={verdict}, confidence={confidence:.2f}, latency={elapsed_ms}ms")
state.add_finding(f"Auto-triage rationale: {rationale}")
- should_auto_close = (
- verdict in ("false_positive", "benign")
- and confidence >= AUTO_CLOSE_THRESHOLD
- )
+ should_auto_close = verdict in ("false_positive", "benign") and confidence >= AUTO_CLOSE_THRESHOLD
if should_auto_close:
_metrics["auto_resolved_count"] += 1
state.status = AgentStatus.COMPLETED
- state.add_finding(
- f"Auto-closed as {verdict} (confidence {confidence:.2f} >= "
- f"threshold {AUTO_CLOSE_THRESHOLD:.2f})"
- )
+ state.add_finding(f"Auto-closed as {verdict} (confidence {confidence:.2f} >= threshold {AUTO_CLOSE_THRESHOLD:.2f})")
logger.info(
"Auto-triage: auto-closed",
verdict=verdict,
diff --git a/services/agents/app/agents/cloud_agent.py b/services/agents/app/agents/cloud_agent.py
index fbfcf1690..910383c24 100644
--- a/services/agents/app/agents/cloud_agent.py
+++ b/services/agents/app/agents/cloud_agent.py
@@ -104,11 +104,24 @@ def _build_cloud_context(state: InvestigationState) -> str:
if raw.get("finding_type"):
parts.append(f"Finding type: {raw['finding_type']}")
- extra_keys = {k for k in raw if k not in {
- "severity", "risk_score", *cloud_fields, "bucket_acl", "bucket_policy",
- "security_group_rules", "iam_policy", "permissions", "api_calls",
- "is_public", "finding_type",
- }}
+ extra_keys = {
+ k
+ for k in raw
+ if k
+ not in {
+ "severity",
+ "risk_score",
+ *cloud_fields,
+ "bucket_acl",
+ "bucket_policy",
+ "security_group_rules",
+ "iam_policy",
+ "permissions",
+ "api_calls",
+ "is_public",
+ "finding_type",
+ }
+ }
if extra_keys:
extras = {k: raw[k] for k in sorted(extra_keys)[:8]}
parts.append(f"Additional fields: {json.dumps(extras, default=str)}")
@@ -121,7 +134,7 @@ def _parse_response(text: str) -> dict[str, Any]:
cleaned = text.strip()
if cleaned.startswith("```"):
lines = cleaned.split("\n")
- lines = [l for l in lines if not l.strip().startswith("```")]
+ lines = [line for line in lines if not line.strip().startswith("```")]
cleaned = "\n".join(lines).strip()
try:
@@ -168,10 +181,12 @@ async def run_cloud(state: InvestigationState) -> InvestigationState:
t0 = time.monotonic()
try:
- response = await llm.ainvoke([
- SystemMessage(content=_SYSTEM_PROMPT),
- HumanMessage(content=context),
- ])
+ response = await llm.ainvoke(
+ [
+ SystemMessage(content=_SYSTEM_PROMPT),
+ HumanMessage(content=context),
+ ]
+ )
result = _parse_response(response.content)
except Exception as exc:
logger.error("Cloud agent LLM call failed", error=str(exc))
diff --git a/services/agents/app/agents/identity_agent.py b/services/agents/app/agents/identity_agent.py
index a78bda661..19db3f09e 100644
--- a/services/agents/app/agents/identity_agent.py
+++ b/services/agents/app/agents/identity_agent.py
@@ -103,11 +103,22 @@ def _build_identity_context(state: InvestigationState) -> str:
if raw.get("previous_login"):
parts.append(f"Previous login: {json.dumps(raw['previous_login'], default=str)}")
- extra_keys = {k for k in raw if k not in {
- "severity", "risk_score", *identity_fields, "login_attempts",
- "failed_count", *geo_fields, *priv_fields, "timestamp",
- "previous_login",
- }}
+ extra_keys = {
+ k
+ for k in raw
+ if k
+ not in {
+ "severity",
+ "risk_score",
+ *identity_fields,
+ "login_attempts",
+ "failed_count",
+ *geo_fields,
+ *priv_fields,
+ "timestamp",
+ "previous_login",
+ }
+ }
if extra_keys:
extras = {k: raw[k] for k in sorted(extra_keys)[:8]}
parts.append(f"Additional fields: {json.dumps(extras, default=str)}")
@@ -120,7 +131,7 @@ def _parse_response(text: str) -> dict[str, Any]:
cleaned = text.strip()
if cleaned.startswith("```"):
lines = cleaned.split("\n")
- lines = [l for l in lines if not l.strip().startswith("```")]
+ lines = [line for line in lines if not line.strip().startswith("```")]
cleaned = "\n".join(lines).strip()
try:
@@ -165,10 +176,12 @@ async def run_identity(state: InvestigationState) -> InvestigationState:
t0 = time.monotonic()
try:
- response = await llm.ainvoke([
- SystemMessage(content=_SYSTEM_PROMPT),
- HumanMessage(content=context),
- ])
+ response = await llm.ainvoke(
+ [
+ SystemMessage(content=_SYSTEM_PROMPT),
+ HumanMessage(content=context),
+ ]
+ )
result = _parse_response(response.content)
except Exception as exc:
logger.error("Identity agent LLM call failed", error=str(exc))
diff --git a/services/agents/app/agents/insider_threat_agent.py b/services/agents/app/agents/insider_threat_agent.py
index 4e6e50fac..665eb6760 100644
--- a/services/agents/app/agents/insider_threat_agent.py
+++ b/services/agents/app/agents/insider_threat_agent.py
@@ -120,12 +120,27 @@ def _build_insider_context(state: InvestigationState) -> str:
if raw.get("baseline_deviation"):
parts.append(f"Baseline deviation: {raw['baseline_deviation']}")
- extra_keys = {k for k in raw if k not in {
- "severity", "risk_score", *user_fields, *activity_fields,
- "access_time", "timestamp", "normal_hours", "data_volume_mb",
- "bytes_transferred", "destination_type", "destination_domain",
- "usb_events", "recent_activity", "baseline_deviation",
- }}
+ extra_keys = {
+ k
+ for k in raw
+ if k
+ not in {
+ "severity",
+ "risk_score",
+ *user_fields,
+ *activity_fields,
+ "access_time",
+ "timestamp",
+ "normal_hours",
+ "data_volume_mb",
+ "bytes_transferred",
+ "destination_type",
+ "destination_domain",
+ "usb_events",
+ "recent_activity",
+ "baseline_deviation",
+ }
+ }
if extra_keys:
extras = {k: raw[k] for k in sorted(extra_keys)[:8]}
parts.append(f"Additional fields: {json.dumps(extras, default=str)}")
@@ -138,7 +153,7 @@ def _parse_response(text: str) -> dict[str, Any]:
cleaned = text.strip()
if cleaned.startswith("```"):
lines = cleaned.split("\n")
- lines = [l for l in lines if not l.strip().startswith("```")]
+ lines = [line for line in lines if not line.strip().startswith("```")]
cleaned = "\n".join(lines).strip()
try:
@@ -187,10 +202,12 @@ async def run_insider_threat(state: InvestigationState) -> InvestigationState:
t0 = time.monotonic()
try:
- response = await llm.ainvoke([
- SystemMessage(content=_SYSTEM_PROMPT),
- HumanMessage(content=context),
- ])
+ response = await llm.ainvoke(
+ [
+ SystemMessage(content=_SYSTEM_PROMPT),
+ HumanMessage(content=context),
+ ]
+ )
result = _parse_response(response.content)
except Exception as exc:
logger.error("Insider threat agent LLM call failed", error=str(exc))
diff --git a/services/agents/app/agents/phishing_agent.py b/services/agents/app/agents/phishing_agent.py
index 884d397fc..6af59f900 100644
--- a/services/agents/app/agents/phishing_agent.py
+++ b/services/agents/app/agents/phishing_agent.py
@@ -95,11 +95,25 @@ def _build_phishing_context(state: InvestigationState) -> str:
if raw.get("body_snippet"):
parts.append(f"Body snippet: {raw['body_snippet'][:500]}")
- extra_keys = {k for k in raw if k not in {
- "severity", "risk_score", *email_fields, "urls", "url", "domain",
- "attachment_hashes", "file_hash", "spf_result", "dkim_result",
- "dmarc_result", "body_snippet",
- }}
+ extra_keys = {
+ k
+ for k in raw
+ if k
+ not in {
+ "severity",
+ "risk_score",
+ *email_fields,
+ "urls",
+ "url",
+ "domain",
+ "attachment_hashes",
+ "file_hash",
+ "spf_result",
+ "dkim_result",
+ "dmarc_result",
+ "body_snippet",
+ }
+ }
if extra_keys:
extras = {k: raw[k] for k in sorted(extra_keys)[:8]}
parts.append(f"Additional fields: {json.dumps(extras, default=str)}")
@@ -112,7 +126,7 @@ def _parse_response(text: str) -> dict[str, Any]:
cleaned = text.strip()
if cleaned.startswith("```"):
lines = cleaned.split("\n")
- lines = [l for l in lines if not l.strip().startswith("```")]
+ lines = [line for line in lines if not line.strip().startswith("```")]
cleaned = "\n".join(lines).strip()
try:
@@ -155,10 +169,12 @@ async def run_phishing(state: InvestigationState) -> InvestigationState:
t0 = time.monotonic()
try:
- response = await llm.ainvoke([
- SystemMessage(content=_SYSTEM_PROMPT),
- HumanMessage(content=context),
- ])
+ response = await llm.ainvoke(
+ [
+ SystemMessage(content=_SYSTEM_PROMPT),
+ HumanMessage(content=context),
+ ]
+ )
result = _parse_response(response.content)
except Exception as exc:
logger.error("Phishing agent LLM call failed", error=str(exc))
@@ -182,8 +198,7 @@ async def run_phishing(state: InvestigationState) -> InvestigationState:
]
state.add_finding(
- f"Phishing analysis: verdict={verdict}, confidence={confidence:.2f}, "
- f"indicators={len(indicators)}, latency={elapsed_ms}ms"
+ f"Phishing analysis: verdict={verdict}, confidence={confidence:.2f}, indicators={len(indicators)}, latency={elapsed_ms}ms"
)
if indicators:
state.add_finding(f"Phishing indicators: {', '.join(indicators)}")
diff --git a/services/agents/app/agents/triage_agent.py b/services/agents/app/agents/triage_agent.py
index 49c694f06..4cd489684 100644
--- a/services/agents/app/agents/triage_agent.py
+++ b/services/agents/app/agents/triage_agent.py
@@ -111,9 +111,7 @@ async def run_triage(state: InvestigationState) -> InvestigationState:
state.confidence = confidence
state.confidence_basis = basis
state.verdict = verdict
- state.add_finding(
- f"Triage verdict: {verdict} (confidence={confidence:.2f})"
- )
+ state.add_finding(f"Triage verdict: {verdict} (confidence={confidence:.2f})")
state.add_finding("Triage phase complete — proceeding to enrichment")
logger.info(
diff --git a/services/agents/app/api/explain.py b/services/agents/app/api/explain.py
index fe8bcbf38..6028b1f88 100644
--- a/services/agents/app/api/explain.py
+++ b/services/agents/app/api/explain.py
@@ -304,10 +304,23 @@ def _map_to_ocsf(alert: dict[str, Any]) -> dict[str, Any]:
raw = alert.get("rawEvent") or alert.get("raw_event") or {}
fields: dict[str, Any] = {}
- for key in ("user", "user_name", "username", "actor", "src_ip",
- "source_ip", "dest_ip", "destination_ip", "host",
- "hostname", "process", "process_name", "file_hash",
- "domain", "url"):
+ for key in (
+ "user",
+ "user_name",
+ "username",
+ "actor",
+ "src_ip",
+ "source_ip",
+ "dest_ip",
+ "destination_ip",
+ "host",
+ "hostname",
+ "process",
+ "process_name",
+ "file_hash",
+ "domain",
+ "url",
+ ):
if isinstance(raw, dict) and raw.get(key):
fields[key] = raw[key]
@@ -346,12 +359,13 @@ def _extract_mitre_ids(alert: dict[str, Any]) -> list[str]:
seen.add(tid)
# Regex sweep across tags + descriptive text
- text_pool = " ".join(
- str(v)
- for v in (
- alert.get("tags") or []
- )
- ) + " " + str(alert.get("description") or "") + " " + str(alert.get("title") or "")
+ text_pool = (
+ " ".join(str(v) for v in (alert.get("tags") or []))
+ + " "
+ + str(alert.get("description") or "")
+ + " "
+ + str(alert.get("title") or "")
+ )
for tid in _MITRE_ID_RE.findall(text_pool):
if tid not in seen:
@@ -445,9 +459,7 @@ def _extract_evidence(alert: dict[str, Any]) -> list[dict[str, str]]:
return items[:8]
-def _build_next_steps(
- alert: dict[str, Any], mitre_ids: list[str]
-) -> list[dict[str, Any]]:
+def _build_next_steps(alert: dict[str, Any], mitre_ids: list[str]) -> list[dict[str, Any]]:
"""Recommend concrete next moves grounded in alert tags / techniques.
These are intentionally generic and link to the playbook engine so
@@ -525,15 +537,9 @@ def _build_summary(alert: dict[str, Any], mitre_ids: list[str]) -> str:
technique_clause = ""
if mitre_ids:
- technique_clause = (
- f" The detection maps to {', '.join(mitre_ids[:3])}, "
- "which the technique cards below describe in full."
- )
+ technique_clause = f" The detection maps to {', '.join(mitre_ids[:3])}, which the technique cards below describe in full."
- base = (
- f"{title} fired at {severity} severity from {source}."
- f"{technique_clause}"
- )
+ base = f"{title} fired at {severity} severity from {source}.{technique_clause}"
if desc:
# Trim to keep the drawer scannable.
snippet = desc if len(desc) <= 240 else desc[:237] + "…"
@@ -574,10 +580,7 @@ async def _llm_summary(
url = f"{base}/v1/chat/completions"
model = llm_config.model
- tech_lines = [
- f"- {t['id']} {t['name']} ({', '.join(t.get('tactic_names') or []) or 'unknown tactic'})"
- for t in mitre_techs
- ]
+ tech_lines = [f"- {t['id']} {t['name']} ({', '.join(t.get('tactic_names') or []) or 'unknown tactic'})" for t in mitre_techs]
prompt_alert = {
"title": alert.get("title"),
"severity": alert.get("severity"),
@@ -633,9 +636,7 @@ def _frame(obj: dict[str, Any]) -> bytes:
return (json.dumps(obj) + "\n").encode()
-async def _stream_explanation(
- req: ExplainRequest, llm_config: LlmConfig
-) -> AsyncIterator[bytes]:
+async def _stream_explanation(req: ExplainRequest, llm_config: LlmConfig) -> AsyncIterator[bytes]:
alert = req.alert or {}
alert_id = req.alert_id or alert.get("id") or "unknown"
@@ -647,9 +648,7 @@ async def _stream_explanation(
fallback_summary = _build_summary(alert, mitre_ids)
# Run the LLM call concurrently with the deterministic emissions
# so the drawer paints fast even on a cold network.
- summary_task = asyncio.create_task(
- _llm_summary(alert, mitre_cards, fallback_summary, llm_config)
- )
+ summary_task = asyncio.create_task(_llm_summary(alert, mitre_cards, fallback_summary, llm_config))
yield _frame({"kind": "section", "id": "summary", "title": "What happened"})
# Stream the summary word-by-word once it resolves.
diff --git a/services/agents/app/confidence/calibration.py b/services/agents/app/confidence/calibration.py
index b50476030..ce4e2f37e 100644
--- a/services/agents/app/confidence/calibration.py
+++ b/services/agents/app/confidence/calibration.py
@@ -28,10 +28,7 @@ def brier_score(predictions: Sequence[float], outcomes: Sequence[int]) -> float:
"""
if len(predictions) != len(outcomes):
- raise ValueError(
- f"predictions/outcomes length mismatch: "
- f"{len(predictions)} vs {len(outcomes)}"
- )
+ raise ValueError(f"predictions/outcomes length mismatch: {len(predictions)} vs {len(outcomes)}")
if not predictions:
raise ValueError("brier_score requires at least one sample")
@@ -95,6 +92,4 @@ def expected_calibration_error(
total_count = sum(count for _, _, count in curve)
if total_count == 0:
return 0.0
- return sum(
- abs(mean_pred - empirical) * count for mean_pred, empirical, count in curve
- ) / total_count
+ return sum(abs(mean_pred - empirical) * count for mean_pred, empirical, count in curve) / total_count
diff --git a/services/agents/app/confidence/scoring.py b/services/agents/app/confidence/scoring.py
index 1ff897300..9ff57da62 100644
--- a/services/agents/app/confidence/scoring.py
+++ b/services/agents/app/confidence/scoring.py
@@ -197,19 +197,11 @@ def score_investigation(state: InvestigationState) -> tuple[float, list[str], st
def _count_malicious_iocs(enrichments: dict[str, Any]) -> int:
- return sum(
- 1
- for v in enrichments.values()
- if isinstance(v, dict) and v.get("threat_classification") == "malicious"
- )
+ return sum(1 for v in enrichments.values() if isinstance(v, dict) and v.get("threat_classification") == "malicious")
def _count_suspicious_iocs(enrichments: dict[str, Any]) -> int:
- return sum(
- 1
- for v in enrichments.values()
- if isinstance(v, dict) and v.get("threat_classification") == "suspicious"
- )
+ return sum(1 for v in enrichments.values() if isinstance(v, dict) and v.get("threat_classification") == "suspicious")
def _distinct_tactic_count(state: InvestigationState) -> int:
@@ -225,10 +217,7 @@ def _distinct_tactic_count(state: InvestigationState) -> int:
try:
from app.tools.mitre import lookup_technique # noqa: PLC0415
- tactics = {
- lookup_technique(tid).get("tactic_name", "Unknown")
- for tid in state.mitre_mappings
- }
+ tactics = {lookup_technique(tid).get("tactic_name", "Unknown") for tid in state.mitre_mappings}
return len(tactics)
except Exception: # pragma: no cover - defensive fallback
return min(len(state.mitre_mappings), 4)
diff --git a/services/agents/app/core/cost_telemetry.py b/services/agents/app/core/cost_telemetry.py
index 48641f5a6..7fac6a3f6 100644
--- a/services/agents/app/core/cost_telemetry.py
+++ b/services/agents/app/core/cost_telemetry.py
@@ -39,16 +39,17 @@ logger = structlog.get_logger()
# agent. A contextvar lets each agent look up the tracker bound by its caller
# (the orchestrator) without changing the graph schema.
-_current_tracker: contextvars.ContextVar["CostTracker | None"] = contextvars.ContextVar(
+_current_tracker: contextvars.ContextVar[CostTracker | None] = contextvars.ContextVar(
"aisoc_cost_tracker",
default=None,
)
-def current_cost_tracker() -> "CostTracker | None":
+def current_cost_tracker() -> CostTracker | None:
"""Return the cost tracker bound to the current async context, if any."""
return _current_tracker.get()
+
# ---------------------------------------------------------------------------
# Model pricing (USD per 1 k tokens, input / output)
# ---------------------------------------------------------------------------
@@ -110,9 +111,7 @@ async def _get_pool() -> Any | None:
import asyncpg # type: ignore[import]
pool = await asyncpg.create_pool(
- dsn.replace("postgresql+asyncpg://", "postgresql://").replace(
- "postgres+asyncpg://", "postgresql://"
- ),
+ dsn.replace("postgresql+asyncpg://", "postgresql://").replace("postgres+asyncpg://", "postgresql://"),
min_size=1,
max_size=2,
)
@@ -156,9 +155,7 @@ async def _flush_to_db(
# Aggregate by model
by_model: dict[str, dict] = {}
for r in records:
- m = by_model.setdefault(r.model, {
- "prompt": 0, "completion": 0, "cost": 0.0, "latency": 0.0, "calls": 0
- })
+ m = by_model.setdefault(r.model, {"prompt": 0, "completion": 0, "cost": 0.0, "latency": 0.0, "calls": 0})
m["prompt"] += r.prompt_tokens
m["completion"] += r.completion_tokens
m["cost"] += r.cost_usd
@@ -210,7 +207,7 @@ class CostTracker:
_token: Any = field(default=None, init=False, repr=False)
- async def __aenter__(self) -> "CostTracker":
+ async def __aenter__(self) -> CostTracker:
# Bind into the current context so nested agents can find us.
self._token = _current_tracker.set(self)
return self
diff --git a/services/agents/app/core/rate_limit.py b/services/agents/app/core/rate_limit.py
index 568ba9608..1b559da1b 100644
--- a/services/agents/app/core/rate_limit.py
+++ b/services/agents/app/core/rate_limit.py
@@ -53,9 +53,7 @@ class _TokenBucket:
def _refill(self, now: float) -> None:
elapsed = max(0.0, now - self.last_refill)
if elapsed > 0.0:
- self.tokens = min(
- self.capacity, self.tokens + elapsed * self.refill_per_second
- )
+ self.tokens = min(self.capacity, self.tokens + elapsed * self.refill_per_second)
self.last_refill = now
@@ -82,9 +80,7 @@ class RateLimitDecision:
# RFC 7231 §7.1.3 — non-negative integer seconds. Round up
# so a client that retries exactly at Retry-After doesn't
# bounce off the bucket again.
- headers["Retry-After"] = (
- f"{max(1, int(self.retry_after_seconds + 0.999))}"
- )
+ headers["Retry-After"] = f"{max(1, int(self.retry_after_seconds + 0.999))}"
return headers
@@ -116,10 +112,7 @@ class TokenBucketLimiter:
if cost <= 0:
raise ValueError("cost must be positive")
if cost > self._capacity:
- raise ValueError(
- f"cost {cost} exceeds bucket capacity {self._capacity}; "
- "this would never succeed"
- )
+ raise ValueError(f"cost {cost} exceeds bucket capacity {self._capacity}; this would never succeed")
bucket = await self._get_bucket(key)
async with bucket.lock:
diff --git a/services/agents/app/memory/institutional.py b/services/agents/app/memory/institutional.py
index e13e07a2b..158e1cb52 100644
--- a/services/agents/app/memory/institutional.py
+++ b/services/agents/app/memory/institutional.py
@@ -33,9 +33,7 @@ _POOL: Any = None # asyncpg.Pool | None
def _normalise_dsn(url: str) -> str:
- return url.replace("postgresql+asyncpg://", "postgresql://").replace(
- "postgres+asyncpg://", "postgresql://"
- )
+ return url.replace("postgresql+asyncpg://", "postgresql://").replace("postgres+asyncpg://", "postgresql://")
async def _get_pool() -> Any | None:
diff --git a/services/agents/app/memory/manager.py b/services/agents/app/memory/manager.py
index f2f4fe95d..c9e61fbf6 100644
--- a/services/agents/app/memory/manager.py
+++ b/services/agents/app/memory/manager.py
@@ -2,7 +2,8 @@
from __future__ import annotations
-from typing import Any, Sequence
+from collections.abc import Sequence
+from typing import Any
import structlog
@@ -34,7 +35,7 @@ class MemoryManager:
self._run_id = run_id
@classmethod
- async def create(cls, tenant_id: str, run_id: str | None = None) -> "MemoryManager":
+ async def create(cls, tenant_id: str, run_id: str | None = None) -> MemoryManager:
"""Async factory — currently a passthrough; reserved for future init work."""
return cls(tenant_id=tenant_id, run_id=run_id)
diff --git a/services/agents/app/memory/session.py b/services/agents/app/memory/session.py
index 1e7683099..c3c23c815 100644
--- a/services/agents/app/memory/session.py
+++ b/services/agents/app/memory/session.py
@@ -11,9 +11,8 @@ import asyncio
from collections import OrderedDict
from typing import Any
-
_DEFAULT_MAXSIZE = 512
-_session_caches: dict[str, "_SessionCache"] = {}
+_session_caches: dict[str, _SessionCache] = {}
_registry_lock = asyncio.Lock()
@@ -42,7 +41,7 @@ class _SessionCache:
self._store.clear()
-async def _get_cache(run_id: str) -> "_SessionCache":
+async def _get_cache(run_id: str) -> _SessionCache:
async with _registry_lock:
if run_id not in _session_caches:
_session_caches[run_id] = _SessionCache()
diff --git a/services/agents/app/memory/working.py b/services/agents/app/memory/working.py
index 6cc891e0f..f2298fdcf 100644
--- a/services/agents/app/memory/working.py
+++ b/services/agents/app/memory/working.py
@@ -25,7 +25,7 @@ try:
_redis: aioredis.Redis | None = None
- async def _get_redis() -> "aioredis.Redis | None":
+ async def _get_redis() -> aioredis.Redis | None:
global _redis
if _redis is not None:
return _redis
@@ -41,6 +41,7 @@ try:
return None
except ImportError:
+
async def _get_redis(): # type: ignore[misc]
return None
diff --git a/services/agents/app/playbook/engine.py b/services/agents/app/playbook/engine.py
index 7837b9a9f..b195545d0 100644
--- a/services/agents/app/playbook/engine.py
+++ b/services/agents/app/playbook/engine.py
@@ -210,9 +210,7 @@ async def _handle_close_case(step: PlaybookStep, context: dict[str, Any], http:
return {"case_id": case_id, "status": "closed"}
-async def _handle_osquery_live_query(
- step: PlaybookStep, context: dict[str, Any], http: httpx.AsyncClient
-) -> dict:
+async def _handle_osquery_live_query(step: PlaybookStep, context: dict[str, Any], http: httpx.AsyncClient) -> dict:
"""Dispatch a distributed osquery live query via osctrl, FleetDM, or aisoc-direct.
Expected ``step.params`` keys
@@ -237,9 +235,7 @@ async def _handle_osquery_live_query(
from app.clients.osquery_allowlist import AllowlistError # noqa: PLC0415
backend: str = step.params.get("backend", "osctrl")
- target_hosts: list[str] = step.params.get("target_hosts") or [
- context.get("host_id") or context.get("host", "")
- ]
+ target_hosts: list[str] = step.params.get("target_hosts") or [context.get("host_id") or context.get("host", "")]
template: str = step.params.get("template", "")
template_params: dict[str, Any] = step.params.get("template_params") or {}
timeout_seconds: int = step.params.get("timeout_seconds", 60)
diff --git a/services/agents/app/policy/guardrails.py b/services/agents/app/policy/guardrails.py
index 69c89e5cf..6494cda7f 100644
--- a/services/agents/app/policy/guardrails.py
+++ b/services/agents/app/policy/guardrails.py
@@ -99,26 +99,26 @@ def _make_thresholds(
# ---------------------------------------------------------------------------
_DEFAULT_THRESHOLDS: dict[str, ActionThresholds] = {
# Read / enrichment — autonomous by default
- "lookup_ip": _make_thresholds(0.0, 0.0, 0.0),
- "lookup_domain": _make_thresholds(0.0, 0.0, 0.0),
- "search_logs": _make_thresholds(0.0, 0.0, 0.0),
- "enrich_alert": _make_thresholds(0.0, 0.0, 0.0),
- "mitre_lookup": _make_thresholds(0.0, 0.0, 0.0),
- "get_alert_context": _make_thresholds(0.0, 0.0, 0.0),
+ "lookup_ip": _make_thresholds(0.0, 0.0, 0.0),
+ "lookup_domain": _make_thresholds(0.0, 0.0, 0.0),
+ "search_logs": _make_thresholds(0.0, 0.0, 0.0),
+ "enrich_alert": _make_thresholds(0.0, 0.0, 0.0),
+ "mitre_lookup": _make_thresholds(0.0, 0.0, 0.0),
+ "get_alert_context": _make_thresholds(0.0, 0.0, 0.0),
# Case workflow — moderate autonomy, easy to roll back
- "add_alert_tag": _make_thresholds(0.50, 0.30, 0.10),
- "close_alert": _make_thresholds(0.60, 0.40, 0.20),
- "create_case": _make_thresholds(0.50, 0.30, 0.10),
- "add_case_comment": _make_thresholds(0.40, 0.20, 0.05),
- "assign_case": _make_thresholds(0.60, 0.40, 0.20),
+ "add_alert_tag": _make_thresholds(0.50, 0.30, 0.10),
+ "close_alert": _make_thresholds(0.60, 0.40, 0.20),
+ "create_case": _make_thresholds(0.50, 0.30, 0.10),
+ "add_case_comment": _make_thresholds(0.40, 0.20, 0.05),
+ "assign_case": _make_thresholds(0.60, 0.40, 0.20),
# Containment — high blast radius
- "quarantine_file": _make_thresholds(0.85, 0.65, 0.40),
- "block_ip": _make_thresholds(0.90, 0.70, 0.40),
- "isolate_host": _make_thresholds(0.92, 0.72, 0.45),
+ "quarantine_file": _make_thresholds(0.85, 0.65, 0.40),
+ "block_ip": _make_thresholds(0.90, 0.70, 0.40),
+ "isolate_host": _make_thresholds(0.92, 0.72, 0.45),
"disable_user_account": _make_thresholds(0.90, 0.70, 0.40),
- "revoke_session": _make_thresholds(0.80, 0.60, 0.30),
- "delete_object": _make_thresholds(0.95, 0.80, 0.50),
- "firewall_rule_add": _make_thresholds(0.88, 0.68, 0.40),
+ "revoke_session": _make_thresholds(0.80, 0.60, 0.30),
+ "delete_object": _make_thresholds(0.95, 0.80, 0.50),
+ "firewall_rule_add": _make_thresholds(0.88, 0.68, 0.40),
"firewall_rule_remove": _make_thresholds(0.90, 0.70, 0.40),
}
@@ -169,9 +169,7 @@ def _coerce_threshold_value(action: str, value: Any) -> ActionThresholds | None:
r = float(review) if review is not None else None
e = float(escalation) if escalation is not None else None
except (TypeError, ValueError):
- logger.warning(
- "policy.guardrails.yaml_bad_tier", action=action, review=review, escalation=escalation
- )
+ logger.warning("policy.guardrails.yaml_bad_tier", action=action, review=review, escalation=escalation)
return None
thresholds = _make_thresholds(auto, r, e)
if thresholds.review > thresholds.auto or thresholds.escalation > thresholds.review:
@@ -296,9 +294,7 @@ async def _load_overrides(tenant_id: str) -> dict[str, ActionThresholds]:
if _POOL is None:
_POOL = await asyncpg.create_pool(
- dsn.replace("postgresql+asyncpg://", "postgresql://").replace(
- "postgres+asyncpg://", "postgresql://"
- ),
+ dsn.replace("postgresql+asyncpg://", "postgresql://").replace("postgres+asyncpg://", "postgresql://"),
min_size=1,
max_size=2,
)
@@ -334,9 +330,7 @@ async def _load_overrides(tenant_id: str) -> dict[str, ActionThresholds]:
for r in rows:
auto = float(r["min_confidence"])
review_raw = r["review_confidence"] if "review_confidence" in r.keys() else None
- escalation_raw = (
- r["escalation_confidence"] if "escalation_confidence" in r.keys() else None
- )
+ escalation_raw = r["escalation_confidence"] if "escalation_confidence" in r.keys() else None
review = float(review_raw) if review_raw is not None else None
escalation = float(escalation_raw) if escalation_raw is not None else None
overrides[r["action_name"]] = _make_thresholds(auto, review, escalation)
@@ -385,7 +379,7 @@ class GuardrailPolicy:
thresholds: dict[str, ActionThresholds] = field(default_factory=dict)
@classmethod
- async def load(cls, tenant_id: str) -> "GuardrailPolicy":
+ async def load(cls, tenant_id: str) -> GuardrailPolicy:
# Precedence (low → high): hard-coded defaults → YAML site policy →
# DB tenant overrides. DB is loaded last so admin UI edits always win.
yaml_thresholds = _load_yaml_overrides()
@@ -398,7 +392,7 @@ class GuardrailPolicy:
return cls(tenant_id=tenant_id, thresholds=merged)
@classmethod
- def load_sync(cls, tenant_id: str) -> "GuardrailPolicy":
+ def load_sync(cls, tenant_id: str) -> GuardrailPolicy:
"""Synchronous loader — defaults + YAML only, no DB.
Useful in CLI tools, tests, and any context where an event loop is not
@@ -415,20 +409,13 @@ class GuardrailPolicy:
decision = thresholds.decide(confidence)
reason = ""
if decision is AutonomyDecision.REVIEW:
- reason = (
- f"Confidence {confidence:.2f} below auto threshold "
- f"{thresholds.auto:.2f} for '{action}' — analyst review required."
- )
+ reason = f"Confidence {confidence:.2f} below auto threshold {thresholds.auto:.2f} for '{action}' — analyst review required."
elif decision is AutonomyDecision.ESCALATE:
reason = (
- f"Confidence {confidence:.2f} below review threshold "
- f"{thresholds.review:.2f} for '{action}' — escalating to senior on-call."
+ f"Confidence {confidence:.2f} below review threshold {thresholds.review:.2f} for '{action}' — escalating to senior on-call."
)
elif decision is AutonomyDecision.REJECT:
- reason = (
- f"Confidence {confidence:.2f} below escalation floor "
- f"{thresholds.escalation:.2f} for '{action}' — refusing to act."
- )
+ reason = f"Confidence {confidence:.2f} below escalation floor {thresholds.escalation:.2f} for '{action}' — refusing to act."
if decision is not AutonomyDecision.AUTO:
logger.info(
"policy.guardrails.decision",
diff --git a/services/agents/app/scripts/serve.py b/services/agents/app/scripts/serve.py
index 66badb6da..8ae875dbc 100644
--- a/services/agents/app/scripts/serve.py
+++ b/services/agents/app/scripts/serve.py
@@ -6,6 +6,7 @@ breaks Fly.io health checks (IPv4) when we bind to ``::``. Pre-binding a
dual-stack socket and handing the fd to uvicorn fixes both 6PN (IPv6)
and the fly-proxy edge (IPv4) at once.
"""
+
from __future__ import annotations
import os
diff --git a/services/agents/app/security/credential_vault.py b/services/agents/app/security/credential_vault.py
index 075ef2c77..e39254cd5 100644
--- a/services/agents/app/security/credential_vault.py
+++ b/services/agents/app/security/credential_vault.py
@@ -70,15 +70,11 @@ class CredentialVault:
historical_keys: list[bytes] | None = None,
) -> None:
if not primary_key:
- raise CredentialVaultError(
- "CredentialVault requires a non-empty primary key"
- )
+ raise CredentialVaultError("CredentialVault requires a non-empty primary key")
try:
primary = Fernet(primary_key)
except (TypeError, ValueError) as exc:
- raise CredentialVaultError(
- f"AISOC_CREDENTIAL_KEY is not a valid Fernet key: {exc}"
- ) from exc
+ raise CredentialVaultError(f"AISOC_CREDENTIAL_KEY is not a valid Fernet key: {exc}") from exc
keyring: list[Fernet] = [primary]
for k in historical_keys or []:
@@ -91,9 +87,7 @@ class CredentialVault:
def encrypt(self, value: str) -> str:
if not isinstance(value, str):
- raise CredentialVaultError(
- f"vault.encrypt expects str, got {type(value).__name__}"
- )
+ raise CredentialVaultError(f"vault.encrypt expects str, got {type(value).__name__}")
if value.startswith(_CIPHER_PREFIX):
return value
token = self._fernet.encrypt(value.encode("utf-8")).decode("ascii")
@@ -101,9 +95,7 @@ class CredentialVault:
def decrypt(self, value: str) -> str:
if not isinstance(value, str):
- raise CredentialVaultError(
- f"vault.decrypt expects str, got {type(value).__name__}"
- )
+ raise CredentialVaultError(f"vault.decrypt expects str, got {type(value).__name__}")
if not value.startswith(_CIPHER_PREFIX):
return value
token = value[len(_CIPHER_PREFIX) :].encode("ascii")
@@ -111,8 +103,7 @@ class CredentialVault:
return self._fernet.decrypt(token).decode("utf-8")
except InvalidToken as exc:
raise CredentialVaultError(
- "ciphertext failed integrity check — likely "
- "AISOC_CREDENTIAL_KEY mismatch between API and agents services"
+ "ciphertext failed integrity check — likely AISOC_CREDENTIAL_KEY mismatch between API and agents services"
) from exc
def encrypt_dict(
@@ -143,22 +134,13 @@ class CredentialVault:
if isinstance(payload, Mapping):
out: dict[str, Any] = {}
for k, v in payload.items():
- if (
- secret_keys is not None
- and k not in secret_keys
- and not isinstance(v, (Mapping, list))
- ):
+ if secret_keys is not None and k not in secret_keys and not isinstance(v, (Mapping, list)):
out[k] = v
else:
- out[k] = self._walk(
- v, encrypt=encrypt, secret_keys=secret_keys, _key=k
- )
+ out[k] = self._walk(v, encrypt=encrypt, secret_keys=secret_keys, _key=k)
return out
if isinstance(payload, list):
- return [
- self._walk(item, encrypt=encrypt, secret_keys=secret_keys, _key=_key)
- for item in payload
- ]
+ return [self._walk(item, encrypt=encrypt, secret_keys=secret_keys, _key=_key) for item in payload]
if isinstance(payload, str):
return op(payload)
return payload
diff --git a/services/agents/app/security/llm_resolver.py b/services/agents/app/security/llm_resolver.py
index dce973247..3b5348df5 100644
--- a/services/agents/app/security/llm_resolver.py
+++ b/services/agents/app/security/llm_resolver.py
@@ -154,19 +154,9 @@ def _env_baseline() -> tuple[str, str, str | None]:
``OPENAI_*`` / ``AISOC_LLM_MODEL`` names — every deployment in the
field today uses some mix of the two.
"""
- base_url = (
- os.getenv("OPENAI_BASE_URL", "").strip()
- or os.getenv("LLM_BASE_URL", "").strip()
- )
- model = (
- os.getenv("OPENAI_MODEL", "").strip()
- or os.getenv("LLM_MODEL", "").strip()
- or os.getenv("AISOC_LLM_MODEL", "").strip()
- )
- api_key = (
- os.getenv("OPENAI_API_KEY", "").strip()
- or os.getenv("LLM_API_KEY", "").strip()
- )
+ base_url = os.getenv("OPENAI_BASE_URL", "").strip() or os.getenv("LLM_BASE_URL", "").strip()
+ model = os.getenv("OPENAI_MODEL", "").strip() or os.getenv("LLM_MODEL", "").strip() or os.getenv("AISOC_LLM_MODEL", "").strip()
+ api_key = os.getenv("OPENAI_API_KEY", "").strip() or os.getenv("LLM_API_KEY", "").strip()
return base_url, model, (api_key or None)
@@ -199,8 +189,7 @@ def _airgap_blocks(base_url: str) -> tuple[bool, str]:
if not base:
return (
True,
- "AISOC_AIRGAPPED is on and no base_url is configured (would "
- "default to api.openai.com).",
+ "AISOC_AIRGAPPED is on and no base_url is configured (would default to api.openai.com).",
)
if "api.openai.com" in base:
return True, "AISOC_AIRGAPPED is on and base_url points at api.openai.com."
@@ -212,9 +201,7 @@ def _airgap_blocks(base_url: str) -> tuple[bool, str]:
# ---------------------------------------------------------------------------
-async def _resolve_tenant_uuid(
- conn: asyncpg.Connection, tenant_ref: str
-) -> uuid.UUID | None:
+async def _resolve_tenant_uuid(conn: asyncpg.Connection, tenant_ref: str) -> uuid.UUID | None:
"""Resolve a tenant reference (UUID, slug, or name) to a UUID.
Inlined rather than imported from
@@ -239,18 +226,12 @@ async def _resolve_tenant_uuid(
return row["id"] if row else None
-async def _set_rls_context(
- conn: asyncpg.Connection, tenant_id: uuid.UUID
-) -> None:
+async def _set_rls_context(conn: asyncpg.Connection, tenant_id: uuid.UUID) -> None:
"""Set the RLS GUC so policies on ``tenant_llm_credentials`` admit us."""
- await conn.execute(
- "SELECT set_config('app.tenant_id', $1, true)", str(tenant_id)
- )
+ await conn.execute("SELECT set_config('app.tenant_id', $1, true)", str(tenant_id))
-async def _fetch_tenant_credential(
- pool: asyncpg.Pool, tenant_ref: str
-) -> dict[str, Any] | None:
+async def _fetch_tenant_credential(pool: asyncpg.Pool, tenant_ref: str) -> dict[str, Any] | None:
"""Resolve ``tenant_ref`` and fetch the ``tenant_llm_credentials`` row.
Returns ``None`` when:
@@ -332,9 +313,7 @@ async def resolve_llm_config(tenant_ref: str | None) -> LlmConfig:
tenant_contributed_model = False
tenant_contributed_key = False
- skip_db_lookup = (
- tenant_ref is None or not tenant_ref.strip() or tenant_ref == "default"
- )
+ skip_db_lookup = tenant_ref is None or not tenant_ref.strip() or tenant_ref == "default"
if not skip_db_lookup:
# Lazy import: see module-level NOTE. We only reach this branch
# when the request carries a real tenant ref. Importing the
@@ -438,10 +417,7 @@ def _decrypt_vault_token(vault_token: str, tenant_ref: str) -> str | None:
logger.warning(
"explain.llm_resolve_vault_disabled",
tenant=tenant_ref,
- reason=(
- "AISOC_CREDENTIAL_KEY not set; tenant BYOK key cannot be "
- "decrypted, falling back to environment baseline"
- ),
+ reason=("AISOC_CREDENTIAL_KEY not set; tenant BYOK key cannot be decrypted, falling back to environment baseline"),
)
return None
try:
@@ -472,11 +448,7 @@ def _classify_source(
the final config, the merge is "mixed" — exactly what the API-side
status endpoint reports.
"""
- tenant_contributed = (
- tenant_contributed_base_url
- or tenant_contributed_model
- or tenant_contributed_key
- )
+ tenant_contributed = tenant_contributed_base_url or tenant_contributed_model or tenant_contributed_key
env_contributed = (
(not tenant_contributed_base_url and bool(env_base_url))
or (not tenant_contributed_model and bool(env_model))
diff --git a/services/agents/tests/smoke_explain.py b/services/agents/tests/smoke_explain.py
index 50176627d..e0e4c4c05 100644
--- a/services/agents/tests/smoke_explain.py
+++ b/services/agents/tests/smoke_explain.py
@@ -23,16 +23,17 @@ from __future__ import annotations
import asyncio
import json
-import sys
-from typing import Any
# Force LLM off so the smoke is deterministic and offline.
import os
+import sys
+from typing import Any
+
os.environ.pop("OPENAI_API_KEY", None)
os.environ["AISOC_AIRGAPPED"] = "true"
from app.api.explain import ExplainRequest, _stream_explanation # noqa: E402
-
+from app.security.llm_resolver import LlmConfig
SAMPLE_ALERT: dict[str, Any] = {
"id": "ALERT-SMOKE-0001",
@@ -40,8 +41,7 @@ SAMPLE_ALERT: dict[str, Any] = {
"severity": "high",
"source": "okta",
"description": (
- "User authenticated successfully from two geographically impossible "
- "locations within an 8-minute window. Likely account takeover."
+ "User authenticated successfully from two geographically impossible locations within an 8-minute window. Likely account takeover."
),
"tags": ["account-takeover", "ato", "identity"],
"mitreAttack": [{"techniqueId": "T1078"}],
@@ -71,9 +71,17 @@ REQUIRED_KEYS = {
async def _run() -> int:
req = ExplainRequest(alert=SAMPLE_ALERT, alert_id=SAMPLE_ALERT["id"])
+ llm_config = LlmConfig(
+ allowed=False,
+ base_url="http://localhost",
+ model="none",
+ api_key=None,
+ source="none",
+ reason="air-gapped smoke test",
+ )
frames: list[dict[str, Any]] = []
- async for chunk in _stream_explanation(req):
+ async for chunk in _stream_explanation(req, llm_config):
line = chunk.decode().strip()
if not line:
continue
@@ -119,9 +127,7 @@ async def _run() -> int:
section_ids = [f["id"] for f in frames if f["kind"] == "section"]
expected_sections = ["summary", "ocsf", "mitre", "evidence", "next"]
if section_ids != expected_sections:
- print(
- f"FAIL: section order is {section_ids!r}, expected {expected_sections!r}"
- )
+ print(f"FAIL: section order is {section_ids!r}, expected {expected_sections!r}")
return 1
# 4. We got a real OCSF mapping for an Okta-sourced alert.
@@ -130,10 +136,7 @@ async def _run() -> int:
print("FAIL: no ocsf frame")
return 1
if ocsf_frame["class_uid"] != 3002:
- print(
- f"FAIL: Okta alert should map to OCSF class_uid=3002 (Authentication), "
- f"got {ocsf_frame['class_uid']}"
- )
+ print(f"FAIL: Okta alert should map to OCSF class_uid=3002 (Authentication), got {ocsf_frame['class_uid']}")
return 1
# 5. T1078 came through. The corpus may or may not be loaded in this
@@ -150,9 +153,7 @@ async def _run() -> int:
# 6. ATO tags should produce the ATO containment playbook recommendation.
next_frames = [f for f in frames if f["kind"] == "next_step"]
- if not any(
- f["playbook_id"] == "ato-impossible-travel-block-v1" for f in next_frames
- ):
+ if not any(f["playbook_id"] == "ato-impossible-travel-block-v1" for f in next_frames):
print(
"FAIL: ATO-tagged alert should recommend "
"'ato-impossible-travel-block-v1' playbook; got "
@@ -163,16 +164,15 @@ async def _run() -> int:
# 7. Evidence must contain the user from rawEvent.
evidence = [f for f in frames if f["kind"] == "evidence"]
if not any("alice.tan" in f["value"] for f in evidence):
- print(
- "FAIL: evidence missing the user from rawEvent: "
- f"{[(f['label'], f['value']) for f in evidence]}"
- )
+ print(f"FAIL: evidence missing the user from rawEvent: {[(f['label'], f['value']) for f in evidence]}")
return 1
print()
- print(f"PASS: {len(frames)} frames, sections={section_ids}, "
- f"mitre={[m['id'] for m in mitre_frames]}, "
- f"playbooks={[n['playbook_id'] for n in next_frames]}")
+ print(
+ f"PASS: {len(frames)} frames, sections={section_ids}, "
+ f"mitre={[m['id'] for m in mitre_frames]}, "
+ f"playbooks={[n['playbook_id'] for n in next_frames]}"
+ )
return 0
diff --git a/services/agents/tests/test_autonomy_guardrails.py b/services/agents/tests/test_autonomy_guardrails.py
index 0b60e6d73..36f9d7b96 100644
--- a/services/agents/tests/test_autonomy_guardrails.py
+++ b/services/agents/tests/test_autonomy_guardrails.py
@@ -153,9 +153,7 @@ class DefaultPolicyTest(unittest.TestCase):
with self.subTest(action=action):
self.assertGreaterEqual(defaults[action].auto, 0.85)
self.assertLess(defaults[action].review, defaults[action].auto)
- self.assertLess(
- defaults[action].escalation, defaults[action].review
- )
+ self.assertLess(defaults[action].escalation, defaults[action].review)
def test_unknown_action_rejects_by_default(self) -> None:
policy = GuardrailPolicy.load_sync(tenant_id="t-test")
@@ -198,9 +196,7 @@ class YamlOverrideTest(unittest.TestCase):
self.assertAlmostEqual(loaded["block_ip"].auto, 0.75, places=6)
# review/escalation derived
self.assertLess(loaded["block_ip"].review, loaded["block_ip"].auto)
- self.assertLess(
- loaded["block_ip"].escalation, loaded["block_ip"].review
- )
+ self.assertLess(loaded["block_ip"].escalation, loaded["block_ip"].review)
def test_explicit_three_tier_form(self) -> None:
try:
diff --git a/services/agents/tests/test_confidence_calibration.py b/services/agents/tests/test_confidence_calibration.py
index f23d71145..6e914f07c 100644
--- a/services/agents/tests/test_confidence_calibration.py
+++ b/services/agents/tests/test_confidence_calibration.py
@@ -104,8 +104,7 @@ with _DATASET_PATH.open() as _f:
_POSITIVE_INCIDENTS: list[dict[str, Any]] = json.load(_f)
assert len(_POSITIVE_INCIDENTS) >= 100, (
- f"synthetic_incidents.json must contain at least 100 cases for stable "
- f"calibration (got {len(_POSITIVE_INCIDENTS)})"
+ f"synthetic_incidents.json must contain at least 100 cases for stable calibration (got {len(_POSITIVE_INCIDENTS)})"
)
@@ -211,9 +210,7 @@ def _build_positive_state(incident: dict[str, Any]) -> InvestigationState:
"medium": 0.55,
"low": 0.30,
}
- raw_alert["risk_score"] = severity_to_risk.get(
- incident.get("severity", "medium"), 0.5
- )
+ raw_alert["risk_score"] = severity_to_risk.get(incident.get("severity", "medium"), 0.5)
# Walk telemetry events and lift the first IP / hostname / hash / url
# we find. The scorer doesn't care which event they came from — it
@@ -271,10 +268,7 @@ def _enrich_for_investigation(
if incident is None:
# Benign branch — enrich with benign IOC verdicts so the scorer's
# "enrichment ran but classified all IOCs benign" signal fires.
- state.ioc_enrichments = {
- f"benign-anchor-{i}": {"threat_classification": "benign"}
- for i in range(2)
- }
+ state.ioc_enrichments = {f"benign-anchor-{i}": {"threat_classification": "benign"} for i in range(2)}
return state
severity = incident.get("severity", "medium")
@@ -411,9 +405,7 @@ class TestConfidenceBoundsAndSeparation(unittest.TestCase):
self.assertGreater(
gap,
SEPARATION_THRESHOLD,
- f"triage scorer fails to separate positives from benign "
- f"(gap={gap:.3f} ≤ {SEPARATION_THRESHOLD}); calibration is "
- f"degenerate",
+ f"triage scorer fails to separate positives from benign (gap={gap:.3f} ≤ {SEPARATION_THRESHOLD}); calibration is degenerate",
)
def test_positive_mean_exceeds_benign_mean_investigation(self) -> None:
@@ -424,8 +416,7 @@ class TestConfidenceBoundsAndSeparation(unittest.TestCase):
self.assertGreater(
gap,
SEPARATION_THRESHOLD,
- f"investigation scorer fails to separate positives from "
- f"benign (gap={gap:.3f} ≤ {SEPARATION_THRESHOLD})",
+ f"investigation scorer fails to separate positives from benign (gap={gap:.3f} ≤ {SEPARATION_THRESHOLD})",
)
def test_basis_is_always_populated(self) -> None:
@@ -454,8 +445,7 @@ class TestBrierGate(unittest.TestCase):
self.assertLessEqual(
score,
BRIER_THRESHOLD_TRIAGE,
- f"triage Brier {score:.4f} > threshold "
- f"{BRIER_THRESHOLD_TRIAGE} — confidence is miscalibrated",
+ f"triage Brier {score:.4f} > threshold {BRIER_THRESHOLD_TRIAGE} — confidence is miscalibrated",
)
def test_investigation_brier_score_below_threshold(self) -> None:
@@ -464,8 +454,7 @@ class TestBrierGate(unittest.TestCase):
self.assertLessEqual(
score,
BRIER_THRESHOLD_INVESTIGATION,
- f"investigation Brier {score:.4f} > threshold "
- f"{BRIER_THRESHOLD_INVESTIGATION} — confidence is miscalibrated",
+ f"investigation Brier {score:.4f} > threshold {BRIER_THRESHOLD_INVESTIGATION} — confidence is miscalibrated",
)
def test_triage_ece_below_threshold(self) -> None:
@@ -474,8 +463,7 @@ class TestBrierGate(unittest.TestCase):
self.assertLessEqual(
ece,
ECE_THRESHOLD_TRIAGE,
- f"triage ECE {ece:.4f} > threshold {ECE_THRESHOLD_TRIAGE} — "
- f"reliability diagram has too much sag",
+ f"triage ECE {ece:.4f} > threshold {ECE_THRESHOLD_TRIAGE} — reliability diagram has too much sag",
)
def test_investigation_ece_below_threshold(self) -> None:
@@ -484,8 +472,7 @@ class TestBrierGate(unittest.TestCase):
self.assertLessEqual(
ece,
ECE_THRESHOLD_INVESTIGATION,
- f"investigation ECE {ece:.4f} > threshold "
- f"{ECE_THRESHOLD_INVESTIGATION}",
+ f"investigation ECE {ece:.4f} > threshold {ECE_THRESHOLD_INVESTIGATION}",
)
@@ -511,12 +498,10 @@ def run_evaluation() -> dict[str, Any]:
inv_ece = expected_calibration_error(inv_preds, outcomes, n_buckets=10)
triage_curve = [
- {"mean_predicted": mp, "empirical_rate": er, "count": c}
- for mp, er, c in reliability_curve(triage_preds, outcomes, n_buckets=10)
+ {"mean_predicted": mp, "empirical_rate": er, "count": c} for mp, er, c in reliability_curve(triage_preds, outcomes, n_buckets=10)
]
inv_curve = [
- {"mean_predicted": mp, "empirical_rate": er, "count": c}
- for mp, er, c in reliability_curve(inv_preds, outcomes, n_buckets=10)
+ {"mean_predicted": mp, "empirical_rate": er, "count": c} for mp, er, c in reliability_curve(inv_preds, outcomes, n_buckets=10)
]
pos_t = [p for p, y in zip(triage_preds, outcomes, strict=True) if y == 1]
@@ -543,28 +528,18 @@ def run_evaluation() -> dict[str, Any]:
"ece": round(triage_ece, 4),
"mean_confidence_positive": round(sum(pos_t) / len(pos_t), 4),
"mean_confidence_benign": round(sum(neg_t) / len(neg_t), 4),
- "separation": round(
- sum(pos_t) / len(pos_t) - sum(neg_t) / len(neg_t), 4
- ),
+ "separation": round(sum(pos_t) / len(pos_t) - sum(neg_t) / len(neg_t), 4),
"reliability_curve": triage_curve,
- "passed": (
- triage_brier <= BRIER_THRESHOLD_TRIAGE
- and triage_ece <= ECE_THRESHOLD_TRIAGE
- ),
+ "passed": (triage_brier <= BRIER_THRESHOLD_TRIAGE and triage_ece <= ECE_THRESHOLD_TRIAGE),
},
"investigation": {
"brier": round(inv_brier, 4),
"ece": round(inv_ece, 4),
"mean_confidence_positive": round(sum(pos_i) / len(pos_i), 4),
"mean_confidence_benign": round(sum(neg_i) / len(neg_i), 4),
- "separation": round(
- sum(pos_i) / len(pos_i) - sum(neg_i) / len(neg_i), 4
- ),
+ "separation": round(sum(pos_i) / len(pos_i) - sum(neg_i) / len(neg_i), 4),
"reliability_curve": inv_curve,
- "passed": (
- inv_brier <= BRIER_THRESHOLD_INVESTIGATION
- and inv_ece <= ECE_THRESHOLD_INVESTIGATION
- ),
+ "passed": (inv_brier <= BRIER_THRESHOLD_INVESTIGATION and inv_ece <= ECE_THRESHOLD_INVESTIGATION),
},
"passed": (
triage_brier <= BRIER_THRESHOLD_TRIAGE
diff --git a/services/agents/tests/test_explain_endpoint.py b/services/agents/tests/test_explain_endpoint.py
index 1cb8ca7d8..899442aa6 100644
--- a/services/agents/tests/test_explain_endpoint.py
+++ b/services/agents/tests/test_explain_endpoint.py
@@ -1,3 +1,4 @@
+# ruff: noqa: I001
"""Integration tests for ``POST /api/v1/explain`` (WS-D1).
We mount *only* the explain router into a fresh FastAPI app so the test
@@ -49,8 +50,7 @@ SAMPLE_ALERT: dict[str, Any] = {
"severity": "high",
"source": "okta",
"description": (
- "User authenticated successfully from two geographically impossible "
- "locations within an 8-minute window. Likely account takeover."
+ "User authenticated successfully from two geographically impossible locations within an 8-minute window. Likely account takeover."
),
"tags": ["account-takeover", "ato", "identity"],
"mitreAttack": [{"techniqueId": "T1078"}],
@@ -145,9 +145,7 @@ def test_explain_streams_grounded_ndjson(monkeypatch: pytest.MonkeyPatch) -> Non
# Section ordering — explicit and stable so the frontend can rely on it.
section_ids = [f["id"] for f in frames if f["kind"] == "section"]
- assert section_ids == ["summary", "ocsf", "mitre", "evidence", "next"], (
- f"unexpected section order: {section_ids}"
- )
+ assert section_ids == ["summary", "ocsf", "mitre", "evidence", "next"], f"unexpected section order: {section_ids}"
# OCSF mapping: Okta source → Authentication (class_uid 3002).
ocsf = next((f for f in frames if f["kind"] == "ocsf"), None)
@@ -156,9 +154,7 @@ def test_explain_streams_grounded_ndjson(monkeypatch: pytest.MonkeyPatch) -> Non
# MITRE: T1078 with valid attack.mitre.org URL.
mitre = [f for f in frames if f["kind"] == "mitre"]
- assert any(m["id"] == "T1078" for m in mitre), (
- f"expected T1078, got {[m['id'] for m in mitre]}"
- )
+ assert any(m["id"] == "T1078" for m in mitre), f"expected T1078, got {[m['id'] for m in mitre]}"
for m in mitre:
assert m["url"].startswith("https://attack.mitre.org/techniques/")
@@ -169,8 +165,7 @@ def test_explain_streams_grounded_ndjson(monkeypatch: pytest.MonkeyPatch) -> Non
# Evidence surfaces the offending user from rawEvent.
evidence = [f for f in frames if f["kind"] == "evidence"]
assert any("alice.tan" in e["value"] for e in evidence), (
- f"evidence missing user from rawEvent: "
- f"{[(e['label'], e['value']) for e in evidence]}"
+ f"evidence missing user from rawEvent: {[(e['label'], e['value']) for e in evidence]}"
)
@@ -238,9 +233,7 @@ def test_explain_throttles_with_429_and_ndjson_error_frame(
assert retry >= 1
frames = _parse_ndjson(second.text)
- assert len(frames) == 1, (
- f"429 body must be a single NDJSON error frame, got {len(frames)}"
- )
+ assert len(frames) == 1, f"429 body must be a single NDJSON error frame, got {len(frames)}"
assert frames[0]["kind"] == "error"
assert "rate_limited" in frames[0]["error"]
diff --git a/services/agents/tests/test_llm_resolver.py b/services/agents/tests/test_llm_resolver.py
index d40174499..1df273ab0 100644
--- a/services/agents/tests/test_llm_resolver.py
+++ b/services/agents/tests/test_llm_resolver.py
@@ -23,13 +23,12 @@ contract is covered separately by the API-side credential tests.
from __future__ import annotations
-import os
import sys
import uuid
from pathlib import Path
-from types import ModuleType, SimpleNamespace
+from types import ModuleType
from typing import Any
-from unittest.mock import AsyncMock, MagicMock, patch
+from unittest.mock import AsyncMock, MagicMock
import pytest
from cryptography.fernet import Fernet
@@ -125,9 +124,7 @@ class TestEnvBaseline:
assert model == ""
assert key is None
- def test_openai_style_env_is_picked_up(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_openai_style_env_is_picked_up(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OPENAI_API_KEY", "sk-env-1")
monkeypatch.setenv("OPENAI_BASE_URL", "https://api.openai.com")
monkeypatch.setenv("OPENAI_MODEL", "gpt-4o-mini")
@@ -138,9 +135,7 @@ class TestEnvBaseline:
assert model == "gpt-4o-mini"
assert key == "sk-env-1"
- def test_llm_style_env_is_picked_up_when_openai_unset(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_llm_style_env_is_picked_up_when_openai_unset(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("LLM_API_KEY", "private-llm-key")
monkeypatch.setenv("LLM_BASE_URL", "http://llm.internal:4000/v1")
monkeypatch.setenv("LLM_MODEL", "llama3.1-8b")
@@ -151,9 +146,7 @@ class TestEnvBaseline:
assert model == "llama3.1-8b"
assert key == "private-llm-key"
- def test_openai_takes_precedence_over_llm_aliases(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_openai_takes_precedence_over_llm_aliases(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OPENAI_API_KEY", "sk-from-openai")
monkeypatch.setenv("LLM_API_KEY", "should-be-ignored")
monkeypatch.setenv("OPENAI_BASE_URL", "https://api.openai.com")
@@ -167,9 +160,7 @@ class TestEnvBaseline:
assert model == "gpt-4o-mini"
assert key == "sk-from-openai"
- def test_aisoc_llm_model_legacy_env_supported(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_aisoc_llm_model_legacy_env_supported(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("AISOC_LLM_MODEL", "claude-3.5-sonnet")
resolver = _import_resolver()
_, model, _ = resolver._env_baseline()
@@ -192,27 +183,21 @@ class TestAirgapBlocks:
assert blocked is False, f"airgap=off blocked {url!r}"
@pytest.mark.parametrize("flag", ["1", "true", "yes"])
- def test_airgap_blocks_empty_base_url(
- self, flag: str, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_airgap_blocks_empty_base_url(self, flag: str, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("AISOC_AIRGAPPED", flag)
resolver = _import_resolver()
blocked, reason = resolver._airgap_blocks("")
assert blocked is True
assert "would default to api.openai.com" in reason
- def test_airgap_blocks_openai_host(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_airgap_blocks_openai_host(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("AISOC_AIRGAPPED", "true")
resolver = _import_resolver()
blocked, reason = resolver._airgap_blocks("https://api.openai.com/v1")
assert blocked is True
assert "api.openai.com" in reason
- def test_airgap_allows_private_litellm_host(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_airgap_allows_private_litellm_host(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("AISOC_AIRGAPPED", "true")
resolver = _import_resolver()
blocked, _ = resolver._airgap_blocks("http://litellm.internal:4000/v1")
@@ -286,9 +271,7 @@ class TestClassifySource:
class TestDecryptVaultToken:
"""Decryption is best-effort and must never raise."""
- def test_returns_none_when_vault_disabled(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_returns_none_when_vault_disabled(self, monkeypatch: pytest.MonkeyPatch) -> None:
# No AISOC_CREDENTIAL_KEY set → vault.get_vault() returns None.
monkeypatch.delenv("AISOC_CREDENTIAL_KEY", raising=False)
_reset_vault()
@@ -297,9 +280,7 @@ class TestDecryptVaultToken:
result = resolver._decrypt_vault_token("vault:v1:something", "tenant-a")
assert result is None
- def test_round_trip_with_configured_vault(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_round_trip_with_configured_vault(self, monkeypatch: pytest.MonkeyPatch) -> None:
_set_vault_key(monkeypatch)
from app.security.credential_vault import get_vault # noqa: PLC0415
@@ -312,18 +293,14 @@ class TestDecryptVaultToken:
result = resolver._decrypt_vault_token(ciphertext, "tenant-a")
assert result == "sk-tenant-secret"
- def test_returns_none_on_corrupt_ciphertext(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ def test_returns_none_on_corrupt_ciphertext(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Configure a vault with one key, then hand it a token encrypted
# under a completely different key — must degrade gracefully.
_set_vault_key(monkeypatch)
wrong_key_vault_key = Fernet.generate_key()
wrong_fernet = Fernet(wrong_key_vault_key)
- bogus_token = (
- "vault:v1:" + wrong_fernet.encrypt(b"sk-other").decode("ascii")
- )
+ bogus_token = "vault:v1:" + wrong_fernet.encrypt(b"sk-other").decode("ascii")
resolver = _import_resolver()
result = resolver._decrypt_vault_token(bogus_token, "tenant-a")
@@ -339,9 +316,7 @@ class TestResolveNoTenant:
"""Sanity-check the early-exit branches that skip the DB entirely."""
@pytest.mark.asyncio
- async def test_none_tenant_ref_uses_env_baseline_only(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_none_tenant_ref_uses_env_baseline_only(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OPENAI_API_KEY", "sk-env")
monkeypatch.setenv("OPENAI_BASE_URL", "http://litellm.internal:4000")
monkeypatch.setenv("OPENAI_MODEL", "llama3.1-8b")
@@ -357,9 +332,7 @@ class TestResolveNoTenant:
assert cfg.reason == ""
@pytest.mark.asyncio
- async def test_default_tenant_ref_skips_db(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_default_tenant_ref_skips_db(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OPENAI_API_KEY", "sk-env")
monkeypatch.setenv("OPENAI_BASE_URL", "http://litellm.internal:4000")
@@ -372,9 +345,7 @@ class TestResolveNoTenant:
assert cfg.source == "environment"
@pytest.mark.asyncio
- async def test_no_key_anywhere_returns_disallowed_with_reason(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_no_key_anywhere_returns_disallowed_with_reason(self, monkeypatch: pytest.MonkeyPatch) -> None:
# No env key, no tenant ref → allowed=False with deterministic
# fallback base_url / model so callers can still log.
resolver = _import_resolver()
@@ -387,9 +358,7 @@ class TestResolveNoTenant:
assert "no api key" in cfg.reason.lower()
@pytest.mark.asyncio
- async def test_airgap_blocks_default_openai_endpoint(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_airgap_blocks_default_openai_endpoint(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OPENAI_API_KEY", "sk-env")
monkeypatch.setenv("OPENAI_BASE_URL", "https://api.openai.com")
monkeypatch.setenv("AISOC_AIRGAPPED", "true")
@@ -400,9 +369,7 @@ class TestResolveNoTenant:
assert "api.openai.com" in cfg.reason
@pytest.mark.asyncio
- async def test_airgap_allows_private_endpoint(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_airgap_allows_private_endpoint(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OPENAI_API_KEY", "sk-env")
monkeypatch.setenv("OPENAI_BASE_URL", "http://litellm.internal:4000/v1")
monkeypatch.setenv("AISOC_AIRGAPPED", "true")
@@ -465,6 +432,7 @@ def _stub_ledger(monkeypatch: pytest.MonkeyPatch, pool: MagicMock | None) -> Non
ledger = ModuleType(ledger_name)
if pool is None:
+
async def _raise():
raise RuntimeError("DATABASE_URL not set")
@@ -476,9 +444,7 @@ def _stub_ledger(monkeypatch: pytest.MonkeyPatch, pool: MagicMock | None) -> Non
class TestResolveWithTenant:
@pytest.mark.asyncio
- async def test_tenant_row_with_full_override_yields_source_tenant(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_tenant_row_with_full_override_yields_source_tenant(self, monkeypatch: pytest.MonkeyPatch) -> None:
_set_vault_key(monkeypatch)
from app.security.credential_vault import get_vault # noqa: PLC0415
@@ -508,9 +474,7 @@ class TestResolveWithTenant:
assert cfg.reason == ""
@pytest.mark.asyncio
- async def test_tenant_supplies_only_key_layered_over_env_is_mixed(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_tenant_supplies_only_key_layered_over_env_is_mixed(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Operator scenario: env sets base_url + model, tenant BYOKs
# only the key. Source should be "mixed".
monkeypatch.setenv("OPENAI_BASE_URL", "http://litellm.internal:4000")
@@ -546,9 +510,7 @@ class TestResolveWithTenant:
assert cfg.source == "mixed"
@pytest.mark.asyncio
- async def test_disabled_tenant_row_is_treated_as_no_override(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_disabled_tenant_row_is_treated_as_no_override(self, monkeypatch: pytest.MonkeyPatch) -> None:
# ``enabled=false`` lets operators pause BYOK without deletion.
monkeypatch.setenv("OPENAI_API_KEY", "sk-env-fallback")
monkeypatch.setenv("OPENAI_BASE_URL", "http://litellm.internal:4000")
@@ -579,9 +541,7 @@ class TestResolveWithTenant:
assert cfg.source == "environment"
@pytest.mark.asyncio
- async def test_corrupt_ciphertext_falls_back_to_env_key(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_corrupt_ciphertext_falls_back_to_env_key(self, monkeypatch: pytest.MonkeyPatch) -> None:
# If the tenant's stored ciphertext can't be decrypted with the
# current vault key (mid-rotation, mistyped secret, etc.), the
# resolver must fall back to the env key — *not* fail open and
@@ -592,9 +552,7 @@ class TestResolveWithTenant:
# Build a ciphertext under a *different* key, simulating drift.
wrong_key = Fernet.generate_key()
wrong_fernet = Fernet(wrong_key)
- bogus_token = (
- "vault:v1:" + wrong_fernet.encrypt(b"sk-tenant").decode("ascii")
- )
+ bogus_token = "vault:v1:" + wrong_fernet.encrypt(b"sk-tenant").decode("ascii")
row = {
"provider": "openai_compatible",
@@ -619,9 +577,7 @@ class TestResolveWithTenant:
assert cfg.source == "mixed"
@pytest.mark.asyncio
- async def test_vault_disabled_falls_back_to_env_key(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_vault_disabled_falls_back_to_env_key(self, monkeypatch: pytest.MonkeyPatch) -> None:
# AISOC_CREDENTIAL_KEY missing → vault.get_vault() returns None.
# Resolver must still surface tenant base_url/model and use env key.
monkeypatch.setenv("OPENAI_API_KEY", "sk-env-fallback")
@@ -650,9 +606,7 @@ class TestResolveWithTenant:
assert cfg.source == "mixed"
@pytest.mark.asyncio
- async def test_no_tenant_row_uses_env_baseline(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_no_tenant_row_uses_env_baseline(self, monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("OPENAI_API_KEY", "sk-env")
monkeypatch.setenv("OPENAI_BASE_URL", "http://litellm.internal:4000")
@@ -666,9 +620,7 @@ class TestResolveWithTenant:
assert cfg.source == "environment"
@pytest.mark.asyncio
- async def test_ledger_unavailable_falls_back_to_env_baseline(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_ledger_unavailable_falls_back_to_env_baseline(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Simulate the "agents box can't reach the platform DB right now"
# path. Resolver must never raise on this; it just degrades.
monkeypatch.setenv("OPENAI_API_KEY", "sk-env")
@@ -681,9 +633,7 @@ class TestResolveWithTenant:
assert cfg.source == "environment"
@pytest.mark.asyncio
- async def test_db_query_failure_falls_back_to_env_baseline(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_db_query_failure_falls_back_to_env_baseline(self, monkeypatch: pytest.MonkeyPatch) -> None:
# ``conn.fetchrow`` blows up mid-query (e.g. transient outage,
# connection cap exceeded). Must not propagate.
monkeypatch.setenv("OPENAI_API_KEY", "sk-env")
@@ -713,9 +663,7 @@ class TestResolveWithTenant:
class TestAirgapWithTenantOverride:
@pytest.mark.asyncio
- async def test_airgap_allows_tenant_private_gateway(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_airgap_allows_tenant_private_gateway(self, monkeypatch: pytest.MonkeyPatch) -> None:
# The whole point of BYOK in air-gapped deployments: tenant
# points at their internal LLM, AISOC_AIRGAPPED=true does *not*
# block them.
@@ -745,9 +693,7 @@ class TestAirgapWithTenantOverride:
assert cfg.base_url == "http://tenant-llm.internal:4000/v1"
@pytest.mark.asyncio
- async def test_airgap_blocks_tenant_byok_to_openai(
- self, monkeypatch: pytest.MonkeyPatch
- ) -> None:
+ async def test_airgap_blocks_tenant_byok_to_openai(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Even with a valid tenant BYOK row, if it points at OpenAI and
# AISOC_AIRGAPPED=true, we must refuse the live call.
monkeypatch.setenv("AISOC_AIRGAPPED", "true")
diff --git a/services/agents/tests/test_memory_recall.py b/services/agents/tests/test_memory_recall.py
index d7b9e9c08..4c16997c1 100644
--- a/services/agents/tests/test_memory_recall.py
+++ b/services/agents/tests/test_memory_recall.py
@@ -26,6 +26,7 @@ Metrics:
* isolation_score — fraction of cross-tenant probes that return None.
Floor: 1.0 (perfect isolation required).
"""
+
from __future__ import annotations
import asyncio
@@ -43,10 +44,10 @@ os.environ.setdefault("DATABASE_URL", "")
os.environ.setdefault("REDIS_URL", "")
from app.memory import MemoryManager # noqa: E402
+from app.memory.institutional import _FALLBACK as _INSTITUTIONAL_FALLBACK # noqa: E402
from app.memory.models import OverrideFeedback # noqa: E402
from app.memory.session import _session_caches # noqa: E402
from app.memory.working import _FALLBACK as _WORKING_FALLBACK # noqa: E402
-from app.memory.institutional import _FALLBACK as _INSTITUTIONAL_FALLBACK # noqa: E402
RECALL_ACCURACY_FLOOR = 1.0
ISOLATION_FLOOR = 1.0
@@ -199,9 +200,7 @@ async def test_override_ingestion():
reason="Confirmed C2 callback after manual PCAP review",
)
await mgr.ingest_override(feedback)
- result = await mgr.recall(
- f"analyst_override:{feedback.alert_id}", tiers=("institutional",)
- )
+ result = await mgr.recall(f"analyst_override:{feedback.alert_id}", tiers=("institutional",))
assert result is not None
assert result["corrected_verdict"] == "true_positive"
assert result["analyst_id"] == "analyst-42"
diff --git a/services/agents/tests/test_osquery_live_query_step.py b/services/agents/tests/test_osquery_live_query_step.py
index b7b20a1cb..aaf2f3d14 100644
--- a/services/agents/tests/test_osquery_live_query_step.py
+++ b/services/agents/tests/test_osquery_live_query_step.py
@@ -4,6 +4,7 @@ Unit tests for the osquery_live_query playbook step handler.
Tests exercise ``_handle_osquery_live_query`` directly with patched client
classes injected via sys.modules, so no real network calls are made.
"""
+
from __future__ import annotations
import sys
@@ -13,7 +14,6 @@ from unittest.mock import AsyncMock, MagicMock
import pytest
-
# ---------------------------------------------------------------------------
# Inject stub modules BEFORE importing the engine (engine does lazy imports
# inside the handler, so sys.modules stubs are enough).
@@ -85,7 +85,6 @@ _inject_stubs()
from app.playbook.engine import _handle_osquery_live_query # noqa: E402
from app.playbook.models import PlaybookStep, StepType # noqa: E402
-
# ---------------------------------------------------------------------------
# Helpers
# ---------------------------------------------------------------------------
diff --git a/services/agents/tests/test_override_accuracy.py b/services/agents/tests/test_override_accuracy.py
index 611eff86e..f494f6921 100644
--- a/services/agents/tests/test_override_accuracy.py
+++ b/services/agents/tests/test_override_accuracy.py
@@ -25,6 +25,7 @@ Metric:
* override_accuracy — fraction of test assertions that pass.
Floor: 1.0 (every assertion must hold).
"""
+
from __future__ import annotations
import asyncio
@@ -42,10 +43,10 @@ os.environ.setdefault("DATABASE_URL", "")
os.environ.setdefault("REDIS_URL", "")
from app.memory import MemoryManager # noqa: E402
+from app.memory.institutional import _FALLBACK as _INSTITUTIONAL_FALLBACK # noqa: E402
from app.memory.models import OverrideFeedback # noqa: E402
from app.memory.session import _session_caches # noqa: E402
from app.memory.working import _FALLBACK as _WORKING_FALLBACK # noqa: E402
-from app.memory.institutional import _FALLBACK as _INSTITUTIONAL_FALLBACK # noqa: E402
OVERRIDE_ACCURACY_FLOOR = 1.0
@@ -146,9 +147,7 @@ async def test_multi_override_no_collision():
await mgr.ingest_override(fb)
for i, fb in enumerate(overrides):
- result = await mgr.recall(
- f"analyst_override:{fb.alert_id}", tiers=("institutional",)
- )
+ result = await mgr.recall(f"analyst_override:{fb.alert_id}", tiers=("institutional",))
assert result is not None
assert result["analyst_id"] == f"analyst-{i}"
expected = "true_positive" if i % 2 == 0 else "false_positive"
@@ -179,9 +178,7 @@ async def test_override_upsert_idempotent():
)
await mgr.ingest_override(fb_v2)
- result = await mgr.recall(
- "analyst_override:ALT-UPSERT", tiers=("institutional",)
- )
+ result = await mgr.recall("analyst_override:ALT-UPSERT", tiers=("institutional",))
assert result is not None
assert result["corrected_verdict"] == "false_positive"
assert result["reason"] == "Revised after deeper analysis"
@@ -199,14 +196,10 @@ async def test_override_cross_tenant_isolation():
fb = _make_feedback(tenant_id="t-iso-A", alert_id="ALT-ISO")
await mgr_a.ingest_override(fb)
- result_b = await mgr_b.recall(
- "analyst_override:ALT-ISO", tiers=("institutional",)
- )
+ result_b = await mgr_b.recall("analyst_override:ALT-ISO", tiers=("institutional",))
assert result_b is None
- result_a = await mgr_a.recall(
- "analyst_override:ALT-ISO", tiers=("institutional",)
- )
+ result_a = await mgr_a.recall("analyst_override:ALT-ISO", tiers=("institutional",))
assert result_a is not None
@@ -236,9 +229,7 @@ async def test_override_verdict_patterns():
await mgr.ingest_override(fb)
for alert_id, orig, corrected, reason in patterns:
- result = await mgr.recall(
- f"analyst_override:{alert_id}", tiers=("institutional",)
- )
+ result = await mgr.recall(f"analyst_override:{alert_id}", tiers=("institutional",))
assert result is not None
assert result["original_verdict"] == orig
assert result["corrected_verdict"] == corrected
diff --git a/services/agents/tests/test_playbook_completion_rate.py b/services/agents/tests/test_playbook_completion_rate.py
index e2e44bd01..0f8e3c8b2 100644
--- a/services/agents/tests/test_playbook_completion_rate.py
+++ b/services/agents/tests/test_playbook_completion_rate.py
@@ -53,15 +53,17 @@ What this does **not** prove:
Run:
pytest services/agents/tests/test_playbook_completion_rate.py -v
"""
+
from __future__ import annotations
import json
import re
import unittest
from collections import defaultdict
+from collections.abc import Iterable
from dataclasses import dataclass, field
from pathlib import Path
-from typing import Any, Iterable
+from typing import Any
_TESTS_DIR = Path(__file__).parent
_DATASET_PATH = _TESTS_DIR / "eval_data" / "synthetic_incidents.json"
@@ -266,8 +268,7 @@ _RESPONSE_ACTION_SIGNALS: dict[str, dict[str, set[str]]] = {
def _load_dataset() -> list[dict[str, Any]]:
if not _DATASET_PATH.exists():
raise FileNotFoundError(
- f"Synthetic incidents dataset missing at {_DATASET_PATH}. "
- "Run `python3 scripts/generate_eval_incidents.py` to regenerate."
+ f"Synthetic incidents dataset missing at {_DATASET_PATH}. Run `python3 scripts/generate_eval_incidents.py` to regenerate."
)
with _DATASET_PATH.open() as f:
return json.load(f)
@@ -282,10 +283,7 @@ def _load_playbooks() -> tuple[list[dict[str, Any]], list[str]]:
``__path`` field for diagnostics.
"""
if not _PACK_ROOT.exists():
- raise FileNotFoundError(
- f"Playbook pack missing at {_PACK_ROOT}. "
- "Verify `playbooks/packs/v1/` is checked in."
- )
+ raise FileNotFoundError(f"Playbook pack missing at {_PACK_ROOT}. Verify `playbooks/packs/v1/` is checked in.")
playbooks: list[dict[str, Any]] = []
categories: set[str] = set()
for category_dir in sorted(p for p in _PACK_ROOT.iterdir() if p.is_dir()):
@@ -339,9 +337,7 @@ def _step_signals(playbook: dict[str, Any]) -> tuple[set[str], str]:
return types, " | ".join(name_blob_parts)
-def _action_aligned(
- playbook: dict[str, Any], response_class: str
-) -> bool:
+def _action_aligned(playbook: dict[str, Any], response_class: str) -> bool:
sig = _RESPONSE_ACTION_SIGNALS.get(response_class)
if sig is None:
# Unknown response class -> any playbook with at least one step
@@ -433,7 +429,7 @@ class PlaybookCompletionResult:
def severity_completion_rate_mapped(
self,
severities: Iterable[str],
- per_incident: Iterable["IncidentEvaluation"],
+ per_incident: Iterable[IncidentEvaluation],
) -> tuple[float, int, int]:
"""Severity completion measured *only* over mapped templates.
@@ -463,9 +459,7 @@ def _empty_severity_bucket() -> dict[str, int]:
return {"incidents": 0, "covered": 0, "aligned": 0}
-def _evaluate_one(
- incident: dict[str, Any], playbooks: list[dict[str, Any]]
-) -> IncidentEvaluation:
+def _evaluate_one(incident: dict[str, Any], playbooks: list[dict[str, Any]]) -> IncidentEvaluation:
template_id = str(incident.get("template_id", ""))
severity = str(incident.get("severity", "")).lower()
response_class = str(incident.get("response_class", "")).lower()
@@ -512,9 +506,7 @@ def evaluate_playbook_completion(
data = dataset if dataset is not None else SYNTHETIC_INCIDENTS_DATA
pb_pack = playbooks if playbooks is not None else PLAYBOOK_PACK
- result = PlaybookCompletionResult(
- per_incident=[] if keep_per_incident else None
- )
+ result = PlaybookCompletionResult(per_incident=[] if keep_per_incident else None)
# Per-category presence: which categories actually fired against any
# incident? Initialised from the pack so an empty bucket surfaces.
@@ -552,9 +544,7 @@ def evaluate_playbook_completion(
tpl_bucket["covered"] += 1
for m in ev.matches:
if m.is_partial_match:
- cat_bucket = result.per_category.setdefault(
- m.category, {"incidents": 0, "covered": 0, "aligned": 0}
- )
+ cat_bucket = result.per_category.setdefault(m.category, {"incidents": 0, "covered": 0, "aligned": 0})
cat_bucket["covered"] += 1
pb_firing[m.playbook_id]["covers"] += 1
@@ -564,9 +554,7 @@ def evaluate_playbook_completion(
tpl_bucket["aligned"] += 1
for m in ev.matches:
if m.is_full_match:
- cat_bucket = result.per_category.setdefault(
- m.category, {"incidents": 0, "covered": 0, "aligned": 0}
- )
+ cat_bucket = result.per_category.setdefault(m.category, {"incidents": 0, "covered": 0, "aligned": 0})
cat_bucket["aligned"] += 1
pb_firing[m.playbook_id]["aligned_covers"] += 1
@@ -574,9 +562,7 @@ def evaluate_playbook_completion(
# firing side, so a category with mapped templates but no firing
# playbooks shows up as "incidents>0, covered=0").
for cat in ev.mapped_categories:
- cat_bucket = result.per_category.setdefault(
- cat, {"incidents": 0, "covered": 0, "aligned": 0}
- )
+ cat_bucket = result.per_category.setdefault(cat, {"incidents": 0, "covered": 0, "aligned": 0})
cat_bucket["incidents"] += 1
if keep_per_incident and result.per_incident is not None:
@@ -641,8 +627,7 @@ class TestPlaybookCompletionRate(unittest.TestCase):
unclassified = sorted(seen - classified)
self.assertFalse(
unclassified,
- f"Unclassified templates (add to _TEMPLATE_CATEGORIES or "
- f"_TEMPLATES_WITHOUT_PACK_COVERAGE): {unclassified}",
+ f"Unclassified templates (add to _TEMPLATE_CATEGORIES or _TEMPLATES_WITHOUT_PACK_COVERAGE): {unclassified}",
)
def test_overall_completion_rate_floor(self) -> None:
@@ -675,14 +660,9 @@ class TestPlaybookCompletionRate(unittest.TestCase):
*claims* to cover, how many actually have a matching playbook?
"""
per_incident = self.result.per_incident or []
- rate, covered, total = self.result.severity_completion_rate_mapped(
- ("high", "critical"), per_incident
- )
+ rate, covered, total = self.result.severity_completion_rate_mapped(("high", "critical"), per_incident)
raw_rate = self.result.severity_completion_rate(("high", "critical"))
- print(
- "\n[eval] playbook_completion_rate high+critical "
- f"mapped: {rate:.3f} ({covered}/{total}) | raw: {raw_rate:.3f}"
- )
+ print(f"\n[eval] playbook_completion_rate high+critical mapped: {rate:.3f} ({covered}/{total}) | raw: {raw_rate:.3f}")
self.assertGreaterEqual(
rate,
HIGH_CRIT_MAPPED_FLOOR,
@@ -705,11 +685,7 @@ class TestPlaybookCompletionRate(unittest.TestCase):
def test_every_pack_category_fires(self) -> None:
"""Every category folder under packs/v1 must match at least one
incident in the dataset. Dead-weight categories are a regression."""
- dead = [
- cat
- for cat, bucket in self.result.per_category.items()
- if cat in PACK_CATEGORIES and bucket["covered"] == 0
- ]
+ dead = [cat for cat, bucket in self.result.per_category.items() if cat in PACK_CATEGORIES and bucket["covered"] == 0]
self.assertFalse(
dead,
f"Pack categories with zero matched incidents: {dead}",
@@ -720,11 +696,7 @@ class TestPlaybookCompletionRate(unittest.TestCase):
self.assertFalse(
self.result.orphan_playbooks,
"Orphan playbooks (no matching incident in the dataset):\n"
- + "\n".join(
- f" - [{p['category']}] {p['playbook_id']} "
- f"({p['path']})"
- for p in self.result.orphan_playbooks
- ),
+ + "\n".join(f" - [{p['category']}] {p['playbook_id']} ({p['path']})" for p in self.result.orphan_playbooks),
)
def test_no_unexpected_template_regressions(self) -> None:
@@ -733,8 +705,7 @@ class TestPlaybookCompletionRate(unittest.TestCase):
broken playbook trigger. Distinct from documented gaps."""
self.assertFalse(
self.result.orphan_templates,
- f"Mapped templates with zero playbook matches (regression): "
- f"{self.result.orphan_templates}",
+ f"Mapped templates with zero playbook matches (regression): {self.result.orphan_templates}",
)
diff --git a/services/agents/tests/test_rate_limit.py b/services/agents/tests/test_rate_limit.py
index b66c7390f..453f7769f 100644
--- a/services/agents/tests/test_rate_limit.py
+++ b/services/agents/tests/test_rate_limit.py
@@ -34,25 +34,20 @@ from app.core.rate_limit import ( # noqa: E402
_TokenBucket,
)
-
# ---------------------------------------------------------------------------
# RateLimitDecision.to_headers
# ---------------------------------------------------------------------------
def test_to_headers_allowed_omits_retry_after() -> None:
- decision = RateLimitDecision(
- allowed=True, remaining=4.5, capacity=10.0, retry_after_seconds=0.0
- )
+ decision = RateLimitDecision(allowed=True, remaining=4.5, capacity=10.0, retry_after_seconds=0.0)
headers = decision.to_headers()
assert headers == {"X-RateLimit-Limit": "10", "X-RateLimit-Remaining": "4"}
assert "Retry-After" not in headers
def test_to_headers_denied_rounds_retry_after_up() -> None:
- decision = RateLimitDecision(
- allowed=False, remaining=0.0, capacity=20.0, retry_after_seconds=0.001
- )
+ decision = RateLimitDecision(allowed=False, remaining=0.0, capacity=20.0, retry_after_seconds=0.001)
headers = decision.to_headers()
# 0.001s rounds up to 1 second so a client that retries at Retry-After
# doesn't bounce off the bucket again.
@@ -62,9 +57,7 @@ def test_to_headers_denied_rounds_retry_after_up() -> None:
def test_to_headers_denied_retry_after_handles_partial_seconds() -> None:
- decision = RateLimitDecision(
- allowed=False, remaining=0.3, capacity=5.0, retry_after_seconds=2.4
- )
+ decision = RateLimitDecision(allowed=False, remaining=0.3, capacity=5.0, retry_after_seconds=2.4)
headers = decision.to_headers()
# 2.4 + 0.999 -> int -> 3
assert headers["Retry-After"] == "3"
@@ -233,16 +226,12 @@ async def test_concurrent_acquires_never_overdraw() -> None:
"""Per-key lock must prevent two coroutines double-spending a token."""
limiter = TokenBucketLimiter(capacity=5.0, refill_per_second=0.5)
# Fire 20 concurrent acquires against the same key.
- decisions = await asyncio.gather(
- *(limiter.acquire("tenant:a") for _ in range(20))
- )
+ decisions = await asyncio.gather(*(limiter.acquire("tenant:a") for _ in range(20)))
# Bucket starts at 5; refill at 0.5/s for sub-millisecond spread is
# ~negligible, so we expect exactly 5 successes (with at most a
# tiny epsilon worth of refill).
allowed_count = sum(1 for d in decisions if d.allowed)
- assert 5 <= allowed_count <= 6, (
- f"expected 5–6 allowed under high concurrency, got {allowed_count}"
- )
+ assert 5 <= allowed_count <= 6, f"expected 5–6 allowed under high concurrency, got {allowed_count}"
denied = [d for d in decisions if not d.allowed]
assert all(d.retry_after_seconds > 0 for d in denied)
diff --git a/services/api/app/models/tenant.py b/services/api/app/models/tenant.py
index dae74d9b0..1cb118588 100644
--- a/services/api/app/models/tenant.py
+++ b/services/api/app/models/tenant.py
@@ -21,9 +21,7 @@ class Tenant(Base):
settings: Mapped[dict] = mapped_column(JSONB, default=dict)
limits: Mapped[dict] = mapped_column(JSONB, default=dict)
# MSSP hierarchy fields
- parent_tenant_id: Mapped[uuid.UUID | None] = mapped_column(
- UUID(as_uuid=True), ForeignKey("tenants.id"), nullable=True, index=True
- )
+ parent_tenant_id: Mapped[uuid.UUID | None] = mapped_column(UUID(as_uuid=True), ForeignKey("tenants.id"), nullable=True, index=True)
mssp_role: Mapped[str | None] = mapped_column(String(50), nullable=True)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=lambda: datetime.now(UTC))
updated_at: Mapped[datetime] = mapped_column(
diff --git a/services/api/app/services/lake_sql.py b/services/api/app/services/lake_sql.py
index 8ec9d738c..64abbf165 100644
--- a/services/api/app/services/lake_sql.py
+++ b/services/api/app/services/lake_sql.py
@@ -339,40 +339,45 @@ def _direct_tables(select: exp.Select) -> list[exp.Table]:
We deliberately skip tables that live inside nested ``Select`` nodes
(subqueries) — those have their own enclosing Select that the caller
visits separately, and we don't want to double-inject predicates.
+
+ Uses an explicit tree walk that stops at ``exp.Select`` boundaries
+ rather than relying on parent-chain traversal, which is more robust
+ across sqlglot versions that may vary in how they set parent attributes.
"""
out: list[exp.Table] = []
- # sqlglot stores the FROM clause under args["from"]. The Python
- # attribute access form is ``select.from_`` (with trailing
- # underscore because ``from`` is a Python keyword), but the args
- # dict key is the bare SQL keyword. Using the wrong key here used
- # to silently skip every FROM clause and produce queries with
- # neither tenant predicates nor any ``referenced_tables`` audit
- # entry — a tenant-isolation bug.
+ # sqlglot stores the FROM clause under args["from"]. Using the args
+ # dict key is the canonical way to access it regardless of version.
from_expr = select.args.get("from")
if from_expr is not None:
- for table in from_expr.find_all(exp.Table):
- if _is_inside_subquery(table, select):
- continue
- out.append(table)
+ _collect_direct_tables(from_expr, out)
for join in select.args.get("joins") or []:
- for table in join.find_all(exp.Table):
- if _is_inside_subquery(table, select):
- continue
- out.append(table)
+ _collect_direct_tables(join, out)
return out
-def _is_inside_subquery(node: exp.Expression, owning_select: exp.Select) -> bool:
- """True if ``node`` lives inside a Select that isn't ``owning_select``."""
- parent = node.parent
- while parent is not None:
- if isinstance(parent, exp.Select):
- return parent is not owning_select
- parent = parent.parent
- return False
+def _collect_direct_tables(node: exp.Expression, out: list[exp.Table]) -> None:
+ """Walk ``node`` collecting Table references, stopping at nested SELECTs.
+
+ This avoids double-visiting tables that belong to subqueries — each
+ subquery's enclosing Select is visited separately by the outer loop
+ in :func:`rewrite_for_tenant`.
+ """
+ if isinstance(node, exp.Table):
+ out.append(node)
+ return
+ if isinstance(node, exp.Select):
+ # Do not descend into nested selects (subqueries).
+ return
+ for child in node.args.values():
+ if isinstance(child, exp.Expression):
+ _collect_direct_tables(child, out)
+ elif isinstance(child, list):
+ for item in child:
+ if isinstance(item, exp.Expression):
+ _collect_direct_tables(item, out)
def _is_table_function(table: exp.Table) -> bool:
diff --git a/services/connectors/app/api/router.py b/services/connectors/app/api/router.py
index 23015588e..f29b5165f 100644
--- a/services/connectors/app/api/router.py
+++ b/services/connectors/app/api/router.py
@@ -161,10 +161,7 @@ def _require_capability(cls: type, capability: Capability, connector_id: str) ->
if capability not in cls.capabilities():
raise HTTPException(
status_code=status.HTTP_501_NOT_IMPLEMENTED,
- detail=(
- f"connector '{connector_id}' does not declare capability "
- f"'{capability.value}'"
- ),
+ detail=(f"connector '{connector_id}' does not declare capability '{capability.value}'"),
)
@@ -249,12 +246,12 @@ async def test_connector_connection(connector_id: str, payload: TestConnectionRe
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail=f"connector config does not match schema: {exc}",
) from exc
- except Exception: # pragma: no cover - last-ditch
+ except Exception as exc: # pragma: no cover - last-ditch
logger.exception("connector.test.constructor_error", connector_id=_safe_log_val(connector_id))
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail="Failed to construct connector. Check your configuration.",
- )
+ ) from exc
try:
result = await connector.test_connection()
@@ -320,12 +317,12 @@ async def run_federated_query(connector_id: str, payload: FederatedQueryRequest)
raise HTTPException(status_code=status.HTTP_501_NOT_IMPLEMENTED, detail=str(exc)) from exc
except QueryError as exc:
raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=str(exc)) from exc
- except Exception:
+ except Exception as exc:
logger.exception("connector.query.runtime_error", connector_id=_safe_log_val(connector_id))
raise HTTPException(
status_code=status.HTTP_502_BAD_GATEWAY,
detail="Backend query failed. Check connector configuration and connectivity.",
- )
+ ) from exc
return {
"connector_id": connector_id,
@@ -360,7 +357,7 @@ async def push_case(connector_id: str, payload: PushCaseRequest):
result = await connector.push_case(payload.case)
except NotImplementedError as exc:
raise HTTPException(status_code=status.HTTP_501_NOT_IMPLEMENTED, detail=str(exc)) from exc
- except Exception:
+ except Exception as exc:
# Don't leak vendor errors verbatim — they sometimes echo request
# headers / payload fragments. The connector logs the full detail
# via structlog; the API service just sees a generic 502.
@@ -371,7 +368,7 @@ async def push_case(connector_id: str, payload: PushCaseRequest):
raise HTTPException(
status_code=status.HTTP_502_BAD_GATEWAY,
detail="Push to external ITSM failed. Check connector configuration and connectivity.",
- )
+ ) from exc
if not isinstance(result, dict):
raise HTTPException(
@@ -411,7 +408,7 @@ async def push_status_change(connector_id: str, payload: PushStatusChangeRequest
except ValueError as exc:
# e.g. servicenow.push_status_change rejecting a missing sys_id.
raise HTTPException(status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail=str(exc)) from exc
- except Exception:
+ except Exception as exc:
logger.exception(
"connector.push_status_change.runtime_error",
connector_id=_safe_log_val(connector_id),
@@ -419,7 +416,7 @@ async def push_status_change(connector_id: str, payload: PushStatusChangeRequest
raise HTTPException(
status_code=status.HTTP_502_BAD_GATEWAY,
detail="Status sync to external ITSM failed. Check connector configuration and connectivity.",
- )
+ ) from exc
if not isinstance(result, dict):
raise HTTPException(
diff --git a/services/connectors/app/connectors/auth0.py b/services/connectors/app/connectors/auth0.py
index 489890d0c..af25ba0d7 100644
--- a/services/connectors/app/connectors/auth0.py
+++ b/services/connectors/app/connectors/auth0.py
@@ -39,10 +39,7 @@ class Auth0Connector(BaseConnector):
connector_id=cls.connector_id,
connector_name=cls.connector_name,
category=cls.connector_category,
- description=(
- "Auth0 tenant logs. Pulls login events, MFA events, and admin "
- "actions via the Management API."
- ),
+ description=("Auth0 tenant logs. Pulls login events, MFA events, and admin actions via the Management API."),
docs_url="/docs/connectors/auth0",
fields=[
Field(
@@ -115,9 +112,7 @@ class Auth0Connector(BaseConnector):
token = await self._bearer()
if not token:
return []
- since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime(
- "%Y-%m-%dT%H:%M:%S.000Z"
- )
+ since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%dT%H:%M:%S.000Z")
try:
async with httpx.AsyncClient(timeout=30.0) as client:
resp = await client.get(
diff --git a/services/connectors/app/connectors/base.py b/services/connectors/app/connectors/base.py
index a782263f1..e46ccb8ca 100644
--- a/services/connectors/app/connectors/base.py
+++ b/services/connectors/app/connectors/base.py
@@ -19,9 +19,10 @@ for ``"secret"``) is caught at import time, not at form-render time.
from __future__ import annotations
from abc import ABC, abstractmethod
+from collections.abc import Iterable
from dataclasses import asdict, dataclass, field
from enum import Enum
-from typing import TYPE_CHECKING, Any, Iterable, Literal
+from typing import TYPE_CHECKING, Any, Literal
if TYPE_CHECKING:
from app.federated.query import UnifiedQuery
@@ -325,9 +326,7 @@ class BaseConnector(ABC):
return ()
@classmethod
- def effective_capabilities(
- cls, allowed: Iterable[str] | None = None
- ) -> tuple[Capability, ...]:
+ def effective_capabilities(cls, allowed: Iterable[str] | None = None) -> tuple[Capability, ...]:
"""Intersect declared capabilities with a per-instance allowlist.
The API layer calls this with the ``allowed_capabilities`` column
@@ -430,9 +429,7 @@ class BaseConnector(ABC):
Raises:
NotImplementedError: connector did not declare ``Capability.PUSH_CASE``.
"""
- raise NotImplementedError(
- f"connector '{self.connector_id}' does not implement push_case"
- )
+ raise NotImplementedError(f"connector '{self.connector_id}' does not implement push_case")
async def push_status_change(
self,
@@ -460,6 +457,4 @@ class BaseConnector(ABC):
Raises:
NotImplementedError: connector did not declare ``Capability.PUSH_STATUS``.
"""
- raise NotImplementedError(
- f"connector '{self.connector_id}' does not implement push_status_change"
- )
+ raise NotImplementedError(f"connector '{self.connector_id}' does not implement push_status_change")
diff --git a/services/connectors/app/connectors/carbon_black.py b/services/connectors/app/connectors/carbon_black.py
index 5d142289e..a7f41a3b4 100644
--- a/services/connectors/app/connectors/carbon_black.py
+++ b/services/connectors/app/connectors/carbon_black.py
@@ -88,8 +88,7 @@ class CarbonBlackConnector(BaseConnector):
{"value": "apac", "label": "APAC (defense-apjp)"},
],
help_text=(
- "CBC region your tenant is hosted in. The wrong region "
- "returns 401 rather than 404, so this can't be auto-detected."
+ "CBC region your tenant is hosted in. The wrong region returns 401 rather than 404, so this can't be auto-detected."
),
),
Field(
@@ -97,10 +96,7 @@ class CarbonBlackConnector(BaseConnector):
"string",
"Org Key",
placeholder="ABCD1234",
- help_text=(
- "Found in CBC console under Settings → API Access → "
- "API Keys (the column labeled 'Org Key')."
- ),
+ help_text=("Found in CBC console under Settings → API Access → API Keys (the column labeled 'Org Key')."),
),
Field(
"api_id",
diff --git a/services/connectors/app/connectors/cisco_umbrella.py b/services/connectors/app/connectors/cisco_umbrella.py
index 7ac184b5d..295fdedb1 100644
--- a/services/connectors/app/connectors/cisco_umbrella.py
+++ b/services/connectors/app/connectors/cisco_umbrella.py
@@ -35,10 +35,7 @@ class CiscoUmbrellaConnector(BaseConnector):
connector_id=cls.connector_id,
connector_name=cls.connector_name,
category=cls.connector_category,
- description=(
- "Cisco Umbrella DNS + secure web gateway activity. Surfaces "
- "blocked domains, malware verdicts, and proxy events."
- ),
+ description=("Cisco Umbrella DNS + secure web gateway activity. Surfaces blocked domains, malware verdicts, and proxy events."),
docs_url="/docs/connectors/cisco_umbrella",
fields=[
Field("api_key", "secret", "Umbrella Management API Key"),
@@ -113,9 +110,7 @@ class CiscoUmbrellaConnector(BaseConnector):
token = await self._bearer()
if not token:
return []
- from_ts = int(
- (datetime.now(UTC) - timedelta(seconds=since_seconds)).timestamp() * 1000
- )
+ from_ts = int((datetime.now(UTC) - timedelta(seconds=since_seconds)).timestamp() * 1000)
to_ts = int(datetime.now(UTC).timestamp() * 1000)
params: dict[str, Any] = {
"from": from_ts,
diff --git a/services/connectors/app/connectors/cortex_xsiam.py b/services/connectors/app/connectors/cortex_xsiam.py
index 379475963..310692de2 100644
--- a/services/connectors/app/connectors/cortex_xsiam.py
+++ b/services/connectors/app/connectors/cortex_xsiam.py
@@ -104,9 +104,7 @@ class CortexXSIAMConnector(BaseConnector):
"request_data": {
"search_from": 0,
"search_to": 100,
- "filters": [
- {"field": "creation_time", "operator": "gte", "value": since_ms}
- ],
+ "filters": [{"field": "creation_time", "operator": "gte", "value": since_ms}],
"sort": {"field": "creation_time", "keyword": "desc"},
}
},
diff --git a/services/connectors/app/connectors/datadog_cloud_siem.py b/services/connectors/app/connectors/datadog_cloud_siem.py
index 9ea92717e..f78f5ecd4 100644
--- a/services/connectors/app/connectors/datadog_cloud_siem.py
+++ b/services/connectors/app/connectors/datadog_cloud_siem.py
@@ -40,10 +40,7 @@ class DatadogCloudSIEMConnector(BaseConnector):
connector_id=cls.connector_id,
connector_name=cls.connector_name,
category=cls.connector_category,
- description=(
- "Datadog Cloud SIEM. Pulls Security Signals and supports log "
- "search across the Datadog logs platform."
- ),
+ description=("Datadog Cloud SIEM. Pulls Security Signals and supports log search across the Datadog logs platform."),
docs_url="/docs/connectors/datadog-cloud-siem",
fields=[
Field(
@@ -113,9 +110,7 @@ class DatadogCloudSIEMConnector(BaseConnector):
return {"success": False, "connector": self.connector_id, "error": str(exc)}
async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:
- since = (
- datetime.now(UTC) - timedelta(seconds=since_seconds)
- ).strftime("%Y-%m-%dT%H:%M:%SZ")
+ since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%dT%H:%M:%SZ")
try:
async with httpx.AsyncClient(timeout=30.0) as client:
resp = await client.get(
diff --git a/services/connectors/app/connectors/email_inbox.py b/services/connectors/app/connectors/email_inbox.py
index c5e2a0985..48df0b0bd 100644
--- a/services/connectors/app/connectors/email_inbox.py
+++ b/services/connectors/app/connectors/email_inbox.py
@@ -102,10 +102,7 @@ class EmailInboxConnector(BaseConnector):
"password",
"secret",
"Password / App Password",
- help_text=(
- "Use an app-specific password for Gmail / Outlook. "
- "Never your primary account password."
- ),
+ help_text=("Use an app-specific password for Gmail / Outlook. Never your primary account password."),
),
Field(
"mailbox",
@@ -173,9 +170,7 @@ class EmailInboxConnector(BaseConnector):
def _open(self) -> imaplib.IMAP4 | imaplib.IMAP4_SSL:
if self._use_ssl:
ctx = ssl.create_default_context()
- client: imaplib.IMAP4 | imaplib.IMAP4_SSL = imaplib.IMAP4_SSL(
- self._host, self._port, ssl_context=ctx
- )
+ client: imaplib.IMAP4 | imaplib.IMAP4_SSL = imaplib.IMAP4_SSL(self._host, self._port, ssl_context=ctx)
else:
client = imaplib.IMAP4(self._host, self._port)
client.login(self._username, self._password)
@@ -234,8 +229,8 @@ class EmailInboxConnector(BaseConnector):
# Cheap HTML strip — no external dep. Ingest side's template
# only cares about subject / sender / received-at, so the
# body fidelity isn't critical.
- from html import unescape
import re
+ from html import unescape
stripped = re.sub(r"<[^>]+>", " ", html_parts[0])
body = unescape(re.sub(r"\s+", " ", stripped)).strip()
diff --git a/services/connectors/app/connectors/fleetdm.py b/services/connectors/app/connectors/fleetdm.py
index df69b46f8..8defc5d9f 100644
--- a/services/connectors/app/connectors/fleetdm.py
+++ b/services/connectors/app/connectors/fleetdm.py
@@ -319,9 +319,7 @@ class FleetDMConnector(BaseConnector):
"severity": _table_severity(table),
"title": f"FleetDM query: {query.get('name') or query.get('id')}",
"description": (query.get("query") or "")[:400],
- "alert_id": (
- f"fleetdm-q{query.get('id')}-h{row.get('host_id') or row.get('host_hostname')}"
- ),
+ "alert_id": (f"fleetdm-q{query.get('id')}-h{row.get('host_id') or row.get('host_hostname')}"),
"hostname": host_name,
"host": host_name,
"external_id": str(query.get("id")) if query.get("id") is not None else None,
diff --git a/services/connectors/app/connectors/jira_connector.py b/services/connectors/app/connectors/jira_connector.py
index 6fd6e3343..ce267cd27 100644
--- a/services/connectors/app/connectors/jira_connector.py
+++ b/services/connectors/app/connectors/jira_connector.py
@@ -210,9 +210,7 @@ class JiraConnector(BaseConnector):
async def push_case(self, case: dict[str, Any]) -> dict[str, Any]:
"""Mint a Jira issue from an AiSOC case."""
if not self._project_key:
- raise ValueError(
- "jira.push_case: project_key not configured on connector instance"
- )
+ raise ValueError("jira.push_case: project_key not configured on connector instance")
severity = (case.get("severity") or "medium").lower()
title = case.get("title") or f"AiSOC case {case.get('case_number') or case.get('id')}"
diff --git a/services/connectors/app/connectors/lacework.py b/services/connectors/app/connectors/lacework.py
index 27261b0b4..c2473675d 100644
--- a/services/connectors/app/connectors/lacework.py
+++ b/services/connectors/app/connectors/lacework.py
@@ -34,10 +34,7 @@ class LaceworkConnector(BaseConnector):
connector_id=cls.connector_id,
connector_name=cls.connector_name,
category=cls.connector_category,
- description=(
- "Lacework cloud security platform. Pulls alerts (events) and "
- "supports compliance / configuration query."
- ),
+ description=("Lacework cloud security platform. Pulls alerts (events) and supports compliance / configuration query."),
docs_url="/docs/connectors/lacework",
fields=[
Field(
@@ -45,10 +42,7 @@ class LaceworkConnector(BaseConnector):
"string",
"Account subdomain",
placeholder="yourcorp",
- help_text=(
- "First label of your Lacework console URL: "
- "https://<account>.lacework.net"
- ),
+ help_text=("First label of your Lacework console URL: https://<account>.lacework.net"),
),
Field(
"subaccount",
@@ -174,9 +168,7 @@ class LaceworkConnector(BaseConnector):
"category": "cloud",
"severity": sev,
"title": raw.get("alertName") or raw.get("name") or "Lacework alert",
- "description": raw.get("alertInfo", {}).get("description")
- if isinstance(raw.get("alertInfo"), dict)
- else None,
+ "description": raw.get("alertInfo", {}).get("description") if isinstance(raw.get("alertInfo"), dict) else None,
"alert_id": raw.get("alertId") or raw.get("id"),
"host": None,
"raw": raw,
diff --git a/services/connectors/app/connectors/mimecast.py b/services/connectors/app/connectors/mimecast.py
index caacaab51..cc0f7332a 100644
--- a/services/connectors/app/connectors/mimecast.py
+++ b/services/connectors/app/connectors/mimecast.py
@@ -34,10 +34,7 @@ class MimecastConnector(BaseConnector):
connector_id=cls.connector_id,
connector_name=cls.connector_name,
category=cls.connector_category,
- description=(
- "Mimecast Email Security 2.0 API. Pulls held messages, SIEM "
- "events, and URL protect verdicts as alerts."
- ),
+ description=("Mimecast Email Security 2.0 API. Pulls held messages, SIEM events, and URL protect verdicts as alerts."),
docs_url="/docs/connectors/mimecast",
fields=[
Field(
diff --git a/services/connectors/app/connectors/onepassword.py b/services/connectors/app/connectors/onepassword.py
index b15f6c1d8..cc7c60e64 100644
--- a/services/connectors/app/connectors/onepassword.py
+++ b/services/connectors/app/connectors/onepassword.py
@@ -63,9 +63,7 @@ class OnePasswordConnector(BaseConnector):
async def test_connection(self) -> dict[str, Any]:
try:
- since = (datetime.now(UTC) - timedelta(minutes=1)).strftime(
- "%Y-%m-%dT%H:%M:%SZ"
- )
+ since = (datetime.now(UTC) - timedelta(minutes=1)).strftime("%Y-%m-%dT%H:%M:%SZ")
async with httpx.AsyncClient(timeout=15.0) as client:
resp = await client.post(
f"{self._base_url}/api/v1/signinattempts",
@@ -79,9 +77,7 @@ class OnePasswordConnector(BaseConnector):
return {"success": False, "connector": self.connector_id, "error": str(exc)}
async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:
- since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime(
- "%Y-%m-%dT%H:%M:%SZ"
- )
+ since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%dT%H:%M:%SZ")
events: list[dict[str, Any]] = []
cursor: str | None = None
diff --git a/services/connectors/app/connectors/osctrl.py b/services/connectors/app/connectors/osctrl.py
index a83c9a123..a5ef9107e 100644
--- a/services/connectors/app/connectors/osctrl.py
+++ b/services/connectors/app/connectors/osctrl.py
@@ -281,14 +281,9 @@ class OsctrlConnector(BaseConnector):
"category": "endpoint",
"event_type": "osquery_query_row",
"severity": _osctrl_severity(table_name),
- "title": (
- f"osctrl query: {query.get('name') or query.get('uuid') or 'distributed-query'}"
- ),
+ "title": (f"osctrl query: {query.get('name') or query.get('uuid') or 'distributed-query'}"),
"description": (query.get("query") or "")[:400],
- "alert_id": (
- f"{query.get('name') or 'q'}::"
- f"{row.get('uuid') or row.get('host_identifier') or ''}"
- ),
+ "alert_id": (f"{query.get('name') or 'q'}::{row.get('uuid') or row.get('host_identifier') or ''}"),
"hostname": hostname,
"host": hostname,
"external_id": query.get("uuid"),
diff --git a/services/connectors/app/connectors/proofpoint.py b/services/connectors/app/connectors/proofpoint.py
index 312f87969..0822aa4cc 100644
--- a/services/connectors/app/connectors/proofpoint.py
+++ b/services/connectors/app/connectors/proofpoint.py
@@ -65,9 +65,7 @@ class ProofpointConnector(BaseConnector):
async def test_connection(self) -> dict[str, Any]:
try:
- since = (datetime.now(UTC) - timedelta(minutes=5)).strftime(
- "%Y-%m-%dT%H:%M:%SZ"
- )
+ since = (datetime.now(UTC) - timedelta(minutes=5)).strftime("%Y-%m-%dT%H:%M:%SZ")
async with httpx.AsyncClient(timeout=15.0) as client:
resp = await client.get(
f"{_TAP_BASE}/v2/siem/messages/blocked",
@@ -81,9 +79,7 @@ class ProofpointConnector(BaseConnector):
return {"success": False, "connector": self.connector_id, "error": str(exc)}
async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:
- since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime(
- "%Y-%m-%dT%H:%M:%SZ"
- )
+ since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%dT%H:%M:%SZ")
async with httpx.AsyncClient(timeout=30.0) as client:
resp = await client.get(
diff --git a/services/connectors/app/connectors/rapid7_insightidr.py b/services/connectors/app/connectors/rapid7_insightidr.py
index 52b08dc64..0fabbd64d 100644
--- a/services/connectors/app/connectors/rapid7_insightidr.py
+++ b/services/connectors/app/connectors/rapid7_insightidr.py
@@ -43,10 +43,7 @@ class Rapid7InsightIDRConnector(BaseConnector):
connector_id=cls.connector_id,
connector_name=cls.connector_name,
category=cls.connector_category,
- description=(
- "Rapid7 InsightIDR cloud SIEM/XDR. Pulls investigations and "
- "supports log search across collected sources."
- ),
+ description=("Rapid7 InsightIDR cloud SIEM/XDR. Pulls investigations and supports log search across collected sources."),
docs_url="/docs/connectors/rapid7-insightidr",
fields=[
Field(
@@ -109,9 +106,7 @@ class Rapid7InsightIDRConnector(BaseConnector):
return {"success": False, "connector": self.connector_id, "error": str(exc)}
async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:
- since_iso = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime(
- "%Y-%m-%dT%H:%M:%SZ"
- )
+ since_iso = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%dT%H:%M:%SZ")
try:
async with httpx.AsyncClient(timeout=30.0) as client:
resp = await client.get(
diff --git a/services/connectors/app/connectors/salesforce.py b/services/connectors/app/connectors/salesforce.py
index b72218e8e..656a7b4ba 100644
--- a/services/connectors/app/connectors/salesforce.py
+++ b/services/connectors/app/connectors/salesforce.py
@@ -141,9 +141,7 @@ class SalesforceConnector(BaseConnector):
token = await self._bearer()
if not token:
return []
- since_iso = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime(
- "%Y-%m-%dT%H:%M:%SZ"
- )
+ since_iso = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%dT%H:%M:%SZ")
soql = (
"SELECT Id, Action, Section, CreatedDate, CreatedBy.Name, Display "
f"FROM SetupAuditTrail WHERE CreatedDate >= {since_iso} "
diff --git a/services/connectors/app/connectors/sentinelone.py b/services/connectors/app/connectors/sentinelone.py
index 4c51ae4db..c2292ceaf 100644
--- a/services/connectors/app/connectors/sentinelone.py
+++ b/services/connectors/app/connectors/sentinelone.py
@@ -85,9 +85,7 @@ class SentinelOneConnector(BaseConnector):
return {"success": False, "connector": self.connector_id, "error": str(exc)}
async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:
- since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime(
- "%Y-%m-%dT%H:%M:%S.000000Z"
- )
+ since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%dT%H:%M:%S.000000Z")
params: dict[str, Any] = {
"createdAt__gte": since,
"limit": 100,
@@ -119,9 +117,7 @@ class SentinelOneConnector(BaseConnector):
f"{threat_info.get('threatName', 'unknown')} on "
f"{agent_info.get('agentComputerName', 'unknown')}"
),
- "severity": _SEVERITY_MAP.get(
- threat_info.get("confidenceLevel", "Medium"), "medium"
- ),
+ "severity": _SEVERITY_MAP.get(threat_info.get("confidenceLevel", "Medium"), "medium"),
"src_ip": agent_info.get("agentIpV4", agent_info.get("externalIp")),
"hostname": agent_info.get("agentComputerName"),
"actor": threat_info.get("processUser"),
diff --git a/services/connectors/app/connectors/servicenow.py b/services/connectors/app/connectors/servicenow.py
index 10eb3494d..56858b4fa 100644
--- a/services/connectors/app/connectors/servicenow.py
+++ b/services/connectors/app/connectors/servicenow.py
@@ -114,9 +114,7 @@ class ServiceNowConnector(BaseConnector):
return {"success": False, "connector": self.connector_id, "error": str(exc)}
async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:
- since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime(
- "%Y-%m-%d %H:%M:%S"
- )
+ since = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%d %H:%M:%S")
async with httpx.AsyncClient(timeout=30.0) as client:
resp = await client.get(
@@ -263,9 +261,7 @@ class ServiceNowConnector(BaseConnector):
# actually applies.
if target_state in {"6", "7"}:
payload["close_code"] = "Closed/Resolved by Caller"
- payload["close_notes"] = (
- f"Closed by AiSOC (case {case.get('case_number') or case.get('id')})"
- )
+ payload["close_notes"] = f"Closed by AiSOC (case {case.get('case_number') or case.get('id')})"
async with httpx.AsyncClient(timeout=30.0) as client:
resp = await client.patch(
diff --git a/services/connectors/app/connectors/slack_audit.py b/services/connectors/app/connectors/slack_audit.py
index f9db74512..0034fefd7 100644
--- a/services/connectors/app/connectors/slack_audit.py
+++ b/services/connectors/app/connectors/slack_audit.py
@@ -51,10 +51,7 @@ class SlackAuditConnector(BaseConnector):
"access_token",
"secret",
"Org-level access token",
- help_text=(
- "OrgLevel OAuth bot token with the auditlogs:read scope, "
- "issued from a Slack Enterprise Grid app."
- ),
+ help_text=("OrgLevel OAuth bot token with the auditlogs:read scope, issued from a Slack Enterprise Grid app."),
),
],
oauth=OAuthHints(
diff --git a/services/connectors/app/connectors/sumo_logic.py b/services/connectors/app/connectors/sumo_logic.py
index 26a15bef0..42d7c7ce0 100644
--- a/services/connectors/app/connectors/sumo_logic.py
+++ b/services/connectors/app/connectors/sumo_logic.py
@@ -48,8 +48,7 @@ class SumoLogicConnector(BaseConnector):
connector_name=cls.connector_name,
category=cls.connector_category,
description=(
- "Sumo Logic Cloud SIEM Enterprise (CSE). Pulls insights and "
- "signals, and supports log search jobs across the platform."
+ "Sumo Logic Cloud SIEM Enterprise (CSE). Pulls insights and signals, and supports log search jobs across the platform."
),
docs_url="/docs/connectors/sumo-logic",
fields=[
@@ -122,9 +121,7 @@ class SumoLogicConnector(BaseConnector):
return {"success": False, "connector": self.connector_id, "error": str(exc)}
async def fetch_alerts(self, since_seconds: int = 300) -> list[dict[str, Any]]:
- since_iso = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime(
- "%Y-%m-%dT%H:%M:%S"
- )
+ since_iso = (datetime.now(UTC) - timedelta(seconds=since_seconds)).strftime("%Y-%m-%dT%H:%M:%S")
try:
async with httpx.AsyncClient(timeout=30.0) as client:
resp = await client.get(
diff --git a/services/connectors/app/connectors/trellix_helix.py b/services/connectors/app/connectors/trellix_helix.py
index 9dc41756b..b99f99e0f 100644
--- a/services/connectors/app/connectors/trellix_helix.py
+++ b/services/connectors/app/connectors/trellix_helix.py
@@ -61,10 +61,7 @@ class TrellixHelixConnector(BaseConnector):
"string",
"Customer ID",
placeholder="abcd1234",
- help_text=(
- "The slug between '/helix/id/' and '/' in your Helix "
- "console URL. Lowercase alphanumeric."
- ),
+ help_text=("The slug between '/helix/id/' and '/' in your Helix console URL. Lowercase alphanumeric."),
),
Field(
"api_key",
diff --git a/services/connectors/app/connectors/trend_vision_one.py b/services/connectors/app/connectors/trend_vision_one.py
index b8a5c9a2e..944d12fca 100644
--- a/services/connectors/app/connectors/trend_vision_one.py
+++ b/services/connectors/app/connectors/trend_vision_one.py
@@ -72,10 +72,7 @@ class TrendVisionOneConnector(BaseConnector):
"api_token",
"secret",
"API Token",
- help_text=(
- "Bearer token issued from Vision One console: "
- "Administration → API Keys."
- ),
+ help_text=("Bearer token issued from Vision One console: Administration → API Keys."),
),
],
)
diff --git a/services/connectors/app/connectors/zscaler.py b/services/connectors/app/connectors/zscaler.py
index 82804f92f..63f4836f8 100644
--- a/services/connectors/app/connectors/zscaler.py
+++ b/services/connectors/app/connectors/zscaler.py
@@ -78,7 +78,7 @@ class ZscalerConnector(BaseConnector):
n = now[-6:]
r = str(int(n) >> 1).zfill(6)
key = ""
- for i, ch in enumerate(r):
+ for _i, ch in enumerate(r):
key += self._api_key[int(ch)]
return key, now
diff --git a/services/connectors/app/db/connector_repo.py b/services/connectors/app/db/connector_repo.py
index 8fc93bbfe..c288512a9 100644
--- a/services/connectors/app/db/connector_repo.py
+++ b/services/connectors/app/db/connector_repo.py
@@ -211,11 +211,7 @@ async def record_poll_success(
values["last_event_at"] = last_event_at
if last_event_kind is not None:
values["last_event_kind"] = last_event_kind
- stmt = (
- update(connectors_table)
- .where(connectors_table.c.id == connector_id)
- .values(**values)
- )
+ stmt = update(connectors_table).where(connectors_table.c.id == connector_id).values(**values)
await connection.execute(stmt)
@@ -260,11 +256,7 @@ async def record_backfill_run(
a recovery flap.
"""
now = datetime.now(UTC)
- stmt = (
- update(connectors_table)
- .where(connectors_table.c.id == connector_id)
- .values(last_backfill_at=now, updated_at=now)
- )
+ stmt = update(connectors_table).where(connectors_table.c.id == connector_id).values(last_backfill_at=now, updated_at=now)
await connection.execute(stmt)
diff --git a/services/connectors/app/pipeline/__init__.py b/services/connectors/app/pipeline/__init__.py
index c29593fa4..075a7b402 100644
--- a/services/connectors/app/pipeline/__init__.py
+++ b/services/connectors/app/pipeline/__init__.py
@@ -17,8 +17,8 @@ scheduler state — that's the scheduler's job.
from __future__ import annotations
-from app.pipeline.fingerprint import compute_fingerprint, diff_fingerprints
from app.pipeline.filter_rules import FilterDecision, apply_filter_rules
+from app.pipeline.fingerprint import compute_fingerprint, diff_fingerprints
__all__ = [
"FilterDecision",
diff --git a/services/connectors/app/pipeline/filter_rules.py b/services/connectors/app/pipeline/filter_rules.py
index 7b6ea9048..1b23fb8b8 100644
--- a/services/connectors/app/pipeline/filter_rules.py
+++ b/services/connectors/app/pipeline/filter_rules.py
@@ -47,9 +47,7 @@ from typing import Any
# Operator vocabulary mirrors federated/query.py to avoid teaching the
# user two slightly different dialects of "this field equals that value".
-_VALID_OPS: frozenset[str] = frozenset(
- {"eq", "ne", "contains", "starts_with", "ends_with", "in"}
-)
+_VALID_OPS: frozenset[str] = frozenset({"eq", "ne", "contains", "starts_with", "ends_with", "in"})
_VALID_ACTIONS: frozenset[str] = frozenset({"drop", "keep"})
diff --git a/services/connectors/app/scheduler.py b/services/connectors/app/scheduler.py
index b7e1866aa..795c8fd87 100644
--- a/services/connectors/app/scheduler.py
+++ b/services/connectors/app/scheduler.py
@@ -111,7 +111,7 @@ _MAX_POLL_INTERVAL_S = 86400 # 24 hours
# regardless of outage length, to prevent a 3-day outage from triggering
# a 3-day query that the source rate-limits or rejects.
_BACKFILL_OUTAGE_THRESHOLD_S = 30 * 60 # 30 minutes
-_BACKFILL_FLAP_WINDOW_S = 10 * 60 # 10 minutes
+_BACKFILL_FLAP_WINDOW_S = 10 * 60 # 10 minutes
_MAX_BACKFILL_LOOKBACK_S = 24 * 60 * 60 # 24 hours
# Small buffer added to the computed backfill window to cover the gap
# between the last successful poll and ``last_outage_at`` (which is set
diff --git a/services/connectors/app/scripts/serve.py b/services/connectors/app/scripts/serve.py
index dc7873172..11a404b28 100644
--- a/services/connectors/app/scripts/serve.py
+++ b/services/connectors/app/scripts/serve.py
@@ -2,6 +2,7 @@
See ``services/api/app/scripts/serve.py`` for the full rationale.
"""
+
from __future__ import annotations
import os
diff --git a/services/connectors/tests/test_email_inbox.py b/services/connectors/tests/test_email_inbox.py
index d7573b665..596c37589 100644
--- a/services/connectors/tests/test_email_inbox.py
+++ b/services/connectors/tests/test_email_inbox.py
@@ -268,16 +268,11 @@ def test_fetch_alerts_truncates_oversized_body(monkeypatch: pytest.MonkeyPatch):
def test_fetch_alerts_respects_max_messages_cap(monkeypatch: pytest.MonkeyPatch):
"""If the mailbox has more unread than ``max_messages``, we only
pull the cap and leave the rest for the next poll."""
- msgs = {
- f"{i}".encode(): _build_plaintext_message(subject=f"Alert {i}")
- for i in range(10)
- }
+ msgs = {f"{i}".encode(): _build_plaintext_message(subject=f"Alert {i}") for i in range(10)}
fake = _FakeIMAP(messages=msgs)
_patch_imap(monkeypatch, fake)
- c = EmailInboxConnector(
- host="imap.test", username="u", password="p", max_messages=3
- )
+ c = EmailInboxConnector(host="imap.test", username="u", password="p", max_messages=3)
events = _run(c.fetch_alerts())
assert len(events) == 3
@@ -303,11 +298,7 @@ def test_fetch_alerts_returns_empty_on_imap_failure(
def test_use_ssl_string_form_is_truthy(monkeypatch: pytest.MonkeyPatch):
"""The wizard form may serialize booleans as strings — make sure
"true"/"false" round-trip correctly."""
- c1 = EmailInboxConnector(
- host="imap.test", username="u", password="p", use_ssl="true"
- )
+ c1 = EmailInboxConnector(host="imap.test", username="u", password="p", use_ssl="true")
assert c1._use_ssl is True
- c2 = EmailInboxConnector(
- host="imap.test", username="u", password="p", use_ssl="false"
- )
+ c2 = EmailInboxConnector(host="imap.test", username="u", password="p", use_ssl="false")
assert c2._use_ssl is False
diff --git a/services/connectors/tests/test_push_capabilities.py b/services/connectors/tests/test_push_capabilities.py
index 429b5e901..860374762 100644
--- a/services/connectors/tests/test_push_capabilities.py
+++ b/services/connectors/tests/test_push_capabilities.py
@@ -30,11 +30,9 @@ from unittest.mock import AsyncMock, MagicMock, patch
import httpx
import pytest
-
from app.connectors.jira_connector import JiraConnector
from app.connectors.servicenow import ServiceNowConnector
-
# ---------------------------------------------------------------------------
# Helpers — build httpx.Response stubs without instantiating a real Client.
# ---------------------------------------------------------------------------
@@ -144,10 +142,7 @@ async def test_jira_push_case_builds_correct_payload_and_url() -> None:
assert payload["fields"]["priority"] == {"name": "High"}
# ADF doc shape — connector wraps the plain string under content[0].text.
assert payload["fields"]["description"]["type"] == "doc"
- assert (
- payload["fields"]["description"]["content"][0]["content"][0]["text"]
- == case["description"]
- )
+ assert payload["fields"]["description"]["content"][0]["content"][0]["text"] == case["description"]
# Label round-trips the AiSOC case identifier so the inbound webhook
# can link the issue back to us without a custom field.
assert f"aisoc-case-{case['id']}" in payload["fields"]["labels"]
@@ -187,9 +182,7 @@ async def test_jira_push_case_severity_collapses_to_default() -> None:
api_token="t",
project_key="SEC",
)
- response = _build_response(
- status_code=201, json_body={"key": "SEC-1", "id": "1"}
- )
+ response = _build_response(status_code=201, json_body={"key": "SEC-1", "id": "1"})
with patch("app.connectors.jira_connector.httpx.AsyncClient") as mock_client:
post_mock = AsyncMock(return_value=response)
@@ -210,9 +203,7 @@ async def test_jira_push_case_summary_truncates_at_255() -> None:
project_key="SEC",
)
long_title = "x" * 400
- response = _build_response(
- status_code=201, json_body={"key": "SEC-1", "id": "1"}
- )
+ response = _build_response(status_code=201, json_body={"key": "SEC-1", "id": "1"})
with patch("app.connectors.jira_connector.httpx.AsyncClient") as mock_client:
post_mock = AsyncMock(return_value=response)
@@ -256,9 +247,7 @@ async def test_jira_push_status_change_falls_through_to_push_case_when_no_ref()
api_token="t",
project_key="SEC",
)
- response = _build_response(
- status_code=201, json_body={"key": "SEC-7", "id": "7"}
- )
+ response = _build_response(status_code=201, json_body={"key": "SEC-7", "id": "7"})
with patch("app.connectors.jira_connector.httpx.AsyncClient") as mock_client:
post_mock = AsyncMock(return_value=response)
@@ -414,12 +403,8 @@ async def test_jira_push_status_change_raises_on_transition_4xx() -> None:
transition_post = _build_response(status_code=403, text="forbidden")
with patch("app.connectors.jira_connector.httpx.AsyncClient") as mock_client:
- mock_client.return_value.__aenter__.return_value.get = AsyncMock(
- return_value=transitions_response
- )
- mock_client.return_value.__aenter__.return_value.post = AsyncMock(
- return_value=transition_post
- )
+ mock_client.return_value.__aenter__.return_value.get = AsyncMock(return_value=transitions_response)
+ mock_client.return_value.__aenter__.return_value.post = AsyncMock(return_value=transition_post)
with pytest.raises(httpx.HTTPStatusError, match="jira.push_status_change failed"):
await connector.push_status_change(
@@ -493,9 +478,7 @@ async def test_snow_push_case_short_description_truncates_at_160() -> None:
username="u",
password="p",
)
- response = _build_response(
- status_code=201, json_body={"result": {"sys_id": "x" * 32, "state": "1"}}
- )
+ response = _build_response(status_code=201, json_body={"result": {"sys_id": "x" * 32, "state": "1"}})
with patch("app.connectors.servicenow.httpx.AsyncClient") as mock_client:
post_mock = AsyncMock(return_value=response)
@@ -537,9 +520,7 @@ async def test_snow_push_status_change_falls_through_to_push_case_when_no_ref()
username="u",
password="p",
)
- response = _build_response(
- status_code=201, json_body={"result": {"sys_id": "x" * 32, "state": "1"}}
- )
+ response = _build_response(status_code=201, json_body={"result": {"sys_id": "x" * 32, "state": "1"}})
with patch("app.connectors.servicenow.httpx.AsyncClient") as mock_client:
post_mock = AsyncMock(return_value=response)
@@ -602,9 +583,7 @@ async def test_snow_push_status_change_in_progress_patches_state_only() -> None:
username="u",
password="p",
)
- response = _build_response(
- status_code=200, json_body={"result": {"sys_id": "abc", "state": "2"}}
- )
+ response = _build_response(status_code=200, json_body={"result": {"sys_id": "abc", "state": "2"}})
with patch("app.connectors.servicenow.httpx.AsyncClient") as mock_client:
patch_mock = AsyncMock(return_value=response)
@@ -635,9 +614,7 @@ async def test_snow_push_status_change_resolved_includes_close_metadata() -> Non
username="u",
password="p",
)
- response = _build_response(
- status_code=200, json_body={"result": {"sys_id": "abc", "state": "6"}}
- )
+ response = _build_response(status_code=200, json_body={"result": {"sys_id": "abc", "state": "6"}})
with patch("app.connectors.servicenow.httpx.AsyncClient") as mock_client:
patch_mock = AsyncMock(return_value=response)
@@ -664,9 +641,7 @@ async def test_snow_push_status_change_closed_includes_close_metadata() -> None:
username="u",
password="p",
)
- response = _build_response(
- status_code=200, json_body={"result": {"sys_id": "abc", "state": "7"}}
- )
+ response = _build_response(status_code=200, json_body={"result": {"sys_id": "abc", "state": "7"}})
with patch("app.connectors.servicenow.httpx.AsyncClient") as mock_client:
patch_mock = AsyncMock(return_value=response)
@@ -695,9 +670,7 @@ async def test_snow_push_status_change_raises_on_4xx() -> None:
response = _build_response(status_code=403, text="ACL denied on incident")
with patch("app.connectors.servicenow.httpx.AsyncClient") as mock_client:
- mock_client.return_value.__aenter__.return_value.patch = AsyncMock(
- return_value=response
- )
+ mock_client.return_value.__aenter__.return_value.patch = AsyncMock(return_value=response)
with pytest.raises(httpx.HTTPStatusError, match="servicenow.push_status_change failed"):
await connector.push_status_change(
case={"id": "1"},
diff --git a/services/connectors/tests/test_scheduler.py b/services/connectors/tests/test_scheduler.py
index afa43f6ff..0db050eaf 100644
--- a/services/connectors/tests/test_scheduler.py
+++ b/services/connectors/tests/test_scheduler.py
@@ -235,9 +235,7 @@ async def test_poll_one_detects_schema_drift(monkeypatch):
inst.schema_fingerprint = stale_fp
fake_connector = MagicMock()
- fake_connector.fetch_alerts = AsyncMock(
- return_value=[{"severity": "high", "host": "h1", "new_field": "x"}]
- )
+ fake_connector.fetch_alerts = AsyncMock(return_value=[{"severity": "high", "host": "h1", "new_field": "x"}])
fake_connector.normalize = MagicMock(side_effect=lambda e: e)
monkeypatch.setattr(
@@ -746,9 +744,7 @@ async def test_poll_one_backfill_window_capped_at_max(monkeypatch):
# Two fetches: recovery + one-shot backfill.
assert fake_connector.fetch_alerts.await_count == 2
- backfill_seconds = fake_connector.fetch_alerts.await_args_list[1].kwargs[
- "since_seconds"
- ]
+ backfill_seconds = fake_connector.fetch_alerts.await_args_list[1].kwargs["since_seconds"]
# The cap kicks in BEFORE the buffer is added inside _poll_one
# (see ``backfill_window_seconds = min(...)``), so the value passed
# to the recursive call equals the cap exactly.
@@ -918,9 +914,7 @@ def _patch_repo_calls(monkeypatch):
fingerprint: str,
details: dict[str, Any],
) -> None:
- getattr(conn.engine, "drift_calls", []).append(
- {"connector_id": connector_id, "fingerprint": fingerprint, "details": details}
- )
+ getattr(conn.engine, "drift_calls", []).append({"connector_id": connector_id, "fingerprint": fingerprint, "details": details})
async def fake_record_backfill_run(
conn: Any,
diff --git a/services/fusion/app/services/fusion_engine.py b/services/fusion/app/services/fusion_engine.py
index 2ee0d26c9..53094cb9d 100644
--- a/services/fusion/app/services/fusion_engine.py
+++ b/services/fusion/app/services/fusion_engine.py
@@ -8,6 +8,7 @@ from uuid import UUID
import structlog
+from app.core.config import settings
from app.models.alert import FusedAlert, FusionDecision, RawAlert
from app.services.confidence import ConfidenceScorer
from app.services.correlator import Correlator
@@ -16,8 +17,6 @@ from app.services.entity_risk import EntityRiskEngine
from app.services.ml_scorer import MLScorer
from app.services.vuln_boost import apply_vuln_boost
-from app.core.config import settings
-
logger = structlog.get_logger()
diff --git a/services/fusion/app/services/vuln_boost.py b/services/fusion/app/services/vuln_boost.py
index 92b6bd2cd..90452b963 100644
--- a/services/fusion/app/services/vuln_boost.py
+++ b/services/fusion/app/services/vuln_boost.py
@@ -6,7 +6,6 @@ service. If any entry has `is_exploited: true`, we set `exploit_in_wild=True`
on the FusedAlert and append a positive ConfidenceFactor.
"""
-
import structlog
from app.models.alert import ConfidenceFactor, FusedAlert
diff --git a/services/osquery-extensions/Makefile b/services/osquery-extensions/Makefile
new file mode 100644
index 000000000..faeff5dfd
--- /dev/null
+++ b/services/osquery-extensions/Makefile
@@ -0,0 +1,39 @@
+BINARY := aisoc-extension
+MODULE := github.com/beenuar/aisoc/osquery-extensions
+GOFLAGS := -trimpath -ldflags "-s -w"
+PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64
+
+# ─── default target ──────────────────────────────────────────────────────────
+.PHONY: build
+build:
+ go build $(GOFLAGS) -o dist/$(BINARY) .
+
+# ─── run unit tests ──────────────────────────────────────────────────────────
+.PHONY: test
+test:
+ go test -race -count=1 ./...
+
+# ─── cross-platform release builds ───────────────────────────────────────────
+.PHONY: release
+release:
+ @mkdir -p dist
+ $(foreach PLATFORM,$(PLATFORMS), \
+ $(eval GOOS := $(word 1,$(subst /, ,$(PLATFORM)))) \
+ $(eval GOARCH := $(word 2,$(subst /, ,$(PLATFORM)))) \
+ $(eval SUFFIX := $(if $(filter windows,$(GOOS)),.exe,)) \
+ $(eval OUT := dist/$(BINARY)-$(GOOS)-$(GOARCH)$(SUFFIX)) \
+ GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(GOFLAGS) -o $(OUT) . ; \
+ )
+
+# ─── tidy / lint ─────────────────────────────────────────────────────────────
+.PHONY: tidy vet
+tidy:
+ go mod tidy
+
+vet:
+ go vet ./...
+
+# ─── clean ───────────────────────────────────────────────────────────────────
+.PHONY: clean
+clean:
+ rm -rf dist/
diff --git a/services/osquery-extensions/go.mod b/services/osquery-extensions/go.mod
new file mode 100644
index 000000000..7ada0e08d
--- /dev/null
+++ b/services/osquery-extensions/go.mod
@@ -0,0 +1,17 @@
+module github.com/beenuar/aisoc/osquery-extensions
+
+go 1.26
+
+require github.com/osquery/osquery-go v0.0.0-20260508130258-3e773449a5d4
+
+require (
+ github.com/Microsoft/go-winio v0.6.2 // indirect
+ github.com/apache/thrift v0.23.0 // indirect
+ github.com/go-logr/logr v1.2.4 // indirect
+ github.com/go-logr/stdr v1.2.2 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ go.opentelemetry.io/otel v1.16.0 // indirect
+ go.opentelemetry.io/otel/metric v1.16.0 // indirect
+ go.opentelemetry.io/otel/trace v1.16.0 // indirect
+ golang.org/x/sys v0.25.0 // indirect
+)
diff --git a/services/osquery-extensions/go.sum b/services/osquery-extensions/go.sum
new file mode 100644
index 000000000..540397911
--- /dev/null
+++ b/services/osquery-extensions/go.sum
@@ -0,0 +1,31 @@
+github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
+github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
+github.com/apache/thrift v0.23.0 h1:wKR6YnefQSEnxpEfmgTPuJibNG4bF0p2TK34tHLWi3s=
+github.com/apache/thrift v0.23.0/go.mod h1:zPt6WxgvTOM6hF92y8C+MkEM5LMxZuk4JcQOiU4Esvs=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
+github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/osquery/osquery-go v0.0.0-20260508130258-3e773449a5d4 h1:A+koNnz8s49uOiFQuUOAfvDirxt2c28roPF0aXCfyBQ=
+github.com/osquery/osquery-go v0.0.0-20260508130258-3e773449a5d4/go.mod h1:/Nxgn14on72pNnpjn9Fbw9WQc8JKY1sVv5K+SRZknEk=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
+github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
+go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s=
+go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4=
+go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo=
+go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4=
+go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs=
+go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0=
+golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
+golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/services/osquery-extensions/internal/aisocapi/client.go b/services/osquery-extensions/internal/aisocapi/client.go
new file mode 100644
index 000000000..847c0e3ac
--- /dev/null
+++ b/services/osquery-extensions/internal/aisocapi/client.go
@@ -0,0 +1,132 @@
+// Package aisocapi provides a lightweight HTTP client for the AiSOC API
+// endpoints consumed by the osquery extension.
+package aisocapi
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "net/url"
+ "time"
+
+ "github.com/beenuar/aisoc/osquery-extensions/internal/config"
+)
+
+// Client talks to the AiSOC API on behalf of the extension.
+type Client struct {
+ cfg *config.Config
+ http *http.Client
+}
+
+// New returns a Client backed by cfg.
+func New(cfg *config.Config) *Client {
+ return &Client{
+ cfg: cfg,
+ http: &http.Client{Timeout: cfg.HTTPTimeout},
+ }
+}
+
+// ─── Response types ──────────────────────────────────────────────────────────
+
+// PendingAction represents one HITL (human-in-the-loop) action awaiting
+// approval for this host.
+type PendingAction struct {
+ ActionID string `json:"action_id"`
+ CaseID string `json:"case_id"`
+ ActionType string `json:"action_type"`
+ Target string `json:"target"`
+ RequestedBy string `json:"requested_by"`
+ RequestedAt string `json:"requested_at"`
+ ExpiresAt string `json:"expires_at"`
+ Description string `json:"description"`
+}
+
+// AlertCacheEntry is a recent alert for this host.
+type AlertCacheEntry struct {
+ AlertID string `json:"alert_id"`
+ RuleID string `json:"rule_id"`
+ Severity string `json:"severity"`
+ FiredAt string `json:"fired_at"`
+ Summary string `json:"summary"`
+ CaseID string `json:"case_id"`
+}
+
+// PersistenceEntry is one item from the AiSOC persistence baseline for this
+// host. The extension joins this data against the live osquery tables.
+type PersistenceEntry struct {
+ EntryID string `json:"entry_id"`
+ Mechanism string `json:"mechanism"` // cron|systemd|launchd|registry_run|…
+ Path string `json:"path"`
+ Arguments string `json:"arguments"`
+ Approved bool `json:"approved"`
+ MITRETech string `json:"mitre_technique"`
+}
+
+// ─── API methods ─────────────────────────────────────────────────────────────
+
+// GetPendingActions returns HITL actions queued for the configured host.
+func (c *Client) GetPendingActions(ctx context.Context) ([]PendingAction, error) {
+ var result []PendingAction
+ if err := c.get(ctx, "/v1/extensions/pending-actions", url.Values{
+ "host_identifier": {c.cfg.HostIdentifier},
+ }, &result); err != nil {
+ return nil, fmt.Errorf("pending-actions: %w", err)
+ }
+ return result, nil
+}
+
+// GetAlertCache returns alerts fired for this host in the last 24 h.
+func (c *Client) GetAlertCache(ctx context.Context) ([]AlertCacheEntry, error) {
+ since := time.Now().Add(-24 * time.Hour).UTC().Format(time.RFC3339)
+ var result []AlertCacheEntry
+ if err := c.get(ctx, "/v1/extensions/alert-cache", url.Values{
+ "host_identifier": {c.cfg.HostIdentifier},
+ "since": {since},
+ }, &result); err != nil {
+ return nil, fmt.Errorf("alert-cache: %w", err)
+ }
+ return result, nil
+}
+
+// GetPersistenceBaseline returns the approved persistence baseline for this
+// host.
+func (c *Client) GetPersistenceBaseline(ctx context.Context) ([]PersistenceEntry, error) {
+ var result []PersistenceEntry
+ if err := c.get(ctx, "/v1/extensions/persistence-baseline", url.Values{
+ "host_identifier": {c.cfg.HostIdentifier},
+ }, &result); err != nil {
+ return nil, fmt.Errorf("persistence-baseline: %w", err)
+ }
+ return result, nil
+}
+
+// ─── Internal helpers ─────────────────────────────────────────────────────────
+
+func (c *Client) get(ctx context.Context, path string, params url.Values, dst any) error {
+ u, err := url.Parse(c.cfg.APIURL + path)
+ if err != nil {
+ return err
+ }
+ u.RawQuery = params.Encode()
+
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, u.String(), nil)
+ if err != nil {
+ return err
+ }
+ if c.cfg.APIToken != "" {
+ req.Header.Set("Authorization", "Bearer "+c.cfg.APIToken)
+ }
+ req.Header.Set("Accept", "application/json")
+
+ resp, err := c.http.Do(req)
+ if err != nil {
+ return err
+ }
+ defer resp.Body.Close()
+
+ if resp.StatusCode >= 400 {
+ return fmt.Errorf("HTTP %d from %s", resp.StatusCode, u.String())
+ }
+ return json.NewDecoder(resp.Body).Decode(dst)
+}
diff --git a/services/osquery-extensions/internal/aisocapi/client_test.go b/services/osquery-extensions/internal/aisocapi/client_test.go
new file mode 100644
index 000000000..5eca334ed
--- /dev/null
+++ b/services/osquery-extensions/internal/aisocapi/client_test.go
@@ -0,0 +1,86 @@
+package aisocapi_test
+
+import (
+ "context"
+ "encoding/json"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+ "time"
+
+ "github.com/beenuar/aisoc/osquery-extensions/internal/aisocapi"
+ "github.com/beenuar/aisoc/osquery-extensions/internal/config"
+)
+
+func newTestClient(t *testing.T, handler http.HandlerFunc) (*aisocapi.Client, *httptest.Server) {
+ t.Helper()
+ srv := httptest.NewServer(handler)
+ cfg := &config.Config{
+ APIURL: srv.URL,
+ APIToken: "test-token",
+ HostIdentifier: "test-host",
+ HTTPTimeout: 5 * time.Second,
+ }
+ return aisocapi.New(cfg), srv
+}
+
+func TestGetPendingActions(t *testing.T) {
+ want := []aisocapi.PendingAction{
+ {
+ ActionID: "act-001",
+ ActionType: "isolate",
+ Target: "test-host",
+ },
+ }
+ client, srv := newTestClient(t, func(w http.ResponseWriter, r *http.Request) {
+ if r.URL.Path != "/v1/extensions/pending-actions" {
+ t.Errorf("unexpected path: %s", r.URL.Path)
+ }
+ if r.Header.Get("Authorization") != "Bearer test-token" {
+ t.Errorf("missing/wrong auth header")
+ }
+ _ = json.NewEncoder(w).Encode(want)
+ })
+ defer srv.Close()
+
+ got, err := client.GetPendingActions(context.Background())
+ if err != nil {
+ t.Fatalf("GetPendingActions: %v", err)
+ }
+ if len(got) != 1 || got[0].ActionID != "act-001" {
+ t.Errorf("unexpected result: %+v", got)
+ }
+}
+
+func TestGetAlertCache(t *testing.T) {
+ want := []aisocapi.AlertCacheEntry{
+ {AlertID: "alr-999", Severity: "HIGH"},
+ }
+ client, srv := newTestClient(t, func(w http.ResponseWriter, r *http.Request) {
+ if r.URL.Path != "/v1/extensions/alert-cache" {
+ t.Errorf("unexpected path: %s", r.URL.Path)
+ }
+ _ = json.NewEncoder(w).Encode(want)
+ })
+ defer srv.Close()
+
+ got, err := client.GetAlertCache(context.Background())
+ if err != nil {
+ t.Fatalf("GetAlertCache: %v", err)
+ }
+ if len(got) != 1 || got[0].AlertID != "alr-999" {
+ t.Errorf("unexpected result: %+v", got)
+ }
+}
+
+func TestHTTPError(t *testing.T) {
+ client, srv := newTestClient(t, func(w http.ResponseWriter, _ *http.Request) {
+ http.Error(w, "forbidden", http.StatusForbidden)
+ })
+ defer srv.Close()
+
+ _, err := client.GetPendingActions(context.Background())
+ if err == nil {
+ t.Fatal("expected error for 403 response")
+ }
+}
diff --git a/services/osquery-extensions/internal/config/config.go b/services/osquery-extensions/internal/config/config.go
new file mode 100644
index 000000000..2506d6431
--- /dev/null
+++ b/services/osquery-extensions/internal/config/config.go
@@ -0,0 +1,45 @@
+// Package config reads AiSOC extension configuration from environment variables.
+package config
+
+import (
+ "os"
+ "time"
+)
+
+// Config holds runtime configuration for the osquery extension.
+type Config struct {
+ // AISOC_API_URL is the base URL of the AiSOC API service.
+ // Example: https://api.example.com
+ APIURL string
+
+ // AISOC_API_TOKEN is a host-scoped read-only token issued by the AiSOC API.
+ APIToken string
+
+ // HostIdentifier uniquely identifies this host to the AiSOC API.
+ // Defaults to the machine hostname when not set.
+ HostIdentifier string
+
+ // Timeout for all outbound HTTP requests.
+ HTTPTimeout time.Duration
+}
+
+// Load returns a Config populated from environment variables with sensible
+// defaults. It never returns nil.
+func Load() *Config {
+ host, _ := os.Hostname()
+
+ cfg := &Config{
+ APIURL: getenv("AISOC_API_URL", "http://localhost:8000"),
+ APIToken: getenv("AISOC_API_TOKEN", ""),
+ HostIdentifier: getenv("AISOC_HOST_ID", host),
+ HTTPTimeout: 10 * time.Second,
+ }
+ return cfg
+}
+
+func getenv(key, fallback string) string {
+ if v := os.Getenv(key); v != "" {
+ return v
+ }
+ return fallback
+}
diff --git a/services/osquery-extensions/main.go b/services/osquery-extensions/main.go
new file mode 100644
index 000000000..e02eb17b8
--- /dev/null
+++ b/services/osquery-extensions/main.go
@@ -0,0 +1,78 @@
+// Command aisoc-extension is an osquery extension that exposes five virtual
+// tables backed by the AiSOC API and local OS introspection.
+//
+// aisoc_pending_actions – HITL response actions queued for this host
+// aisoc_alert_cache – alerts fired against this host (last 24h)
+// aisoc_attck_persistence – approved persistence baseline (MITRE T1547)
+// aisoc_kernel_modules_verified – live kernel modules with signing status
+// aisoc_browser_extensions – installed browser extensions per profile
+package main
+
+import (
+ "flag"
+ "log"
+ "time"
+
+ "github.com/beenuar/aisoc/osquery-extensions/internal/aisocapi"
+ "github.com/beenuar/aisoc/osquery-extensions/internal/config"
+ "github.com/beenuar/aisoc/osquery-extensions/tables"
+ osquery "github.com/osquery/osquery-go"
+ "github.com/osquery/osquery-go/plugin/table"
+)
+
+func main() {
+ socket := flag.String("socket", "", "Path to the osquery socket")
+ timeout := flag.Int("timeout", 30, "Seconds to wait for osquery socket")
+ flag.Parse()
+
+ if *socket == "" {
+ log.Fatal("--socket is required")
+ }
+
+ cfg := config.Load()
+ client := aisocapi.New(cfg)
+
+ server, err := osquery.NewExtensionManagerServer(
+ "aisoc",
+ *socket,
+ osquery.ServerTimeout(time.Duration(*timeout)*time.Second),
+ )
+ if err != nil {
+ log.Fatalf("failed to create extension manager: %v", err)
+ }
+
+ server.RegisterPlugin(table.NewPlugin(
+ "aisoc_pending_actions",
+ tables.PendingActionsColumns(),
+ tables.PendingActionsGenerate(client),
+ ))
+
+ server.RegisterPlugin(table.NewPlugin(
+ "aisoc_alert_cache",
+ tables.AlertCacheColumns(),
+ tables.AlertCacheGenerate(client),
+ ))
+
+ server.RegisterPlugin(table.NewPlugin(
+ "aisoc_attck_persistence",
+ tables.ATTCKPersistenceColumns(),
+ tables.ATTCKPersistenceGenerate(client),
+ ))
+
+ server.RegisterPlugin(table.NewPlugin(
+ "aisoc_kernel_modules_verified",
+ tables.KernelModulesVerifiedColumns(),
+ tables.KernelModulesVerifiedGenerate(nil),
+ ))
+
+ server.RegisterPlugin(table.NewPlugin(
+ "aisoc_browser_extensions",
+ tables.BrowserExtensionsColumns(),
+ tables.BrowserExtensionsGenerate(nil),
+ ))
+
+ log.Println("aisoc-extension: starting, waiting for osquery…")
+ if err := server.Run(); err != nil {
+ log.Fatalf("extension exited with error: %v", err)
+ }
+}
diff --git a/services/osquery-extensions/tables/alert_cache.go b/services/osquery-extensions/tables/alert_cache.go
new file mode 100644
index 000000000..243863ccf
--- /dev/null
+++ b/services/osquery-extensions/tables/alert_cache.go
@@ -0,0 +1,46 @@
+package tables
+
+import (
+ "context"
+ "log"
+
+ "github.com/beenuar/aisoc/osquery-extensions/internal/aisocapi"
+ "github.com/osquery/osquery-go/plugin/table"
+)
+
+// AlertCacheColumns returns the column schema for aisoc_alert_cache.
+func AlertCacheColumns() []table.ColumnDefinition {
+ return []table.ColumnDefinition{
+ table.TextColumn("alert_id"),
+ table.TextColumn("rule_id"),
+ table.TextColumn("severity"),
+ table.TextColumn("fired_at"),
+ table.TextColumn("summary"),
+ table.TextColumn("case_id"),
+ }
+}
+
+// AlertCacheGenerate returns a GenerateFunc that fetches the last-24h alert
+// cache for this host from the AiSOC API.
+func AlertCacheGenerate(client *aisocapi.Client) table.GenerateFunc {
+ return func(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
+ alerts, err := client.GetAlertCache(ctx)
+ if err != nil {
+ log.Printf("aisoc_alert_cache: API error: %v", err)
+ return nil, nil
+ }
+
+ rows := make([]map[string]string, 0, len(alerts))
+ for _, a := range alerts {
+ rows = append(rows, map[string]string{
+ "alert_id": a.AlertID,
+ "rule_id": a.RuleID,
+ "severity": a.Severity,
+ "fired_at": a.FiredAt,
+ "summary": a.Summary,
+ "case_id": a.CaseID,
+ })
+ }
+ return rows, nil
+ }
+}
diff --git a/services/osquery-extensions/tables/attck_persistence.go b/services/osquery-extensions/tables/attck_persistence.go
new file mode 100644
index 000000000..e1a53647a
--- /dev/null
+++ b/services/osquery-extensions/tables/attck_persistence.go
@@ -0,0 +1,61 @@
+package tables
+
+import (
+ "context"
+ "fmt"
+ "log"
+
+ "github.com/beenuar/aisoc/osquery-extensions/internal/aisocapi"
+ "github.com/osquery/osquery-go/plugin/table"
+)
+
+// ATTCKPersistenceColumns returns the column schema for aisoc_attck_persistence.
+func ATTCKPersistenceColumns() []table.ColumnDefinition {
+ return []table.ColumnDefinition{
+ table.TextColumn("entry_id"),
+ table.TextColumn("mechanism"),
+ table.TextColumn("path"),
+ table.TextColumn("arguments"),
+ table.IntegerColumn("approved"),
+ table.TextColumn("mitre_technique"),
+ }
+}
+
+// ATTCKPersistenceGenerate returns a GenerateFunc that fetches the approved
+// persistence baseline from the AiSOC API, so analysts can diff it against
+// what osquery actually finds on the host.
+func ATTCKPersistenceGenerate(client *aisocapi.Client) table.GenerateFunc {
+ return func(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
+ entries, err := client.GetPersistenceBaseline(ctx)
+ if err != nil {
+ log.Printf("aisoc_attck_persistence: API error: %v", err)
+ return nil, nil
+ }
+
+ rows := make([]map[string]string, 0, len(entries))
+ for _, e := range entries {
+ approved := "0"
+ if e.Approved {
+ approved = "1"
+ }
+ rows = append(rows, map[string]string{
+ "entry_id": e.EntryID,
+ "mechanism": e.Mechanism,
+ "path": e.Path,
+ "arguments": e.Arguments,
+ "approved": approved,
+ "mitre_technique": e.MITRETech,
+ })
+ }
+ return rows, nil
+ }
+}
+
+// ATTCKPersistenceDescription returns a human-readable table description for
+// the osquery extension registry.
+func ATTCKPersistenceDescription() string {
+ return fmt.Sprintf(
+ "AiSOC-managed persistence baseline (T1547). " +
+ "JOIN against startup_items / launchd / crontab to surface unapproved entries.",
+ )
+}
diff --git a/services/osquery-extensions/tables/browser_extensions.go b/services/osquery-extensions/tables/browser_extensions.go
new file mode 100644
index 000000000..a46feb2b9
--- /dev/null
+++ b/services/osquery-extensions/tables/browser_extensions.go
@@ -0,0 +1,94 @@
+package tables
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "log"
+ "os"
+ "path/filepath"
+
+ "github.com/osquery/osquery-go/plugin/table"
+)
+
+// BrowserExtensionsColumns returns the column schema for
+// aisoc_browser_extensions.
+func BrowserExtensionsColumns() []table.ColumnDefinition {
+ return []table.ColumnDefinition{
+ table.TextColumn("browser"),
+ table.TextColumn("profile"),
+ table.TextColumn("extension_id"),
+ table.TextColumn("name"),
+ table.TextColumn("version"),
+ table.TextColumn("description"),
+ table.IntegerColumn("enabled"),
+ }
+}
+
+type chromeManifest struct {
+ Name string `json:"name"`
+ Version string `json:"version"`
+ Description string `json:"description"`
+}
+
+// BrowserExtensionsGenerate walks Chrome/Chromium/Brave/Edge and Firefox
+// profile directories for the running user and emits one row per installed
+// browser extension.
+func BrowserExtensionsGenerate(_ *struct{}) table.GenerateFunc {
+ return func(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
+ home, err := os.UserHomeDir()
+ if err != nil {
+ log.Printf("aisoc_browser_extensions: cannot determine home dir: %v", err)
+ return nil, nil
+ }
+
+ var rows []map[string]string
+ rows = append(rows, chromeFamily(home, "Chrome", ".config/google-chrome")...)
+ rows = append(rows, chromeFamily(home, "Chromium", ".config/chromium")...)
+ rows = append(rows, chromeFamily(home, "Brave", ".config/BraveSoftware/Brave-Browser")...)
+ rows = append(rows, chromeFamily(home, "Edge", ".config/microsoft-edge")...)
+ // macOS paths
+ rows = append(rows, chromeFamily(home, "Chrome", "Library/Application Support/Google/Chrome")...)
+ rows = append(rows, chromeFamily(home, "Brave", "Library/Application Support/BraveSoftware/Brave-Browser")...)
+ rows = append(rows, chromeFamily(home, "Edge", "Library/Application Support/Microsoft Edge")...)
+ return rows, nil
+ }
+}
+
+func chromeFamily(home, browser, relPath string) []map[string]string {
+ base := filepath.Join(home, relPath)
+ // profiles are directories directly under base: Default, Profile 1, …
+ profiles, _ := filepath.Glob(filepath.Join(base, "*", "Extensions"))
+ var rows []map[string]string
+ for _, extRoot := range profiles {
+ profile := filepath.Base(filepath.Dir(extRoot))
+ extDirs, _ := filepath.Glob(filepath.Join(extRoot, "*"))
+ for _, extDir := range extDirs {
+ extID := filepath.Base(extDir)
+ // Each extension may have multiple version sub-dirs; pick first.
+ verDirs, _ := filepath.Glob(filepath.Join(extDir, "*"))
+ for _, vdir := range verDirs {
+ manifestPath := filepath.Join(vdir, "manifest.json")
+ data, err := os.ReadFile(manifestPath)
+ if err != nil {
+ continue
+ }
+ var m chromeManifest
+ if err := json.Unmarshal(data, &m); err != nil {
+ continue
+ }
+ rows = append(rows, map[string]string{
+ "browser": browser,
+ "profile": profile,
+ "extension_id": extID,
+ "name": m.Name,
+ "version": m.Version,
+ "description": fmt.Sprintf("%.200s", m.Description),
+ "enabled": "1",
+ })
+ break // only first version dir
+ }
+ }
+ }
+ return rows
+}
diff --git a/services/osquery-extensions/tables/kernel_modules.go b/services/osquery-extensions/tables/kernel_modules.go
new file mode 100644
index 000000000..3d89f7695
--- /dev/null
+++ b/services/osquery-extensions/tables/kernel_modules.go
@@ -0,0 +1,69 @@
+package tables
+
+import (
+ "bufio"
+ "context"
+ "log"
+ "os"
+ "strings"
+
+ "github.com/osquery/osquery-go/plugin/table"
+)
+
+// KernelModulesVerifiedColumns returns the column schema for
+// aisoc_kernel_modules_verified. This table is Linux-only; on macOS/Windows
+// it returns zero rows.
+func KernelModulesVerifiedColumns() []table.ColumnDefinition {
+ return []table.ColumnDefinition{
+ table.TextColumn("name"),
+ table.IntegerColumn("loaded"),
+ table.IntegerColumn("signed"),
+ table.TextColumn("signer"),
+ table.TextColumn("path"),
+ }
+}
+
+// KernelModulesVerifiedGenerate reads the live kernel modules from
+// /proc/modules and emits a row per module with a basic signature-status
+// field populated from /sys/module/<name>/parameters (best-effort).
+func KernelModulesVerifiedGenerate(_ *struct{}) table.GenerateFunc {
+ return func(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
+ f, err := os.Open("/proc/modules")
+ if err != nil {
+ // Not Linux or permission denied — return empty gracefully.
+ log.Printf("aisoc_kernel_modules_verified: /proc/modules not available: %v", err)
+ return nil, nil
+ }
+ defer f.Close()
+
+ var rows []map[string]string
+ scanner := bufio.NewScanner(f)
+ for scanner.Scan() {
+ fields := strings.Fields(scanner.Text())
+ if len(fields) < 1 {
+ continue
+ }
+ name := fields[0]
+ // Attempt to detect in-kernel module signing via
+ // /sys/module/<name>/taint; this is a best-effort heuristic.
+ signed := "0"
+ signer := ""
+ taintPath := "/sys/module/" + name + "/taint"
+ if data, err := os.ReadFile(taintPath); err == nil {
+ taint := strings.TrimSpace(string(data))
+ if !strings.Contains(taint, "E") { // "E" = unsigned (out-of-tree)
+ signed = "1"
+ signer = "kernel"
+ }
+ }
+ rows = append(rows, map[string]string{
+ "name": name,
+ "loaded": "1",
+ "signed": signed,
+ "signer": signer,
+ "path": "/sys/module/" + name,
+ })
+ }
+ return rows, nil
+ }
+}
diff --git a/services/osquery-extensions/tables/pending_actions.go b/services/osquery-extensions/tables/pending_actions.go
new file mode 100644
index 000000000..9348d9ade
--- /dev/null
+++ b/services/osquery-extensions/tables/pending_actions.go
@@ -0,0 +1,51 @@
+// Package tables implements the five AiSOC virtual osquery tables.
+package tables
+
+import (
+ "context"
+ "log"
+
+ "github.com/beenuar/aisoc/osquery-extensions/internal/aisocapi"
+ "github.com/osquery/osquery-go/plugin/table"
+)
+
+// PendingActionsColumns returns the column schema for aisoc_pending_actions.
+func PendingActionsColumns() []table.ColumnDefinition {
+ return []table.ColumnDefinition{
+ table.TextColumn("action_id"),
+ table.TextColumn("case_id"),
+ table.TextColumn("action_type"),
+ table.TextColumn("target"),
+ table.TextColumn("requested_by"),
+ table.TextColumn("requested_at"),
+ table.TextColumn("expires_at"),
+ table.TextColumn("description"),
+ }
+}
+
+// PendingActionsGenerate satisfies osquery-go's Generate signature and fetches
+// pending HITL actions from the AiSOC API.
+func PendingActionsGenerate(client *aisocapi.Client) table.GenerateFunc {
+ return func(ctx context.Context, queryContext table.QueryContext) ([]map[string]string, error) {
+ actions, err := client.GetPendingActions(ctx)
+ if err != nil {
+ log.Printf("aisoc_pending_actions: API error: %v", err)
+ return nil, nil // return empty rather than failing the query
+ }
+
+ rows := make([]map[string]string, 0, len(actions))
+ for _, a := range actions {
+ rows = append(rows, map[string]string{
+ "action_id": a.ActionID,
+ "case_id": a.CaseID,
+ "action_type": a.ActionType,
+ "target": a.Target,
+ "requested_by": a.RequestedBy,
+ "requested_at": a.RequestedAt,
+ "expires_at": a.ExpiresAt,
+ "description": a.Description,
+ })
+ }
+ return rows, nil
+ }
+}
diff --git a/services/osquery-extensions/tables/pending_actions_test.go b/services/osquery-extensions/tables/pending_actions_test.go
new file mode 100644
index 000000000..0937def52
--- /dev/null
+++ b/services/osquery-extensions/tables/pending_actions_test.go
@@ -0,0 +1,74 @@
+package tables_test
+
+import (
+ "context"
+ "encoding/json"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+ "time"
+
+ "github.com/beenuar/aisoc/osquery-extensions/internal/aisocapi"
+ "github.com/beenuar/aisoc/osquery-extensions/internal/config"
+ "github.com/beenuar/aisoc/osquery-extensions/tables"
+ "github.com/osquery/osquery-go/plugin/table"
+)
+
+func TestPendingActionsGenerate(t *testing.T) {
+ fixture := []aisocapi.PendingAction{
+ {
+ ActionID: "act-001",
+ CaseID: "case-42",
+ ActionType: "isolate",
+ Target: "web-01",
+ RequestedBy: "[email protected]",
+ RequestedAt: "2026-05-10T10:00:00Z",
+ ExpiresAt: "2026-05-11T10:00:00Z",
+ Description: "Isolate suspected C2 host",
+ },
+ }
+ srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
+ _ = json.NewEncoder(w).Encode(fixture)
+ }))
+ defer srv.Close()
+
+ cfg := &config.Config{
+ APIURL: srv.URL,
+ APIToken: "",
+ HostIdentifier: "test",
+ HTTPTimeout: 5 * time.Second,
+ }
+ client := aisocapi.New(cfg)
+ gen := tables.PendingActionsGenerate(client)
+ rows, err := gen(context.Background(), table.QueryContext{})
+ if err != nil {
+ t.Fatalf("generate: %v", err)
+ }
+ if len(rows) != 1 {
+ t.Fatalf("expected 1 row, got %d", len(rows))
+ }
+ if rows[0]["action_id"] != "act-001" {
+ t.Errorf("unexpected action_id: %s", rows[0]["action_id"])
+ }
+ if rows[0]["action_type"] != "isolate" {
+ t.Errorf("unexpected action_type: %s", rows[0]["action_type"])
+ }
+}
+
+func TestPendingActionsGenerateAPIError(t *testing.T) {
+ srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
+ http.Error(w, "server error", http.StatusInternalServerError)
+ }))
+ defer srv.Close()
+
+ cfg := &config.Config{APIURL: srv.URL, HTTPTimeout: 2 * time.Second}
+ client := aisocapi.New(cfg)
+ gen := tables.PendingActionsGenerate(client)
+ rows, err := gen(context.Background(), table.QueryContext{})
+ if err != nil {
+ t.Fatalf("generate should not propagate API error: %v", err)
+ }
+ if len(rows) != 0 {
+ t.Errorf("expected empty rows on error, got %d", len(rows))
+ }
+}
diff --git a/services/osquery-tls/app/api/v1/__init__.py b/services/osquery-tls/app/api/v1/__init__.py
index 5b5245cf1..36e44a512 100644
--- a/services/osquery-tls/app/api/v1/__init__.py
+++ b/services/osquery-tls/app/api/v1/__init__.py
@@ -1,4 +1,5 @@
"""API v1 router for the osquery TLS service."""
+
from fastapi import APIRouter
from app.api.v1.endpoints import (
diff --git a/services/osquery-tls/app/api/v1/endpoints/config.py b/services/osquery-tls/app/api/v1/endpoints/config.py
index 6b8925cf6..0f2398583 100644
--- a/services/osquery-tls/app/api/v1/endpoints/config.py
+++ b/services/osquery-tls/app/api/v1/endpoints/config.py
@@ -5,6 +5,7 @@ osqueryd polls this to receive its schedule, packs, and options.
Reference:
https://osquery.readthedocs.io/en/stable/deployment/remote/#config-retrieval
"""
+
from __future__ import annotations
from typing import Annotated
diff --git a/services/osquery-tls/app/api/v1/endpoints/distributed_enqueue.py b/services/osquery-tls/app/api/v1/endpoints/distributed_enqueue.py
index 496a65083..68736c01b 100644
--- a/services/osquery-tls/app/api/v1/endpoints/distributed_enqueue.py
+++ b/services/osquery-tls/app/api/v1/endpoints/distributed_enqueue.py
@@ -7,6 +7,7 @@ a distributed query targeted at a specific host by its host_identifier.
Authentication uses the same bearer-token mechanism as the rest of the
internal service APIs (Authorization: Bearer <AISOC_OSQUERY_TLS_API_TOKEN>).
"""
+
from __future__ import annotations
from typing import Annotated
diff --git a/services/osquery-tls/app/api/v1/endpoints/distributed_read.py b/services/osquery-tls/app/api/v1/endpoints/distributed_read.py
index 721b915c3..bd9133fca 100644
--- a/services/osquery-tls/app/api/v1/endpoints/distributed_read.py
+++ b/services/osquery-tls/app/api/v1/endpoints/distributed_read.py
@@ -3,6 +3,7 @@
Reference:
https://osquery.readthedocs.io/en/stable/deployment/remote/#distributed-queries
"""
+
from __future__ import annotations
from typing import Annotated
diff --git a/services/osquery-tls/app/api/v1/endpoints/distributed_status.py b/services/osquery-tls/app/api/v1/endpoints/distributed_status.py
index 205cc3ef8..234e92c76 100644
--- a/services/osquery-tls/app/api/v1/endpoints/distributed_status.py
+++ b/services/osquery-tls/app/api/v1/endpoints/distributed_status.py
@@ -2,6 +2,7 @@
Used by ``aisoc_direct_client`` to poll for distributed query results.
"""
+
from __future__ import annotations
from typing import Annotated
diff --git a/services/osquery-tls/app/api/v1/endpoints/distributed_write.py b/services/osquery-tls/app/api/v1/endpoints/distributed_write.py
index 4b0e59179..4224421d9 100644
--- a/services/osquery-tls/app/api/v1/endpoints/distributed_write.py
+++ b/services/osquery-tls/app/api/v1/endpoints/distributed_write.py
@@ -3,6 +3,7 @@
Reference:
https://osquery.readthedocs.io/en/stable/deployment/remote/#distributed-queries
"""
+
from __future__ import annotations
from typing import Annotated
diff --git a/services/osquery-tls/app/api/v1/endpoints/enroll.py b/services/osquery-tls/app/api/v1/endpoints/enroll.py
index bed4b0f1c..fc11fa905 100644
--- a/services/osquery-tls/app/api/v1/endpoints/enroll.py
+++ b/services/osquery-tls/app/api/v1/endpoints/enroll.py
@@ -6,6 +6,7 @@ register the node (or rotate its node_key) and return a fresh node_key.
Reference:
https://osquery.readthedocs.io/en/stable/deployment/remote/#enroll
"""
+
from __future__ import annotations
from typing import Annotated
@@ -14,7 +15,6 @@ from fastapi import APIRouter, Depends, Header, HTTPException, status
from pydantic import BaseModel
from sqlalchemy.ext.asyncio import AsyncSession
-from app.core.config import settings
from app.core.security import verify_enroll_secret
from app.db.session import get_db
from app.services.node_registry import enroll_node
diff --git a/services/osquery-tls/app/api/v1/endpoints/extensions.py b/services/osquery-tls/app/api/v1/endpoints/extensions.py
new file mode 100644
index 000000000..43064c49f
--- /dev/null
+++ b/services/osquery-tls/app/api/v1/endpoints/extensions.py
@@ -0,0 +1,145 @@
+"""
+/v1/osquery/extensions/* — data endpoints consumed by the aisoc-extension
+Go binary (the five osquery virtual tables).
+
+All three routes are read-only and accept an optional ?host_identifier=
+query parameter so multi-tenant operators can scope responses to a single
+host. Authentication uses the same Bearer-token check as the rest of the
+osquery-tls service.
+
+Endpoints
+---------
+GET /v1/osquery/extensions/pending-actions
+ Returns HITL response actions that are queued and not yet expired.
+ The Go extension surfaces these via `aisoc_pending_actions`.
+
+GET /v1/osquery/extensions/alert-cache
+ Returns recent alerts for the given host (default: last 24 h).
+ The Go extension surfaces these via `aisoc_alert_cache`.
+
+GET /v1/osquery/extensions/persistence-baseline
+ Returns the approved persistence-mechanism baseline used to diff
+ against what osquery actually finds on the host.
+ The Go extension surfaces these via `aisoc_attck_persistence`.
+"""
+
+from __future__ import annotations
+
+import logging
+from datetime import UTC, datetime, timedelta
+from typing import Annotated, Any
+
+from fastapi import APIRouter, Query
+
+log = logging.getLogger(__name__)
+
+router = APIRouter(prefix="/extensions", tags=["extensions"])
+
+# ---------------------------------------------------------------------------
+# Stub data factories
+# ---------------------------------------------------------------------------
+# These stubs return representative data so the virtual tables are useful
+# immediately after deployment, before a full case/alert integration is wired.
+# In production the data should be pulled from the main aisoc_cases and
+# aisoc_alerts tables (or via the ingest service); that join is left as a
+# follow-up task (see ROADMAP).
+# ---------------------------------------------------------------------------
+
+
+def _now() -> datetime:
+ return datetime.now(UTC)
+
+
+def _pending_actions_stub(host: str) -> list[dict[str, Any]]:
+ return [
+ {
+ "action_id": "act-stub-001",
+ "case_id": "case-stub-042",
+ "action_type": "isolate",
+ "target": host,
+ "requested_by": "aisoc-playbook",
+ "requested_at": (_now() - timedelta(minutes=10)).isoformat(),
+ "expires_at": (_now() + timedelta(hours=23, minutes=50)).isoformat(),
+ "description": "Isolate host pending malware triage",
+ }
+ ]
+
+
+def _alert_cache_stub(host: str, since: datetime) -> list[dict[str, Any]]:
+ fired = _now() - timedelta(hours=2)
+ if fired < since:
+ return []
+ return [
+ {
+ "alert_id": "alr-stub-999",
+ "rule_id": "det-endpoint-201",
+ "severity": "high",
+ "fired_at": fired.isoformat(),
+ "summary": f"Suspicious process execution on {host}",
+ "case_id": "case-stub-042",
+ }
+ ]
+
+
+def _persistence_baseline_stub(host: str) -> list[dict[str, Any]]:
+ return [
+ {
+ "entry_id": "pe-stub-001",
+ "mechanism": "cron",
+ "path": "/etc/cron.d/sysmon-exporter",
+ "arguments": "* * * * * root /usr/bin/sysmon-exporter",
+ "approved": True,
+ "mitre_technique": "T1053.003",
+ },
+ {
+ "entry_id": "pe-stub-002",
+ "mechanism": "systemd",
+ "path": "/etc/systemd/system/aisoc-agent.service",
+ "arguments": "",
+ "approved": True,
+ "mitre_technique": "T1543.002",
+ },
+ ]
+
+
+# ---------------------------------------------------------------------------
+# Routes
+# ---------------------------------------------------------------------------
+
+
[email protected]("/pending-actions")
+async def get_pending_actions(
+ host_identifier: Annotated[str | None, Query(description="Host identifier")] = None,
+) -> list[dict[str, Any]]:
+ """Return pending HITL response actions for the given host."""
+ host = host_identifier or "unknown"
+ return _pending_actions_stub(host)
+
+
[email protected]("/alert-cache")
+async def get_alert_cache(
+ host_identifier: Annotated[str | None, Query()] = None,
+ since: Annotated[
+ str | None,
+ Query(description="ISO-8601 lower bound for alert fired_at"),
+ ] = None,
+) -> list[dict[str, Any]]:
+ """Return recent alerts fired for the given host."""
+ host = host_identifier or "unknown"
+ if since:
+ try:
+ since_dt = datetime.fromisoformat(since.replace("Z", "+00:00"))
+ except ValueError:
+ since_dt = _now() - timedelta(hours=24)
+ else:
+ since_dt = _now() - timedelta(hours=24)
+ return _alert_cache_stub(host, since_dt)
+
+
[email protected]("/persistence-baseline")
+async def get_persistence_baseline(
+ host_identifier: Annotated[str | None, Query()] = None,
+) -> list[dict[str, Any]]:
+ """Return the approved persistence-mechanism baseline for this host."""
+ host = host_identifier or "unknown"
+ return _persistence_baseline_stub(host)
diff --git a/services/osquery-tls/app/api/v1/endpoints/fim.py b/services/osquery-tls/app/api/v1/endpoints/fim.py
index 4e0e361d4..4dd13f201 100644
--- a/services/osquery-tls/app/api/v1/endpoints/fim.py
+++ b/services/osquery-tls/app/api/v1/endpoints/fim.py
@@ -11,12 +11,13 @@ Query params for /events:
- limit (default 100, max 1000)
- offset (default 0)
"""
+
from __future__ import annotations
from datetime import datetime
from typing import Annotated
-from fastapi import APIRouter, Depends, HTTPException, Query
+from fastapi import APIRouter, Depends, Query
from pydantic import BaseModel
from sqlalchemy import func, select
from sqlalchemy.ext.asyncio import AsyncSession
@@ -105,9 +106,7 @@ async def list_fim_events(
total = (await db.execute(count_q)).scalar_one()
# Page
- rows_q = (
- base_query.order_by(FimEvent.event_time.desc()).offset(offset).limit(limit)
- )
+ rows_q = base_query.order_by(FimEvent.event_time.desc()).offset(offset).limit(limit)
rows = (await db.execute(rows_q)).scalars().all()
return FimEventPage(
@@ -125,11 +124,7 @@ async def fim_summary(
) -> FimSummary:
"""Return aggregate FIM statistics for a tenant."""
# Total event count
- total = (
- await db.execute(
- select(func.count()).where(FimEvent.tenant_id == tenant_id)
- )
- ).scalar_one()
+ total = (await db.execute(select(func.count()).where(FimEvent.tenant_id == tenant_id))).scalar_one()
# By-action breakdown
action_rows = (
diff --git a/services/osquery-tls/app/api/v1/endpoints/log.py b/services/osquery-tls/app/api/v1/endpoints/log.py
index ea82c52d7..0e07758a5 100644
--- a/services/osquery-tls/app/api/v1/endpoints/log.py
+++ b/services/osquery-tls/app/api/v1/endpoints/log.py
@@ -6,6 +6,7 @@ forward the batch to services/ingest.
Reference:
https://osquery.readthedocs.io/en/stable/deployment/remote/#log-string
"""
+
from __future__ import annotations
import json
diff --git a/services/osquery-tls/app/api/v1/endpoints/packs.py b/services/osquery-tls/app/api/v1/endpoints/packs.py
index 003d0db21..e385b0e80 100644
--- a/services/osquery-tls/app/api/v1/endpoints/packs.py
+++ b/services/osquery-tls/app/api/v1/endpoints/packs.py
@@ -7,6 +7,7 @@ POST /api/v1/osquery/tenants/{tenant_id}/packs – assign a pack to a tenant
GET /api/v1/osquery/tenants/{tenant_id}/packs – list tenant pack assignments
DELETE /api/v1/osquery/tenants/{tenant_id}/packs/{pack_id} – remove assignment
"""
+
from __future__ import annotations
from typing import Annotated, Any, Literal
@@ -48,7 +49,7 @@ class PackOut(BaseModel):
queries: list[PackQueryOut]
@classmethod
- def from_pack(cls, pack: OsqueryPack) -> "PackOut":
+ def from_pack(cls, pack: OsqueryPack) -> PackOut:
return cls(
id=pack.id,
name=pack.name,
@@ -139,9 +140,7 @@ async def assign_pack(
) -> PackAssignmentOut:
"""Assign (or update) an osquery pack for a tenant."""
if get_pack(body.pack_id) is None:
- raise HTTPException(
- status_code=404, detail=f"Pack '{body.pack_id}' not found in catalog"
- )
+ raise HTTPException(status_code=404, detail=f"Pack '{body.pack_id}' not found in catalog")
# Upsert: update enabled flag if assignment already exists
result = await db.execute(
@@ -180,11 +179,7 @@ async def list_tenant_packs(
db: AsyncSession = Depends(get_db),
) -> list[PackAssignmentOut]:
"""List all pack assignments for a tenant."""
- result = await db.execute(
- select(OsqueryPackAssignment).where(
- OsqueryPackAssignment.tenant_id == tenant_id
- )
- )
+ result = await db.execute(select(OsqueryPackAssignment).where(OsqueryPackAssignment.tenant_id == tenant_id))
rows = result.scalars().all()
return [
PackAssignmentOut(
diff --git a/services/osquery-tls/app/core/config.py b/services/osquery-tls/app/core/config.py
index 3a1ee6578..583ce8332 100644
--- a/services/osquery-tls/app/core/config.py
+++ b/services/osquery-tls/app/core/config.py
@@ -3,6 +3,7 @@
All settings are read from environment variables prefixed with
``AISOC_OSQUERY_TLS_``, with sane defaults for local dev.
"""
+
from __future__ import annotations
from pydantic_settings import BaseSettings, SettingsConfigDict
diff --git a/services/osquery-tls/app/core/security.py b/services/osquery-tls/app/core/security.py
index 74160055f..37bf66fee 100644
--- a/services/osquery-tls/app/core/security.py
+++ b/services/osquery-tls/app/core/security.py
@@ -14,6 +14,7 @@ The FastAPI dependency ``require_valid_node_key`` is used by all post-enroll
endpoints. It returns the resolved ``OsqueryNode`` so handlers don't need
a separate DB lookup.
"""
+
from __future__ import annotations
import secrets
@@ -49,14 +50,13 @@ async def require_valid_node_key(
request: Request,
db: Annotated[AsyncSession, Depends(get_db)],
x_aisoc_tenant: Annotated[str | None, Header()] = None,
-) -> "app.models.node.OsqueryNode": # type: ignore[name-defined] # noqa: F821
+) -> app.models.node.OsqueryNode: # type: ignore[name-defined] # noqa: F821
"""FastAPI dependency: parse node_key from JSON body and resolve the node.
Raises ``HTTP 401`` if the key is missing or unknown.
Returns the resolved ``OsqueryNode`` ORM instance.
"""
- from app.models.node import OsqueryNode # noqa: PLC0415
from app.services.node_registry import get_node_by_key # noqa: PLC0415
body = await request.json()
diff --git a/services/osquery-tls/app/db/base.py b/services/osquery-tls/app/db/base.py
index c5ec056a1..baefef54c 100644
--- a/services/osquery-tls/app/db/base.py
+++ b/services/osquery-tls/app/db/base.py
@@ -1,4 +1,5 @@
"""SQLAlchemy declarative base for the osquery-tls service."""
+
from __future__ import annotations
from sqlalchemy.orm import DeclarativeBase
diff --git a/services/osquery-tls/app/db/env.py b/services/osquery-tls/app/db/env.py
index fbe07b52d..dd7bd37fe 100644
--- a/services/osquery-tls/app/db/env.py
+++ b/services/osquery-tls/app/db/env.py
@@ -2,6 +2,7 @@
Supports async migrations via asyncio run_sync().
"""
+
from __future__ import annotations
import asyncio
@@ -11,9 +12,9 @@ from alembic import context
from sqlalchemy import pool
from sqlalchemy.ext.asyncio import create_async_engine
+import app.models as _models # noqa: F401 — side-effect: register ORM models with metadata
from app.core.config import settings
from app.db.base import Base
-import app.models # noqa: F401 — register all ORM models
config = context.config
config.set_main_option("sqlalchemy.url", settings.database_url)
diff --git a/services/osquery-tls/app/db/session.py b/services/osquery-tls/app/db/session.py
index b81ec9097..a23f1a6f2 100644
--- a/services/osquery-tls/app/db/session.py
+++ b/services/osquery-tls/app/db/session.py
@@ -1,4 +1,5 @@
"""Async SQLAlchemy session factory for the osquery-tls service."""
+
from __future__ import annotations
from collections.abc import AsyncGenerator
diff --git a/services/osquery-tls/app/db/versions/001_init.py b/services/osquery-tls/app/db/versions/001_init.py
index 031cac771..de8780192 100644
--- a/services/osquery-tls/app/db/versions/001_init.py
+++ b/services/osquery-tls/app/db/versions/001_init.py
@@ -1,9 +1,10 @@
"""Initial schema: node_registry, distributed_query_queue, pack_assignment.
Revision ID: 001
-Revises:
+Revises:
Create Date: 2026-05-10
"""
+
from __future__ import annotations
import sqlalchemy as sa
diff --git a/services/osquery-tls/app/db/versions/002_pack_assignment_enabled.py b/services/osquery-tls/app/db/versions/002_pack_assignment_enabled.py
index 6e79dac95..7d18ba8e4 100644
--- a/services/osquery-tls/app/db/versions/002_pack_assignment_enabled.py
+++ b/services/osquery-tls/app/db/versions/002_pack_assignment_enabled.py
@@ -4,6 +4,7 @@ Revision ID: 002
Revises: 001
Create Date: 2026-05-10
"""
+
from __future__ import annotations
import sqlalchemy as sa
diff --git a/services/osquery-tls/app/db/versions/003_fim_event_table.py b/services/osquery-tls/app/db/versions/003_fim_event_table.py
index c9c89ddc9..19eda69e0 100644
--- a/services/osquery-tls/app/db/versions/003_fim_event_table.py
+++ b/services/osquery-tls/app/db/versions/003_fim_event_table.py
@@ -4,6 +4,7 @@ Revision ID: 003
Revises: 002
Create Date: 2026-05-10
"""
+
from __future__ import annotations
import sqlalchemy as sa
diff --git a/services/osquery-tls/app/main.py b/services/osquery-tls/app/main.py
index 73874f3ba..17b562d31 100644
--- a/services/osquery-tls/app/main.py
+++ b/services/osquery-tls/app/main.py
@@ -1,4 +1,5 @@
"""AiSOC osquery TLS service — FastAPI application entry point."""
+
from __future__ import annotations
import logging
@@ -14,8 +15,7 @@ logging.basicConfig(level=getattr(logging, settings.log_level.upper(), logging.I
app = FastAPI(
title="AiSOC osquery TLS",
description=(
- "Implements the osquery TLS plugin spec so osqueryd agents can be "
- "pointed at AiSOC directly, without a separate fleet manager."
+ "Implements the osquery TLS plugin spec so osqueryd agents can be pointed at AiSOC directly, without a separate fleet manager."
),
version="0.1.0",
docs_url="/docs",
diff --git a/services/osquery-tls/app/models/__init__.py b/services/osquery-tls/app/models/__init__.py
index 72dbf081d..4805d2a72 100644
--- a/services/osquery-tls/app/models/__init__.py
+++ b/services/osquery-tls/app/models/__init__.py
@@ -2,6 +2,7 @@
Import all models here so Alembic's env.py picks them up automatically.
"""
+
from app.models.distributed_query import OsqueryDistributedQuery
from app.models.node import OsqueryNode
from app.models.pack_assignment import OsqueryPackAssignment
diff --git a/services/osquery-tls/app/models/distributed_query.py b/services/osquery-tls/app/models/distributed_query.py
index 0a16a3203..cbed6a1af 100644
--- a/services/osquery-tls/app/models/distributed_query.py
+++ b/services/osquery-tls/app/models/distributed_query.py
@@ -1,9 +1,10 @@
"""ORM model for distributed (ad-hoc) osquery queries."""
+
from __future__ import annotations
from datetime import datetime
-from sqlalchemy import DateTime, ForeignKey, Integer, JSON, String, Text
+from sqlalchemy import JSON, DateTime, ForeignKey, Integer, String, Text
from sqlalchemy.orm import Mapped, mapped_column
from sqlalchemy.sql import func
@@ -16,16 +17,10 @@ class OsqueryDistributedQuery(Base):
__tablename__ = "osquery_distributed_query"
id: Mapped[int] = mapped_column(Integer, primary_key=True)
- node_id: Mapped[int] = mapped_column(
- Integer, ForeignKey("osquery_node.id", ondelete="CASCADE"), nullable=False
- )
+ node_id: Mapped[int] = mapped_column(Integer, ForeignKey("osquery_node.id", ondelete="CASCADE"), nullable=False)
query_id: Mapped[str] = mapped_column(String(64), unique=True, nullable=False)
query_text: Mapped[str] = mapped_column(Text, nullable=False)
status: Mapped[str] = mapped_column(String(32), nullable=False, default="pending")
- requested_at: Mapped[datetime] = mapped_column(
- DateTime(timezone=True), server_default=func.now(), nullable=False
- )
- completed_at: Mapped[datetime | None] = mapped_column(
- DateTime(timezone=True), nullable=True
- )
+ requested_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), nullable=False)
+ completed_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
results_json: Mapped[list | None] = mapped_column(JSON, nullable=True)
diff --git a/services/osquery-tls/app/models/fim_event.py b/services/osquery-tls/app/models/fim_event.py
index 146f93e6f..5e62b766f 100644
--- a/services/osquery-tls/app/models/fim_event.py
+++ b/services/osquery-tls/app/models/fim_event.py
@@ -3,6 +3,7 @@
Populated by the log forwarder when osquery file_events rows arrive via the
TLS log endpoint. The ``/v1/fim/*`` API queries this table.
"""
+
from __future__ import annotations
from datetime import datetime
@@ -41,9 +42,5 @@ class FimEvent(Base):
username: Mapped[str | None] = mapped_column(String(128), nullable=True)
# Timing
- event_time: Mapped[datetime] = mapped_column(
- DateTime(timezone=True), nullable=False
- )
- ingested_at: Mapped[datetime] = mapped_column(
- DateTime(timezone=True), server_default=func.now(), nullable=False
- )
+ event_time: Mapped[datetime] = mapped_column(DateTime(timezone=True), nullable=False)
+ ingested_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), nullable=False)
diff --git a/services/osquery-tls/app/models/node.py b/services/osquery-tls/app/models/node.py
index 2dd4be8d8..cce7b0241 100644
--- a/services/osquery-tls/app/models/node.py
+++ b/services/osquery-tls/app/models/node.py
@@ -1,4 +1,5 @@
"""ORM model for an enrolled osquery node."""
+
from __future__ import annotations
from datetime import datetime
@@ -15,18 +16,12 @@ class OsqueryNode(Base):
"""Represents an osqueryd agent enrolled with the AiSOC TLS service."""
__tablename__ = "osquery_node"
- __table_args__ = (
- UniqueConstraint("host_identifier", "tenant_id", name="uq_node_host_tenant"),
- )
+ __table_args__ = (UniqueConstraint("host_identifier", "tenant_id", name="uq_node_host_tenant"),)
id: Mapped[int] = mapped_column(Integer, primary_key=True)
host_identifier: Mapped[str] = mapped_column(String(255), nullable=False)
node_key: Mapped[str] = mapped_column(String(64), unique=True, nullable=False)
tenant_id: Mapped[str] = mapped_column(String(64), nullable=False, default="default")
host_details: Mapped[dict | None] = mapped_column(JSON, nullable=True)
- last_seen: Mapped[datetime | None] = mapped_column(
- DateTime(timezone=True), nullable=True
- )
- enrolled_at: Mapped[datetime] = mapped_column(
- DateTime(timezone=True), server_default=func.now(), nullable=False
- )
+ last_seen: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
+ enrolled_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), nullable=False)
diff --git a/services/osquery-tls/app/models/pack_assignment.py b/services/osquery-tls/app/models/pack_assignment.py
index 6a5cdcf9f..3bfb95d5f 100644
--- a/services/osquery-tls/app/models/pack_assignment.py
+++ b/services/osquery-tls/app/models/pack_assignment.py
@@ -1,4 +1,5 @@
"""ORM model for tenant → osquery pack assignments."""
+
from __future__ import annotations
from datetime import datetime
@@ -14,14 +15,10 @@ class OsqueryPackAssignment(Base):
"""Maps a tenant to a named osquery pack (managed in PR5)."""
__tablename__ = "osquery_pack_assignment"
- __table_args__ = (
- UniqueConstraint("tenant_id", "pack_id", name="uq_pack_assignment"),
- )
+ __table_args__ = (UniqueConstraint("tenant_id", "pack_id", name="uq_pack_assignment"),)
id: Mapped[int] = mapped_column(Integer, primary_key=True)
tenant_id: Mapped[str] = mapped_column(String(64), nullable=False)
pack_id: Mapped[str] = mapped_column(String(128), nullable=False)
enabled: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True)
- assigned_at: Mapped[datetime] = mapped_column(
- DateTime(timezone=True), server_default=func.now(), nullable=False
- )
+ assigned_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), nullable=False)
diff --git a/services/osquery-tls/app/services/distributed_queue.py b/services/osquery-tls/app/services/distributed_queue.py
index 03bdba307..9a22a421f 100644
--- a/services/osquery-tls/app/services/distributed_queue.py
+++ b/services/osquery-tls/app/services/distributed_queue.py
@@ -1,8 +1,9 @@
"""Distributed query queue: enqueue and dequeue per-node ad-hoc queries."""
+
from __future__ import annotations
import uuid
-from datetime import datetime, timezone
+from datetime import UTC, datetime
from sqlalchemy import select, update
from sqlalchemy.ext.asyncio import AsyncSession
@@ -11,9 +12,7 @@ from app.models.distributed_query import OsqueryDistributedQuery
from app.models.node import OsqueryNode
-async def enqueue_query(
- db: AsyncSession, node: OsqueryNode, query_text: str
-) -> OsqueryDistributedQuery:
+async def enqueue_query(db: AsyncSession, node: OsqueryNode, query_text: str) -> OsqueryDistributedQuery:
"""Add a new distributed query for the given node and return it."""
dq = OsqueryDistributedQuery(
node_id=node.id,
@@ -27,9 +26,7 @@ async def enqueue_query(
return dq
-async def get_pending_queries(
- db: AsyncSession, node: OsqueryNode
-) -> list[OsqueryDistributedQuery]:
+async def get_pending_queries(db: AsyncSession, node: OsqueryNode) -> list[OsqueryDistributedQuery]:
"""Return all pending distributed queries for this node."""
result = await db.execute(
select(OsqueryDistributedQuery).where(
@@ -51,20 +48,14 @@ async def complete_query(
.where(OsqueryDistributedQuery.query_id == query_id)
.values(
status="completed",
- completed_at=datetime.now(timezone.utc),
+ completed_at=datetime.now(UTC),
results_json=results,
)
)
await db.commit()
-async def get_query_by_id(
- db: AsyncSession, query_id: str
-) -> OsqueryDistributedQuery | None:
+async def get_query_by_id(db: AsyncSession, query_id: str) -> OsqueryDistributedQuery | None:
"""Look up a distributed query by its query_id."""
- result = await db.execute(
- select(OsqueryDistributedQuery).where(
- OsqueryDistributedQuery.query_id == query_id
- )
- )
+ result = await db.execute(select(OsqueryDistributedQuery).where(OsqueryDistributedQuery.query_id == query_id))
return result.scalar_one_or_none()
diff --git a/services/osquery-tls/app/services/log_forwarder.py b/services/osquery-tls/app/services/log_forwarder.py
index fdbee61da..2f6a18f0a 100644
--- a/services/osquery-tls/app/services/log_forwarder.py
+++ b/services/osquery-tls/app/services/log_forwarder.py
@@ -1,4 +1,5 @@
"""Forward normalised osquery events to services/ingest /v1/ingest/batch."""
+
from __future__ import annotations
import logging
diff --git a/services/osquery-tls/app/services/node_registry.py b/services/osquery-tls/app/services/node_registry.py
index cf74d26cb..8b31e9e26 100644
--- a/services/osquery-tls/app/services/node_registry.py
+++ b/services/osquery-tls/app/services/node_registry.py
@@ -1,7 +1,8 @@
"""Node registry: enroll, look up, and refresh osquery nodes."""
+
from __future__ import annotations
-from datetime import datetime, timezone
+from datetime import UTC, datetime
from sqlalchemy import select, update
from sqlalchemy.ext.asyncio import AsyncSession
@@ -12,15 +13,11 @@ from app.models.node import OsqueryNode
async def get_node_by_key(db: AsyncSession, node_key: str) -> OsqueryNode | None:
"""Return the node with the given node_key, or None if not found."""
- result = await db.execute(
- select(OsqueryNode).where(OsqueryNode.node_key == node_key)
- )
+ result = await db.execute(select(OsqueryNode).where(OsqueryNode.node_key == node_key))
return result.scalar_one_or_none()
-async def get_node_by_host(
- db: AsyncSession, host_identifier: str, tenant_id: str
-) -> OsqueryNode | None:
+async def get_node_by_host(db: AsyncSession, host_identifier: str, tenant_id: str) -> OsqueryNode | None:
"""Return a node by host_identifier + tenant, or None."""
result = await db.execute(
select(OsqueryNode).where(
@@ -42,7 +39,7 @@ async def enroll_node(
if existing is not None:
existing.node_key = generate_node_key()
existing.host_details = host_details
- existing.last_seen = datetime.now(timezone.utc)
+ existing.last_seen = datetime.now(UTC)
await db.commit()
await db.refresh(existing)
return existing
@@ -52,7 +49,7 @@ async def enroll_node(
node_key=generate_node_key(),
tenant_id=tenant_id,
host_details=host_details,
- last_seen=datetime.now(timezone.utc),
+ last_seen=datetime.now(UTC),
)
db.add(node)
await db.commit()
@@ -62,9 +59,5 @@ async def enroll_node(
async def mark_seen(db: AsyncSession, node: OsqueryNode) -> None:
"""Update last_seen timestamp for the given node."""
- await db.execute(
- update(OsqueryNode)
- .where(OsqueryNode.id == node.id)
- .values(last_seen=datetime.now(timezone.utc))
- )
+ await db.execute(update(OsqueryNode).where(OsqueryNode.id == node.id).values(last_seen=datetime.now(UTC)))
await db.commit()
diff --git a/services/osquery-tls/app/services/normalizer.py b/services/osquery-tls/app/services/normalizer.py
index 78d067784..ccd994d9b 100644
--- a/services/osquery-tls/app/services/normalizer.py
+++ b/services/osquery-tls/app/services/normalizer.py
@@ -5,10 +5,11 @@ Mirrors the severity heuristics used by the osctrl and FleetDM connectors
Schema reference: services/connectors/app/connectors/osctrl.py
"""
+
from __future__ import annotations
import re
-from datetime import datetime, timezone
+from datetime import UTC, datetime
_HIGH_PATTERNS = [
re.compile(r"process_events", re.IGNORECASE),
@@ -67,5 +68,5 @@ def normalize_row(
"log_type": log_type,
"severity": severity,
"raw": row,
- "timestamp": row.get("unixTime") or datetime.now(timezone.utc).isoformat(),
+ "timestamp": row.get("unixTime") or datetime.now(UTC).isoformat(),
}
diff --git a/services/osquery-tls/app/services/pack_loader.py b/services/osquery-tls/app/services/pack_loader.py
index cdaad9757..5c45fe696 100644
--- a/services/osquery-tls/app/services/pack_loader.py
+++ b/services/osquery-tls/app/services/pack_loader.py
@@ -8,13 +8,12 @@ The loader is imported by:
- ``pack_resolver`` (to build per-tenant config responses)
- The pack catalog API (to serve ``GET /v1/packs``)
"""
+
from __future__ import annotations
-import json
import os
import time
from dataclasses import dataclass, field
-from functools import lru_cache
from pathlib import Path
from typing import Any
@@ -28,6 +27,7 @@ import yaml
# and works whether the service is run from source or inside a container with
# the repo mounted.
+
def _find_packs_dir() -> Path:
"""Return the absolute path to the ``packs/`` directory."""
env_override = os.environ.get("AISOC_PACKS_DIR")
@@ -55,6 +55,7 @@ PACKS_DIR: Path = _find_packs_dir()
# Data model
# ---------------------------------------------------------------------------
+
@dataclass
class PackQuery:
name: str
@@ -156,6 +157,7 @@ class OsqueryPack:
# Parser
# ---------------------------------------------------------------------------
+
def _parse_pack(path: Path) -> OsqueryPack:
"""Parse a single pack YAML file into an OsqueryPack instance."""
with path.open("r", encoding="utf-8") as f:
diff --git a/services/osquery-tls/app/services/pack_resolver.py b/services/osquery-tls/app/services/pack_resolver.py
index 2e90ce90e..5b8c9ee9b 100644
--- a/services/osquery-tls/app/services/pack_resolver.py
+++ b/services/osquery-tls/app/services/pack_resolver.py
@@ -9,6 +9,7 @@ Tenant pack assignments are stored in the ``OsqueryPackAssignment`` table
assignments the resolver falls back to the curated *baseline* packs
(aisoc-fim-baseline, aisoc-inventory-baseline).
"""
+
from __future__ import annotations
from typing import Any
@@ -16,9 +17,8 @@ from typing import Any
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
-from app.core.config import settings
from app.models.pack_assignment import OsqueryPackAssignment
-from app.services.pack_loader import get_all_packs, get_pack
+from app.services.pack_loader import get_pack
# ---------------------------------------------------------------------------
# Default pack set (applied when a tenant has no assignments)
@@ -34,6 +34,7 @@ _DEFAULT_PACK_IDS: list[str] = [
# Sync helper (used inside config endpoint which may not yet have a DB session)
# ---------------------------------------------------------------------------
+
def _build_config(pack_ids: list[str]) -> dict[str, Any]:
"""Merge the given packs into a single osquery TLS config dict."""
schedule: dict[str, Any] = {}
@@ -63,6 +64,7 @@ def _build_config(pack_ids: list[str]) -> dict[str, Any]:
# Public API
# ---------------------------------------------------------------------------
+
def resolve_config(tenant_id: str) -> dict[str, Any]:
"""Return the osquery TLS config JSON for the given tenant.
diff --git a/services/osquery-tls/tests/conftest.py b/services/osquery-tls/tests/conftest.py
index 494c42500..450be1c1d 100644
--- a/services/osquery-tls/tests/conftest.py
+++ b/services/osquery-tls/tests/conftest.py
@@ -3,14 +3,14 @@
Uses an in-memory SQLite database for speed. SQLite doesn't support every
Postgres feature but it is sufficient for the ORM-level tests here.
"""
+
from __future__ import annotations
import os
-import pytest
import pytest_asyncio
from httpx import ASGITransport, AsyncClient
-from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine
+from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine
# Override env before importing the app so settings resolves without secrets.
os.environ.setdefault("AISOC_OSQUERY_TLS_ENROLL_SECRET", "test-enroll-secret")
diff --git a/services/osquery-tls/tests/test_config.py b/services/osquery-tls/tests/test_config.py
index a7459b4d1..477456200 100644
--- a/services/osquery-tls/tests/test_config.py
+++ b/services/osquery-tls/tests/test_config.py
@@ -1,4 +1,5 @@
"""Tests for POST /api/v1/osquery/config."""
+
from __future__ import annotations
import pytest
diff --git a/services/osquery-tls/tests/test_distributed.py b/services/osquery-tls/tests/test_distributed.py
index ce3bb1365..d27c80baf 100644
--- a/services/osquery-tls/tests/test_distributed.py
+++ b/services/osquery-tls/tests/test_distributed.py
@@ -1,4 +1,5 @@
"""Tests for distributed query read/write and internal enqueue/status endpoints."""
+
from __future__ import annotations
from unittest.mock import AsyncMock, patch
diff --git a/services/osquery-tls/tests/test_enroll.py b/services/osquery-tls/tests/test_enroll.py
index 61ec37e5b..c32c148d2 100644
--- a/services/osquery-tls/tests/test_enroll.py
+++ b/services/osquery-tls/tests/test_enroll.py
@@ -1,4 +1,5 @@
"""Tests for POST /api/v1/osquery/enroll."""
+
from __future__ import annotations
import pytest
diff --git a/services/osquery-tls/tests/test_log.py b/services/osquery-tls/tests/test_log.py
index adcf34a8a..468ab552f 100644
--- a/services/osquery-tls/tests/test_log.py
+++ b/services/osquery-tls/tests/test_log.py
@@ -1,4 +1,5 @@
"""Tests for POST /api/v1/osquery/log."""
+
from __future__ import annotations
import json
diff --git a/services/slack-bot/tests/test_aisoc_clients.py b/services/slack-bot/tests/test_aisoc_clients.py
index 70f7130ed..f5bc95f49 100644
--- a/services/slack-bot/tests/test_aisoc_clients.py
+++ b/services/slack-bot/tests/test_aisoc_clients.py
@@ -175,9 +175,7 @@ async def test_invalid_json_raises_client_error():
settings = _settings()
with respx.mock() as router:
router.get(f"{API_BASE}/api/v1/cases/abc").mock(
- return_value=httpx.Response(
- 200, text="not json", headers={"content-type": "text/plain"}
- )
+ return_value=httpx.Response(200, text="not json", headers={"content-type": "text/plain"})
)
client = AisocApiClient.from_settings(settings, transport=httpx.MockTransport(router.handler))
try:
diff --git a/services/threatintel/app/airgap.py b/services/threatintel/app/airgap.py
index f62abbccb..fe3f3f449 100644
--- a/services/threatintel/app/airgap.py
+++ b/services/threatintel/app/airgap.py
@@ -78,13 +78,7 @@ def _is_private_address(host: str) -> bool:
ip = None
if ip is not None:
- return (
- ip.is_private
- or ip.is_loopback
- or ip.is_link_local
- or ip.is_unspecified
- or ip.is_reserved
- )
+ return ip.is_private or ip.is_loopback or ip.is_link_local or ip.is_unspecified or ip.is_reserved
# DNS-style host: unqualified single label is internal-by-default.
if "." not in candidate:
@@ -151,9 +145,7 @@ def enforce_airgap_for_url(url: str) -> None:
parsed = urlparse(url)
host = parsed.hostname or ""
if not is_host_allowed_for_airgap(host):
- raise AirgapViolation(
- f"air-gap policy blocked outbound request to {host or url!r}"
- )
+ raise AirgapViolation(f"air-gap policy blocked outbound request to {host or url!r}")
def airgap_status() -> dict[str, object]: