Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
Python agentic-aiai-securityalert-triageblue-teamcybersecuritydetection-engineeringincident-responselanggraphllm-agentsmcpmitre-attackmodel-context-protocolpurple-teamsecurity-operationsself-hostedsiemsoarsocthreat-detectionthreat-intelligence
docs(connectors): marketplace entries + per-connector setup guides
Beenu Arora973f943f2e24
diff --git a/apps/docs/docs/connectors/azure-activity.md b/apps/docs/docs/connectors/azure-activity.mdnew file mode 100644index 000000000..1527c90d8--- /dev/null+++ b/apps/docs/docs/connectors/azure-activity.md@@ -0,0 +1,82 @@+---+sidebar_position: 3+title: Azure Activity Logs+description: Subscription-scope control-plane events from Azure Resource Manager into AiSOC — IAM grants, policy edits, resource changes.+---++# Azure Activity Logs++The Azure Activity connector streams **subscription-scope control-plane events** from the Azure Resource Manager (ARM) Activity Log into AiSOC. This is your primary signal for cloud-plane attack patterns: privilege escalation via `roleAssignments/write`, defense evasion via policy or NSG deletes, and high-blast-radius operations like `Microsoft.Authorization/roleDefinitions/write`.++## What you get++| Source | API | Scope |+|---|---|---|+| Activity Log entries | `Microsoft.Insights/eventtypes/management/values` | One Azure subscription |++Events arrive normalized with `category: cloud` and a `resource_id` pulled from the ARM operation target.++## Prerequisites++- An **Azure AD app registration** (you can reuse the one from the [Entra connector](/docs/connectors/azure-entra) — they will live alongside each other).+- The app must have **Reader** RBAC at the **subscription** scope (so it can read the activity log). Reader is enough; do not grant Contributor.+- The tenant ID, client ID, client secret, **and** the subscription ID you want to monitor.++## Setup walkthrough++### 1. Reuse or create an app registration++If you already created one for Entra, skip to step 2. Otherwise follow the [Entra walkthrough §1-3](/docs/connectors/azure-entra#1-register-the-app) — the same app can power Entra, Activity, Defender, and M365 simultaneously.++### 2. Grant Reader on the subscription++1. Azure portal → **Subscriptions → <your subscription> → Access control (IAM) → Add → Add role assignment**.+2. Role: **Reader**.+3. Members: **User, group, or service principal** → search for the app registration's display name.+4. Save.++### 3. Copy the subscription ID++In the Subscription Overview blade, copy the **Subscription ID** (a GUID).++### 4. Add the connector in AiSOC++1. AiSOC console → **Connectors → Add connector → Azure Activity Logs**.+2. Fill in `tenant_id`, `client_id`, `client_secret`, and `subscription_id`.+3. **Test connection** → calls the Activity Log API and asks for at most 1 entry to validate auth and scope.+4. **Save**.++## Polling details++- Default interval: **300 seconds**.+- Each poll requests `eventTimestamp ge {since}` so we never pull more than the last interval.+- ARM endpoint: `https://management.azure.com/subscriptions/{sub}/providers/Microsoft.Insights/eventtypes/management/values?api-version=2015-04-01`.+- OAuth scope used: `https://management.azure.com/.default`. (Note: this is **not** the Microsoft Graph scope — it's the ARM resource.)++## Severity heuristics — high-blast-radius detection++`normalize()` flags operations whose **resource/verb tail** matches a high-blast-radius pattern:++| Pattern | AiSOC severity |+|---|---|+| `microsoft.authorization/roleassignments/write` | `high` (privilege grant — T1098.003 territory) |+| `microsoft.authorization/roledefinitions/write` | `high` (custom role with elevated rights) |+| `*/delete` on `policyAssignments`, `firewallRules`, `networkSecurityGroups`, `keyVaults` | `high` |+| `*/deallocate`, `*/poweroff` on a VM in active use | `medium` |+| Any `failed` write at the control plane | `medium` |+| Routine reads (`*/read`) | dropped |++The exact match list lives in `_HIGH_BLAST_RADIUS_VERBS` inside `services/connectors/app/connectors/azure_activity.py`. Add a detection rule rather than editing that tuple unless you are upstreaming the change.++## Troubleshooting++**`InvalidAuthenticationToken` / `AuthorizationFailed`** — most often the app does not have Reader at the subscription scope. Re-check the role assignment.++**`SubscriptionNotFound`** — the GUID is for a subscription this app cannot see. Make sure you copied it from the same tenant the app is registered in.++**`No Activity Log data returned`** — Activity Log only retains 90 days, but more importantly only flows from operations *attempted* during the polling window. A new connector on a quiet subscription will log polls with `events_added: 0` until something happens.++## Related++- [Microsoft Entra ID](/docs/connectors/azure-entra) — identity-plane events that pair with these control-plane events.+- [Microsoft Defender (XDR)](/docs/connectors/azure-defender) — runtime alerts that cross-reference these activity events.diff --git a/apps/docs/docs/connectors/azure-defender.md b/apps/docs/docs/connectors/azure-defender.mdnew file mode 100644index 000000000..025e6f111--- /dev/null+++ b/apps/docs/docs/connectors/azure-defender.md@@ -0,0 +1,75 @@+---+sidebar_position: 4+title: Microsoft Defender (XDR)+description: Cross-product Defender alerts from Microsoft 365 Defender into AiSOC via the Microsoft Graph Security API.+---++# Microsoft Defender (XDR)++The Defender connector pulls **alerts from the unified Microsoft 365 Defender XDR fabric** — Defender for Endpoint, Defender for Identity, Defender for Cloud Apps, and Defender for Office — into AiSOC via the Microsoft Graph Security API (`/security/alerts_v2`).++## What you get++| Source | Microsoft Graph endpoint | Notes |+|---|---|---|+| Unified alerts | `/security/alerts_v2` | All XDR products, deduplicated and incident-correlated |++Events are normalized with `category: xdr` and the original `productName` preserved on the event for downstream routing.++## Prerequisites++- An **Azure AD app registration** (the [Entra app](/docs/connectors/azure-entra) is fine to reuse).+- The following **application permission** (admin-consent required):+ - `SecurityAlert.Read.All`+- The tenant ID, client ID, and client secret.++A Defender for Endpoint license is required for endpoint-class alerts to flow; other Defender skus are independent.++## Setup walkthrough++### 1. Add the Graph permission++1. Open the app registration → **API permissions → Add a permission → Microsoft Graph → Application permissions**.+2. Add **`SecurityAlert.Read.All`**.+3. **Grant admin consent** for the tenant.++That is the only step beyond the standard Entra app setup.++### 2. Add the connector in AiSOC++1. **Connectors → Add connector → Microsoft Defender (XDR)**.+2. `tenant_id`, `client_id`, `client_secret`.+3. **Test connection** → calls `/security/alerts_v2?$top=1` to validate.+4. **Save**.++## Polling details++- Default interval: **300 seconds**.+- The connector requests `?$filter=createdDateTime ge {since}&$orderby=createdDateTime asc`.+- OAuth scope: `https://graph.microsoft.com/.default`.++## Severity mapping++Defender ships its own severity. AiSOC honours it 1:1:++| Defender severity | AiSOC severity |+|---|---|+| `high` | `high` |+| `medium` | `medium` |+| `low` | `low` |+| `informational` | `info` |++The `serviceSource` field (e.g. `microsoftDefenderForEndpoint`, `microsoftDefenderForIdentity`) is preserved on the event so playbooks can branch on the originating product.++## Troubleshooting++**`Authorization_RequestDenied`** — admin consent is missing on `SecurityAlert.Read.All`. The app permission shows green only *after* consent, not just after Add.++**`Resource not found` on `/security/alerts_v2`** — your tenant has not been migrated to the unified Defender XDR. Microsoft has been slow-rolling this; check the Microsoft 365 Defender portal first to confirm the unified experience is live.++**`events_added: 0` indefinitely** — Defender does not generate alerts in clean tenants. Test by triggering a benign EICAR test against an enrolled endpoint; the alert should land within a few minutes.++## Related++- [Microsoft Entra ID](/docs/connectors/azure-entra) — identity context for Defender for Identity alerts.+- [Microsoft 365 Audit](/docs/connectors/m365-audit) — full M365 audit telemetry to cross-reference Defender alerts against user activity.diff --git a/apps/docs/docs/connectors/azure-entra.md b/apps/docs/docs/connectors/azure-entra.mdnew file mode 100644index 000000000..70c6a2136--- /dev/null+++ b/apps/docs/docs/connectors/azure-entra.md@@ -0,0 +1,94 @@+---+sidebar_position: 2+title: Microsoft Entra ID+description: Pull directory audit logs and risky sign-ins from Microsoft Entra ID (formerly Azure AD) into AiSOC.+---++# Microsoft Entra ID++The Entra connector streams **directory audit events** (group changes, role assignments, conditional-access edits) and **risky users / risky sign-ins** from Microsoft Graph into the AiSOC pipeline. It is the foundation of identity-plane coverage in any Microsoft-heavy environment.++## What you get++| Source | Microsoft Graph endpoint | Retention |+|---|---|---|+| Directory audit events | `/auditLogs/directoryAudits` | 90 days (Microsoft default) |+| Risky users | `/identityProtection/riskyUsers` | While risk state is non-`none` |++Events are normalized into AiSOC's event schema with `category: identity` so existing identity-plane Sigma rules apply without glue code.++## Prerequisites++You will need:++- An **Azure AD app registration** with admin consent in your tenant.+- The following **application permissions** (admin-consent required):+ - `AuditLog.Read.All`+ - `Directory.Read.All`+ - `IdentityRiskyUser.Read.All`+- A **client secret** (Certificates & secrets → New client secret).+- The tenant ID, application (client) ID, and client secret value to paste into the AiSOC wizard.++## Setup walkthrough++### 1. Register the app++1. Sign in to the [Azure portal](https://portal.azure.com) as a Global Admin or Application Administrator.+2. Navigate to **Microsoft Entra ID → App registrations → New registration**.+3. Name it something obvious like `AiSOC Entra Connector`. Leave the redirect URI blank — this connector uses client credentials, not user OAuth.+4. Click **Register**. Copy the **Application (client) ID** and the **Directory (tenant) ID** from the Overview tab.++### 2. Grant API permissions++1. In the new app, open **API permissions → Add a permission → Microsoft Graph → Application permissions**.+2. Add `AuditLog.Read.All`, `Directory.Read.All`, and `IdentityRiskyUser.Read.All`.+3. Click **Grant admin consent for <tenant>**. Confirm the status changes to a green check.++### 3. Mint a client secret++1. Open **Certificates & secrets → Client secrets → New client secret**.+2. Pick a description and an expiry that matches your rotation policy (24 months max, 6-12 months recommended). The connector will start failing on `health_status` once the secret expires.+3. Copy the **Value** (not the Secret ID). Microsoft only shows it once.++### 4. Add the connector in AiSOC++1. AiSOC console → **Connectors → Add connector → Microsoft Entra ID**.+2. Fill in `tenant_id`, `client_id`, `client_secret`. All three are the values you copied above.+3. Click **Test connection**. A successful test means Microsoft Graph accepted the client credentials and returned at least one page of audit logs.+4. Click **Save**. The connector starts polling within ~30 seconds.++## Polling details++- Default interval: **300 seconds**. Override via `connector_config.poll_interval_seconds`.+- The connector requests `directoryAudits?$filter=activityDateTime ge {since}` so the first poll only pulls the last interval, not 90 days of history.+- Risky users are fetched separately on each poll because Microsoft Graph does not support `since`-style filtering on that resource; only currently-risky users are returned.+- Token caching: the OAuth `access_token` from `https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token` is cached until 60 seconds before expiry.++## Severity heuristics++`normalize()` maps Entra audit `result` values into AiSOC severity:++| Microsoft signal | AiSOC severity |+|---|---|+| `failure` on a high-blast-radius operation (role assignment, app credential add, conditional-access disable) | `high` |+| Generic `failure` on directory writes | `medium` |+| Risky user with `riskLevel = high` | `high` |+| Risky user with `riskLevel = medium` | `medium` |+| `success` on a routine read | `info` |++Detection rules in `detections/identity/` consume the normalized event; tune severity there rather than monkey-patching the connector.++## Troubleshooting++**`AADSTS7000215: Invalid client secret provided`** — the secret expired or was copied incorrectly. Mint a new one and update the connector via the wizard's edit path.++**`AADSTS65001: The user or administrator has not consented`** — admin consent was not granted on at least one permission. Re-open API permissions and click _Grant admin consent_ again.++**`Authorization_RequestDenied`** — the app is missing one of the three required permissions. The most commonly missed one is `IdentityRiskyUser.Read.All`.++**`health_status: error` with `503` from Graph** — Microsoft Graph is throttling or partially down. The scheduler will retry on the next interval; no action required.++## Related++- [Microsoft 365 Audit](/docs/connectors/m365-audit) — same Azure AD app can supply both connectors; just add `ActivityFeed.Read` to the permission set.+- [Credential vault](/docs/operations/credentials) — how secrets are encrypted and rotated.diff --git a/apps/docs/docs/connectors/cloudflare.md b/apps/docs/docs/connectors/cloudflare.mdnew file mode 100644index 000000000..8033a5665--- /dev/null+++ b/apps/docs/docs/connectors/cloudflare.md@@ -0,0 +1,91 @@+---+sidebar_position: 9+title: Cloudflare Audit Logs+description: Account-scope audit log entries from Cloudflare — admin actions, API token usage, edge config changes — into AiSOC.+---++# Cloudflare Audit Logs++The Cloudflare connector pulls **account-scope audit log entries** from the Cloudflare API — every administrative action taken in the dashboard or via API, including DNS changes, WAF rule edits, page rule modifications, API token creation, and member role changes.++## What you get++| Resource type | Examples |+|---|---|+| `account` | Member added, role changed, 2FA disabled |+| `zone` | DNS record create/delete, SSL setting change |+| `firewall` | WAF rule create/edit, rate-limit change |+| `access` | Cloudflare Access policy edit, identity provider change |+| `r2` / `workers` | Bucket policy change, Worker route deploy |+| `api_token` | Token created, scope granted, token revoked |++Events are normalized with `source: cloudflare`, `category: saas`.++## Prerequisites++- A **Cloudflare account ID**. Find it at the bottom right of any zone overview page.+- A **Cloudflare API token** with at minimum:+ - **Account → Audit Logs → Read**+ - (Optional) **Account → Account Settings → Read** for member resolution+- The token must be **account-scoped**, not user-scoped, so it survives if the creating user leaves the team.++We strongly recommend creating a dedicated `aisoc-readonly` token with only the audit-log scope. Do not reuse your global API key.++## Setup walkthrough++### 1. Create the API token++1. **Cloudflare dashboard → My Profile → API Tokens → Create Token**.+2. Use the **Custom token** template.+3. Permissions:+ - **Account** | **Audit Logs** | **Read**+4. Account Resources: **Include → Specific account → <your account>**.+5. (Optional) Set a TTL or IP restriction.+6. **Continue → Create Token**. Copy the token now — you won't see it again.++### 2. Find your account ID++Any zone's **Overview** page shows the account ID in the right-hand sidebar (32-character hex string). Or run:++```bash+curl -H "Authorization: Bearer $TOKEN" https://api.cloudflare.com/client/v4/accounts | jq -r '.result[].id'+```++### 3. Add the connector in AiSOC++1. **Connectors → Add connector → Cloudflare**.+2. `account_id` = the 32-character hex string.+3. `api_token` = the token from step 1 (stored encrypted in the credential vault).+4. **Test connection** → calls `GET /accounts/:id/audit_logs?per_page=1`.+5. **Save**.++## Polling details++- Default interval: **300 seconds**.+- The connector calls `GET /accounts/:id/audit_logs?since=<lastpoll>&before=<now>&direction=desc&per_page=100`, paginating until exhaustion or an upper bound of 1000 events per poll.+- Cloudflare returns audit events with **near-zero latency** (typically <30 sec from action), making this one of the lower-latency connectors in the catalog.++## Severity heuristics++| Action | Severity |+|---|---|+| `member.add` with `Super Administrator` role | `high` |+| `api_token.create` with broad scopes (e.g. `Account.*`) | `high` |+| `account.2fa.disable` | `high` |+| `zone.firewall.rule.delete` on production zone | `medium` |+| `dns.record.delete` of an MX/A record on production zone | `medium` |+| `worker.route.create` pointing to an unverified worker | `medium` |+| Routine `zone.settings.read` | dropped |++## Troubleshooting++**`Authentication error (code: 10000)`** — token lacks the `Audit Logs Read` permission, or token is user-scoped on an account where the user has been removed. Recreate as account-scoped.++**`Resource not found (code: 7003)`** — the account ID is wrong. Confirm against the dashboard sidebar — it is **not** the same as the zone ID.++**Empty results despite recent dashboard changes** — the audit log API only includes a subset of dashboard activity (administrative changes). Read-only browsing does not appear. This is expected and matches Cloudflare's documented behavior.++## Related++- [GitHub Audit + Code Scanning](/docs/connectors/github) — for the source-control side of edge changes (e.g. workers committed to a repo before they were deployed).+- For zone-level WAF and bot events, see the dedicated **Cloudflare Logpush** documentation (separate, paid feature) — out of scope for this connector.diff --git a/apps/docs/docs/connectors/gcp-cloud-audit.md b/apps/docs/docs/connectors/gcp-cloud-audit.mdnew file mode 100644index 000000000..fa04119a6--- /dev/null+++ b/apps/docs/docs/connectors/gcp-cloud-audit.md@@ -0,0 +1,82 @@+---+sidebar_position: 5+title: GCP Cloud Audit Logs+description: Project-scope Admin Activity, Data Access, and System Event audit logs from Google Cloud into AiSOC.+---++# GCP Cloud Audit Logs++The GCP Cloud Audit connector streams **Cloud Logging audit log entries** from a single GCP project into AiSOC. This covers the three Google audit log types: **Admin Activity** (always on), **Data Access** (off by default for most services), and **System Event**.++## What you get++| Audit type | Logged by default | What's in it |+|---|---|---|+| Admin Activity | Yes, always | IAM grants, project metadata changes, resource create/delete |+| Data Access | No (opt-in per service) | Reads against user data — high volume, high signal for exfiltration |+| System Event | Yes, always | GCP-initiated changes (auto-resize, automatic migration, etc.) |++Events are normalized with `category: cloud` and `cloud_provider: gcp`.++## Prerequisites++- A **GCP project** to monitor.+- A **service account** in that project (or an org-level account with project access).+- The service account must have at minimum the **Logs Viewer** role (`roles/logging.viewer`) on the project. For private logs (Data Access for some services), grant **Private Logs Viewer** (`roles/logging.privateLogViewer`).+- A **JSON key** for that service account.+- The **Project ID** (the human-readable one, not the numeric Project Number).++## Setup walkthrough++### 1. Create the service account++1. Open the [GCP Console → IAM & Admin → Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) for your project.+2. **Create service account** → name it `aisoc-cloud-audit-reader`. Skip the optional grant step inside the wizard.+3. Once created, on the project's IAM page, **Grant access** to the new service account email with role **Logs Viewer** (and **Private Logs Viewer** if you want Data Access).++### 2. Mint a JSON key++1. Open the service account → **Keys → Add key → Create new key → JSON**.+2. Download the JSON file. Treat it like a password — anyone with this file can read your audit logs.++### 3. Add the connector in AiSOC++1. **Connectors → Add connector → GCP Cloud Audit Logs**.+2. `project_id` = your Project ID (not the number).+3. `service_account_json` = paste the **entire** JSON file contents into the textarea. The connector validates that it parses as JSON and contains a `private_key` field; it never logs the contents.+4. **Test connection** → makes a test `entries.list` call against `cloudaudit.googleapis.com/activity` for your project.+5. **Save**.++## Polling details++- Default interval: **300 seconds**.+- The connector calls `entries.list` with `filter='timestamp >= "{since}" AND logName:"cloudaudit.googleapis.com"'` to pull all three audit types in one query.+- Auth: standard GCP service-account JWT bearer flow against `https://oauth2.googleapis.com/token`.++## Severity heuristics++GCP audit logs do not carry a built-in severity; AiSOC infers from `methodName`:++| Pattern | Severity |+|---|---|+| `SetIamPolicy` with role grants like `roles/owner`, `roles/iam.securityAdmin` | `high` |+| `SetIamPolicy` (other) | `medium` |+| `Delete*` on networks, firewalls, KMS keys, sinks | `high` |+| `services.disable` on `cloudaudit.googleapis.com` (audit-log tampering) | `high` |+| Any `severity: ERROR` returned by GCP | bumped one level |+| Routine `Get*` / `List*` | dropped |++## Troubleshooting++**`PERMISSION_DENIED: Cloud Logging API has not been used in project ... before or it is disabled`** — enable the Cloud Logging API in the GCP project (`gcloud services enable logging.googleapis.com`).++**`PERMISSION_DENIED: ... does not have logging.logEntries.list`** — the service account is missing `roles/logging.viewer`. Re-grant on the project IAM page.++**`Service account JSON key file is invalid`** — the file has been re-formatted (e.g. `\n` in private key got escaped twice). Re-download a fresh key from the GCP console and paste without modification.++**`events_added: 0` on a busy project** — make sure you used the Project **ID**, not the Project **Number**. The numeric form does not work with the audit log filter.++## Related++- [GCP Security Command Center](/docs/connectors/gcp-scc) — pairs perfectly: SCC findings give you posture and threat detection; Cloud Audit gives you the raw control-plane events behind them.+- [Credential vault](/docs/operations/credentials) — the service-account JSON is encrypted at rest in the connector record.diff --git a/apps/docs/docs/connectors/gcp-scc.md b/apps/docs/docs/connectors/gcp-scc.mdnew file mode 100644index 000000000..2c2e0fc06--- /dev/null+++ b/apps/docs/docs/connectors/gcp-scc.md@@ -0,0 +1,91 @@+---+sidebar_position: 6+title: GCP Security Command Center+description: Posture and threat findings from Google Cloud Security Command Center (SCC) into AiSOC.+---++# GCP Security Command Center++The SCC connector pulls **findings** from Google Cloud Security Command Center — vulnerabilities, misconfigurations, threats, and posture violations across the GCP organization — into AiSOC.++## What you get++- **Vulnerability** findings (CVEs, exposed credentials, public buckets)+- **Misconfiguration** findings from Security Health Analytics+- **Threat** findings from Event Threat Detection (anomalous IAM behavior, brute force, crypto mining)+- **Posture** findings from Posture Management++Events are normalized with `category: cloud_posture` (vulnerability/misconfig) or `category: threat` (threat).++## Prerequisites++- **Security Command Center** enabled at the **organization** level. Project-level SCC does not expose the API used here.+- An **Organization ID** (the numeric one — find it in `gcloud organizations list`).+- A **service account** with the **Security Center Findings Viewer** role (`roles/securitycenter.findingsViewer`) at the **organization** scope.+- The **JSON key** for that service account.++## Setup walkthrough++### 1. Confirm SCC is on++`gcloud scc settings services list --organization=<ORG_ID>` — you should see `SECURITY_HEALTH_ANALYTICS`, `EVENT_THREAT_DETECTION`, etc. enabled. If not, [enable SCC Standard or Premium](https://cloud.google.com/security-command-center/docs/quickstart-scc-setup) at the org level.++### 2. Create the service account++1. **GCP Console → IAM & Admin → Service Accounts** in any project (we recommend a dedicated `security-tools` project).+2. **Create service account** → name `aisoc-scc-reader`.++### 3. Grant org-level access++1. **Console → IAM & Admin → IAM** at the **organization** level (use the org switcher).+2. **Grant access** → principal = the new service account email → role = **Security Center Findings Viewer**.++This must be at the **organization** level, not at a project level. SCC findings are an org-scoped resource.++### 4. Mint the JSON key and add to AiSOC++1. Service account → **Keys → Add key → Create new key → JSON**.+2. **AiSOC → Connectors → Add connector → GCP Security Command Center**.+3. `organization_id` = the numeric org ID (e.g. `123456789012`, not `example.com`).+4. `service_account_json` = paste the JSON.+5. **Test connection** → calls `findings.list` with `pageSize=1` against the org.+6. **Save**.++## Polling details++- Default interval: **600 seconds** (10 min). SCC findings update slower than audit logs and the API has tight quotas.+- Filter: `state="ACTIVE" AND eventTime > "{since}"` — only currently-active findings, not muted/resolved ones.++## Severity mapping++SCC carries explicit severity; AiSOC uses it directly:++| SCC severity | AiSOC severity |+|---|---|+| `CRITICAL` | `critical` |+| `HIGH` | `high` |+| `MEDIUM` | `medium` |+| `LOW` | `low` |+| unset | `low` |++`category` mapping:++| SCC `findingClass` | AiSOC category |+|---|---|+| `THREAT` | `threat` |+| `VULNERABILITY` | `cloud_posture` |+| `MISCONFIGURATION` | `cloud_posture` |+| `OBSERVATION`, `SCC_ERROR` | `cloud_posture` |++## Troubleshooting++**`PERMISSION_DENIED: ... does not have securitycenter.findings.list ... on organization ...`** — the service account does not have **org-level** access. Re-grant at the org IAM page (not at any project).++**`NOT_FOUND: Organization "organizations/123456789012" was not found`** — wrong org ID, or SCC has never been enabled at the org. Run `gcloud scc settings describe --organization=<ORG_ID>` to confirm.++**Empty findings on a known-vulnerable org** — verify findings exist via `gcloud scc findings list organizations/<ORG_ID>`. If the CLI works but the connector returns zero, check that `state="ACTIVE"`; the connector deliberately filters out muted findings.++## Related++- [GCP Cloud Audit Logs](/docs/connectors/gcp-cloud-audit) — pair these two for full GCP coverage. SCC tells you what's wrong; Cloud Audit tells you who/what changed.+- [Credential vault](/docs/operations/credentials)diff --git a/apps/docs/docs/connectors/github.md b/apps/docs/docs/connectors/github.mdnew file mode 100644index 000000000..0a1c0e47d--- /dev/null+++ b/apps/docs/docs/connectors/github.md@@ -0,0 +1,97 @@+---+sidebar_position: 10+title: GitHub Audit + Code Scanning+description: Organization audit log and Code Scanning alerts from GitHub Enterprise / Cloud into AiSOC.+---++# GitHub Audit + Code Scanning++The GitHub connector pulls two streams from a single GitHub organization:++1. **Organization audit log** — every administrative action: member adds, repo creates, secret-scanning toggles, Actions secret changes, branch-protection edits, OAuth app installs.+2. **Code Scanning alerts** — open, dismissed, and fixed findings from CodeQL or any third-party SARIF uploader (e.g. Semgrep).++Events are normalized with `source: github`, `category: vcs`.++## Prerequisites++- A **GitHub organization** (Cloud or Enterprise Server). Personal-account repos have no audit log API.+- An **organization-scoped token**. Two options:+ - **Fine-grained personal access token (recommended)** with org access and the following permissions:+ - **Organization permissions → Members → Read-only**+ - **Organization permissions → Audit log → Read-only**+ - **Repository permissions → Code scanning alerts → Read-only**+ - **GitHub App** installed on the org with the same permissions, then use an installation token. This is the right path for production deployments.+- (Cloud) **Audit log streaming must be enabled** on the org, or use the standard `GET /orgs/{org}/audit-log` endpoint (available on Enterprise Cloud + GHE Server).++## Setup walkthrough++### 1. Create the token++**Fine-grained PAT path:**++1. **GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token**.+2. **Resource owner**: select the organization.+3. **Repository access**: All repositories (or a curated subset).+4. **Permissions**: as listed above.+5. **Expiration**: 90 days max recommended; rotate via the AiSOC connector edit screen.+6. Generate and copy the token (`github_pat_…`).++**GitHub App path** (preferred for prod):++1. **Org Settings → Developer settings → GitHub Apps → New GitHub App**.+2. Permissions match the PAT path above.+3. Install the app on your org.+4. Generate an installation access token via the App's private key.++### 2. Add the connector in AiSOC++1. **Connectors → Add connector → GitHub**.+2. `organization` = your GitHub org login slug (e.g. `acme-corp`, not the full URL).+3. `token` = the fine-grained PAT or installation token (encrypted in the credential vault).+4. **Test connection** → calls `GET /orgs/{org}` to verify token + org access.+5. **Save**.++## Polling details++- Default interval: **300 seconds**.+- Per poll, the connector calls:+ - `GET /orgs/{org}/audit-log?phrase=created:>=<lastpoll>&per_page=100` — paginates audit events.+ - `GET /orgs/{org}/code-scanning/alerts?state=open&per_page=100` — pulls open Code Scanning findings (newly opened or reopened).+- **Rate limit awareness**: the connector reads `X-RateLimit-Remaining` and backs off if <100 calls are left in the hour.+- Audit log events appear in the API typically within **<5 minutes** of the action. Code Scanning alerts depend on the scanning schedule of the upstream workflow.++## Severity heuristics++| Event | Severity |+|---|---|+| `org.add_member` granting `admin` role | `high` |+| `org.disable_two_factor_requirement` | `high` |+| `repo.public_repository_disabled_visibility` (private → public) | `high` |+| `org.update_actions_secret` | `medium` |+| `repo.delete_protected_branch_rule` on `main` | `medium` |+| `oauth_application.create` on an unknown app | `medium` |+| Code Scanning alert with `severity: critical` and `tool: CodeQL` | `high` |+| Code Scanning alert with `severity: error` | `medium` |+| Routine `repo.access` reads | dropped |++## Troubleshooting++**`Bad credentials`** — token is invalid, revoked, or scoped to a different org. Tokens are organization-scoped on fine-grained PATs; pasting a token created for a different org silently fails with this error.++**`Resource not accessible by personal access token`** — token lacks the `Audit log: Read` permission. Recreate the token; you cannot patch permissions on an existing fine-grained PAT.++**Empty Code Scanning results** — the org may not have any repos with CodeQL or other SARIF uploaders enabled. Confirm via `GET /orgs/{org}/code-scanning/alerts?state=all` outside AiSOC.++**Rate-limit exhaustion** — fine-grained PATs share a 5,000-req/hour budget across all GitHub usage by that token. If you also use the same token in CI, expect contention. GitHub Apps get a higher per-installation limit and are recommended for production.++## What this connector does **not** cover++- **Push events / commit content**: this connector reads metadata only, not commit diffs. For commit-content scanning, use a separate ingestion path or rely on Code Scanning's own SARIF outputs.+- **Dependabot alerts**: separate API. Not currently included; will land as a follow-on connector.+- **Secret scanning alerts**: separate API requiring `secret_scanning_alerts: read`. Not currently included; same follow-on.++## Related++- [Microsoft 365 Audit](/docs/connectors/m365-audit) — for the OAuth-grant side of the same identity surface (third-party app installs that target Microsoft Graph).+- [Cloudflare Audit Logs](/docs/connectors/cloudflare) — for the edge-deploy side of changes that originated as a GitHub commit.diff --git a/apps/docs/docs/connectors/google-workspace.md b/apps/docs/docs/connectors/google-workspace.mdnew file mode 100644index 000000000..2f8c7cc0d--- /dev/null+++ b/apps/docs/docs/connectors/google-workspace.md@@ -0,0 +1,92 @@+---+sidebar_position: 8+title: Google Workspace+description: Admin, login, drive, and token activity from Google Workspace (formerly G Suite) into AiSOC via the Reports API.+---++# Google Workspace++The Google Workspace connector pulls **activity reports** from the Reports API — admin actions, user logins, Drive file events, OAuth token grants, and more — into AiSOC. It is the identity-and-collaboration counterpart to the Microsoft 365 connector.++## What you get++| Application name | Examples |+|---|---|+| `admin` | User created, group changed, 2SV settings modified |+| `login` | Successful and failed logins, suspicious-login challenges |+| `drive` | File create, share, download (requires Drive audit log) |+| `token` | OAuth grant to third-party app, token revoke |+| `mobile` | Device enrollment, suspicious activity |++Events are normalized with `source: google_workspace` and `category` derived from the application name.++## Prerequisites++- A **Google Cloud project** in the same organization as your Workspace tenant.+- A **service account** with **domain-wide delegation enabled**.+- A **JSON key** for that service account.+- A **Workspace super-admin email** to impersonate (the Reports API requires admin context).+- The OAuth scope `https://www.googleapis.com/auth/admin.reports.audit.readonly` granted to the service account's client ID in **Workspace Admin → Security → API controls → Domain-wide delegation**.++## Setup walkthrough++### 1. Create the service account++1. **GCP Console → IAM & Admin → Service Accounts → Create**.+2. Name: `aisoc-workspace-reports`.+3. Skip the "grant access to project" step — domain-wide delegation is what matters here.+4. Open the service account → **Keys → Add key → JSON**. Download.++### 2. Enable domain-wide delegation++1. On the service account detail page, click **Show advanced settings → Enable Google Workspace Domain-wide Delegation**.+2. Note the **OAuth client ID** that appears (a long numeric string).++### 3. Authorize the scope in Workspace++1. **admin.google.com → Security → API controls → Manage domain-wide delegation → Add new**.+2. Client ID: paste from step 2.+3. OAuth scopes: `https://www.googleapis.com/auth/admin.reports.audit.readonly`.+4. **Authorize**.++### 4. Pick an admin email to impersonate++The Reports API will not return events unless the credential is acting as a super-admin. Pick a dedicated `[email protected]` super-admin if possible — easier to audit than impersonating a human admin.++### 5. Add the connector in AiSOC++1. **Connectors → Add connector → Google Workspace**.+2. `admin_email` = the super-admin to impersonate.+3. `service_account_json` = paste the entire downloaded JSON file as one blob.+4. **Test connection** → calls `activities.list(applicationName=admin, maxResults=1)`.+5. **Save**.++## Polling details++- Default interval: **300 seconds**.+- The connector iterates over the configured application names (default: `admin`, `login`, `drive`, `token`) and pulls activities since the last poll, paginating with `nextPageToken`.+- Reports API has up to 30 minutes of ingestion latency on `drive` events; other applications are typically 1-2 min.++## Severity heuristics++| Event | Severity |+|---|---|+| `CHANGE_USER_2_STEP_VERIFICATION` from `enabled` → `disabled` | `high` |+| `GRANT_ADMIN_PRIVILEGE`, `ASSIGN_ROLE` on a privileged role | `high` |+| `login_failure` clusters from a single user (3+ in a window) | `medium` |+| `suspicious_login` challenge result `passed` | `medium` |+| `authorize` (OAuth) on a non-internal third-party app with broad scopes | `medium` |+| Routine file open/edit | dropped |++## Troubleshooting++**`unauthorized_client: Client is unauthorized to retrieve access tokens using this method`** — domain-wide delegation is not authorized for the scope. Re-check step 3 and confirm the **client ID** (not the email) matches the service account's OAuth client ID.++**`Forbidden: Access denied`** despite a working test — the impersonated user is not a super-admin. The Reports API requires super-admin scope; "User Management Admin" is not enough.++**`Daily Limit Exceeded`** — the Reports API has a daily quota per project. Either request a quota bump in GCP, or lengthen the poll interval to reduce call volume.++## Related++- [Microsoft 365 Audit](/docs/connectors/m365-audit) — Microsoft equivalent. If you have both, run both — they are non-overlapping.+- [GitHub Audit + Code Scanning](/docs/connectors/github) — for the dev side of identity if your engineering team lives in GitHub.diff --git a/apps/docs/docs/connectors/index.md b/apps/docs/docs/connectors/index.mdnew file mode 100644index 000000000..9231aa377--- /dev/null+++ b/apps/docs/docs/connectors/index.md@@ -0,0 +1,67 @@+---+sidebar_position: 1+title: Connectors overview+description: Click-and-connect data sources for AiSOC — Azure, GCP, Microsoft 365, Google Workspace, Cloudflare, GitHub, and the rest of the catalog.+---++# Connectors++A **connector** is the bridge between an external data source (an identity provider, a cloud audit log, an EDR, a SaaS platform) and the AiSOC pipeline. Once a connector instance is enabled, the connector microservice polls it on a schedule, pulls new events, normalizes them into AiSOC's event schema, and posts them to the ingest service for detection and triage.++Everything ships with three guarantees:++- **Credentials are encrypted at rest.** Tokens, client secrets, and service-account JSON keys are sealed with `Fernet` (AES-128-CBC + HMAC-SHA256) before they touch the database. See [Credential vault](/docs/operations/credentials).+- **Schemas are self-describing.** The connector tells the UI what fields it needs; the wizard renders them. There is no hardcoded form that drifts from the backend.+- **Polling is observable.** Every poll records `last_poll_at`, `events_added`, and `health_status`. Failures show up in the connector card with the underlying error message.++## Catalog++| Connector | Category | Auth | Notes |+|---|---|---|---|+| [Microsoft Entra ID](/docs/connectors/azure-entra) | Identity | Azure AD app (client credentials) | Directory audits + risky sign-ins via Microsoft Graph |+| [Azure Activity Logs](/docs/connectors/azure-activity) | Cloud (control plane) | Azure AD app + subscription | Subscription-scope ARM activity, IAM grants, policy changes |+| [Microsoft Defender (XDR)](/docs/connectors/azure-defender) | EDR / XDR | Azure AD app | Cross-product alerts via Microsoft Graph Security |+| [GCP Cloud Audit Logs](/docs/connectors/gcp-cloud-audit) | Cloud (control plane) | Service account JSON | Admin Activity + Data Access + System Event |+| [GCP Security Command Center](/docs/connectors/gcp-scc) | Cloud (posture) | Service account JSON | Org-scope active findings |+| [Microsoft 365 Audit](/docs/connectors/m365-audit) | SaaS | Azure AD app (shares Entra creds) | Unified audit log: AAD, Exchange, SharePoint, Teams |+| [Google Workspace](/docs/connectors/google-workspace) | SaaS / Identity | Service account + DWD | Admin SDK Reports: login, admin, drive, token, mobile |+| [Cloudflare](/docs/connectors/cloudflare) | SaaS | API token | Account audit logs (operator activity, not edge traffic) |+| [GitHub](/docs/connectors/github) | VCS | PAT or App installation token | Org audit log + Code Scanning alerts |+| Okta | Identity | API token | System log (already shipped) |+| AWS Security Hub | Cloud (posture) | AWS keys / role | Findings (already shipped) |+| CrowdStrike Falcon | EDR | OAuth2 client credentials | Detections (already shipped) |+| Splunk | SIEM | HEC token / API | Saved-search results (already shipped) |+| Microsoft Sentinel | SIEM | Azure AD app | Incidents (already shipped) |++## Adding a connector++1. Open the AiSOC console → **Connectors** → **Add connector**.+2. Pick a connector from the catalog grid. The wizard advances to a schema-driven configuration form.+3. Fill in the required fields. Secret fields (tokens, client secrets, service-account JSON) are obscured.+4. Click **Test connection**. The pre-save test is stateless — credentials are sent once over TLS, the target API is called, and **nothing is persisted** unless the test passes and you click **Save**.+5. On save, the credentials are encrypted in the vault, the instance is stored with `is_enabled=true`, and the scheduler picks it up on the next reload (within 30 seconds).++## How polling works++Each enabled connector instance becomes one job in an in-process [`APScheduler`](https://apscheduler.readthedocs.io/) running inside `services/connectors`:++- Default poll interval: **300 seconds** (5 minutes). Override per-instance via `connector_config.poll_interval_seconds`. Minimum is 30s.+- Every 30s the scheduler queries the database for `is_enabled = true` instances and rebuilds the job set. Add, remove, or change the polling interval and the next reload picks it up.+- On poll: the vault decrypts `auth_config` in memory, the connector class is instantiated, `fetch_alerts(since_seconds=poll_interval)` runs, results pass through `normalize()`, and the resulting events are POSTed to the ingest service with the tenant ID header.+- On failure: the error message is recorded on `health_status` and surfaced in the UI. The job stays scheduled; the next interval will retry.++## Categories++Connector categories drive the catalog grouping and downstream routing hints. The current set is:++`identity` · `cloud` · `vcs` · `siem` · `edr` · `xdr` · `network` · `posture` · `saas`++These map to the same taxonomy used by detection rules, so a Microsoft Entra alert flowing in here can be matched against `category: identity` Sigma rules without any glue code.++## What "hosted OAuth" means++Several connectors today require you to bring your own credentials (an Azure AD app registration, a GitHub PAT, a service-account JSON). The connector schema includes an `oauth` block that advertises whether a hosted OAuth flow is available — for now, every connector that supports OAuth marks it `supported_in_hosted: false`. Hosted OAuth (where AiSOC owns the app registration and you click "Connect") is on the roadmap; see [Credential vault](/docs/operations/credentials#hosted-oauth-roadmap).++## Writing a new connector++See [Plugin SDK overview](/docs/plugins/overview) and [Contributing](/docs/contributing/guidelines). The short version: subclass `BaseConnector`, implement `schema()`, `test_connection()`, `fetch_alerts()`, and `normalize()`, register it in `services/connectors/app/connectors/__init__.py`, drop a `plugin.yaml` under `plugins/<id>/`, and run `pnpm marketplace:sync`.diff --git a/apps/docs/docs/connectors/m365-audit.md b/apps/docs/docs/connectors/m365-audit.mdnew file mode 100644index 000000000..e5a1a9db8--- /dev/null+++ b/apps/docs/docs/connectors/m365-audit.md@@ -0,0 +1,95 @@+---+sidebar_position: 7+title: Microsoft 365 Audit+description: Tenant-wide Microsoft 365 audit events (Exchange, SharePoint, Teams, OneDrive, Azure AD) via the Office 365 Management Activity API.+---++# Microsoft 365 Audit++The M365 connector pulls **unified audit log events** from the Office 365 Management Activity API. This includes Exchange Online mailbox audit, SharePoint and OneDrive file activity, Teams chat and meeting events, Power Platform actions, and Azure AD sign-ins.++## What you get++| Content type | Examples |+|---|---|+| `Audit.Exchange` | Mailbox login, mail rule create, send-as |+| `Audit.SharePoint` | File access, sharing-link create, anonymous-link |+| `Audit.AzureActiveDirectory` | User sign-in, MFA disable, app consent |+| `Audit.General` | Teams meeting events, DLP matches, eDiscovery |+| `DLP.All` | Data loss prevention rule matches |++The connector subscribes to all five content types. Events are normalized with `source: m365` and `category` derived from the workload.++## Prerequisites++You can **reuse the Azure AD app from the [Entra connector](/docs/connectors/azure-entra)** — they share an auth model. If you do, just add the extra application permission below.++If creating fresh:++- An **Azure AD app registration** (App registration in Entra ID).+- A **client secret**.+- The application permission **`ActivityFeed.Read`** (and **`ActivityFeed.ReadDlp`** if you want DLP events) on the **Office 365 Management APIs** resource (not on Microsoft Graph).+- **Admin consent** granted on those permissions.+- Audit logging **must be enabled** in the tenant (`Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true`).++## Setup walkthrough++### 1. Add Management API permission++1. **Entra admin → App registrations → your app → API permissions**.+2. **Add a permission → Office 365 Management APIs → Application permissions**.+3. Select `ActivityFeed.Read` (and `ActivityFeed.ReadDlp` if needed).+4. Click **Grant admin consent for <tenant>**.++### 2. Confirm unified audit log is on++In a PowerShell session connected to Exchange Online:++```powershell+Get-AdminAuditLogConfig | Select-Object UnifiedAuditLogIngestionEnabled+```++If `False`, run:++```powershell+Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true+```++### 3. Add the connector in AiSOC++1. **Connectors → Add connector → Microsoft 365 Audit**.+2. `tenant_id`, `client_id`, `client_secret` = same values as the Entra connector (or freshly minted).+3. **Test connection** → starts a subscription on `Audit.General` and immediately stops it; this is the cheapest verification call.+4. **Save**.++## Polling details++- Default interval: **300 seconds**.+- The connector calls `subscriptions/content` for each content type with `startTime`/`endTime` set to the last-poll window.+- Each content URL returned is then fetched and concatenated. The Management API delivers events with up to 60 minutes of latency, so don't be alarmed if events seem to lag.+- On first poll for a tenant, the connector ensures all five subscriptions are started (idempotent).++## Severity heuristics++The Management API does not provide severity, so AiSOC infers from `Operation`:++| Pattern | Severity |+|---|---|+| `Add member to role`, mailbox `Add-MailboxPermission`, `Set-Mailbox` with `ForwardingSmtpAddress` | `high` |+| `New-InboxRule` matching exfil patterns (forward to external, delete-on-receive) | `high` |+| Anonymous link create (`AnonymousLinkCreated`) on SharePoint | `medium` |+| MFA disable (`Disable Strong Authentication`) | `high` |+| Routine `MailItemsAccessed`, `FileAccessed` | dropped unless flagged by DLP |++## Troubleshooting++**`AAD: Tenant ... does not have a service principal for resource manage.office.com`** — the app has Microsoft Graph perms but not Office 365 Management API perms. Add `ActivityFeed.Read` on the **Office 365 Management APIs** resource specifically.++**Subscription started but `events_added: 0`** — Management API has up to 60 min latency on first events. Wait one full polling interval, then check again. Also confirm `UnifiedAuditLogIngestionEnabled` is `True`.++**`InvalidPropertyValueException: tenant ID has not been onboarded`** — you need to start a subscription via `POST /subscriptions/start?contentType=...` first. The connector does this automatically on first poll, so just wait one cycle.++## Related++- [Microsoft Entra ID](/docs/connectors/azure-entra) — sign-in/audit at the directory level. M365 audit gives you the workload-level depth.+- [Microsoft Defender (XDR)](/docs/connectors/azure-defender) — finished alerts. M365 audit gives you the raw events behind them.diff --git a/apps/docs/docs/operations/credentials.md b/apps/docs/docs/operations/credentials.mdnew file mode 100644index 000000000..152e78762--- /dev/null+++ b/apps/docs/docs/operations/credentials.md@@ -0,0 +1,162 @@+---+sidebar_position: 1+title: Credential vault & secrets+description: How AiSOC stores connector credentials at rest, how to rotate the master key, and the roadmap for hosted OAuth.+---++# Credential vault and secret management++Connectors need real secrets — Azure client secrets, GCP service-account keys, GitHub tokens. AiSOC stores them with a defense-in-depth design: **encrypted at the application layer, with the database as a transport medium, not a trust boundary**.++This page documents the model, how to operate it, and what changes when you move from local dev to production.++## At a glance++| Property | Value |+|---|---|+| **Cipher** | Fernet (AES-128-CBC + HMAC-SHA256, RFC-aligned) |+| **Library** | `cryptography.fernet` from the `cryptography` package |+| **Storage** | `connector_instances.auth_config` JSONB column, encrypted-at-write |+| **Master key** | `AISOC_CREDENTIAL_KEY` environment variable, 32 url-safe base64 bytes |+| **Implementation** | [`services/api/app/security/credential_vault.py`](https://github.com/beenuar/AiSOC/blob/main/services/api/app/security/credential_vault.py) |+| **Plaintext exposure** | Only inside the connector microservice process at fetch time |++## Why application-layer encryption++We deliberately do **not** rely on the database's own at-rest encryption (e.g. AWS RDS `STORAGE_ENCRYPTED`, Postgres `pgcrypto`) as the only line of defense. Those mechanisms protect against disk theft but **not against a compromised read-only DB role, a leaky backup, or a misconfigured replica**.++Fernet at the API layer means:++- A leaked `pg_dump` is useless without `AISOC_CREDENTIAL_KEY`.+- A read-only support role can see *that* a connector exists (its name, type, last-sync time) but cannot read the secret payload.+- Rotation is a key-swap operation, not a database migration.++## How a credential moves through the system++```+ Browser API service Connector microservice+ ------ -------------- ---------------------+ POST /connectors → CredentialVault.encrypt() → (stored as ciphertext in DB)+ { auth_config: {…} } fernet(key, plaintext)+ │+ ▼+ connector_instances.auth_config Scheduler tick:+ (BYTEA / JSONB ciphertext) CredentialVault.decrypt()+ → connector.fetch_alerts()+ → IngestClient.post()+ (plaintext drops out of scope)+```++Plaintext exists only inside `services/connectors` for the duration of one fetch. It is never returned in any HTTP response — the API redacts secret-typed fields when reading instances back to the UI.++## Generating the master key++In development, the `.env.example` file ships a placeholder; real keys are generated locally:++```bash+python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"+```++This produces a 44-character url-safe base64 string. Set it in the environment of every service that needs to encrypt or decrypt:++```bash+export AISOC_CREDENTIAL_KEY="kY7w…=" # never commit this value+```++The API service writes encrypted blobs; the connector microservice decrypts them at fetch time. **Both services must share the same key value** or polling will fail with `InvalidToken`.++## Production deployment++### Where to put the key++| Platform | Recommended location |+|---|---|+| Kubernetes | A `Secret` named `aisoc-credential-vault`, mounted as env into both `aisoc-api` and `aisoc-connectors` Deployments |+| Fly.io | `fly secrets set AISOC_CREDENTIAL_KEY=…` in **both** apps |+| AWS ECS / Fargate | An SSM Parameter referenced via `secrets:` in the task definition |+| Docker Compose (single-host) | A `.env` file outside the repo, mounted into both services |++Do **not** bake the key into a Docker image, a public Helm chart, or a Terraform `tfvars` file checked into git.++### Sealing it further (optional, recommended)++For higher-assurance deployments, treat `AISOC_CREDENTIAL_KEY` as a long-lived encryption key and protect it with an external KMS. Two patterns work:++1. **KMS-wrapped key**: store an AWS KMS / GCP KMS / Vault Transit-encrypted blob in the secret manager. A small init-container decrypts it at pod start and writes the plaintext key to a tmpfs the application can read.+2. **External KMS for envelope encryption**: replace `CredentialVault` with a wrapper that delegates `encrypt()` / `decrypt()` to a KMS Encrypt/Decrypt API call. This keeps the master key off your fleet entirely. A reference implementation will land in a follow-on release; the `CredentialVault` interface is intentionally narrow to make this swap a single-class change.++## Key rotation++Rotation is supported via Fernet's **MultiFernet** primitive: the new key encrypts new writes; the old key decrypts old data; old data is rewritten on next update. The procedure:++1. Generate a new key with the same one-liner above.+2. Set both keys in the environment as a comma-separated list:++ ```bash+ AISOC_CREDENTIAL_KEY="<NEW>,<OLD>"+ ```++ The first entry is used for new encryption; subsequent entries are decrypt-only.+3. Roll the API and connector services. Existing connector instances continue to work because the old key is still in the decrypt set.+4. Run the rotation job (or simply edit each connector instance once in the UI) to force re-encryption with the new key.+5. After confirming all instances have been re-written with the new key, drop the old entry:++ ```bash+ AISOC_CREDENTIAL_KEY="<NEW>"+ ```++A scheduled rotation cadence of 90 days is a reasonable default; treat any suspected key compromise as an emergency requiring immediate rotation **and** invalidation of all upstream credentials (Azure secrets, GCP keys, GitHub tokens).++## Per-connector secret rotation++Independent of the master key, the upstream credentials inside each connector instance should be rotated on the cadence of your identity provider's policy (typically 90–180 days for OAuth client secrets and PATs). The AiSOC UI supports in-place editing: the **Configure** action on a connector card opens the schema-driven form pre-populated with masked values, lets you paste a new secret, and re-encrypts on save. No restart, no scheduler downtime.++## What lives in the vault, and what does not++In the vault:++- `client_secret`, `api_token`, `service_account_json`, and any field marked `secret: true` in a connector's `schema()`.++Not in the vault (stored as plaintext JSON for operational visibility):++- `tenant_id`, `client_id`, `account_id`, `organization`, `project_id`, and any field marked `secret: false`.++This split is deliberate. Identifiers are useful for support and observability (logs, dashboards, error messages); secrets must never appear in either.++## Hosted OAuth roadmap++Several connectors (Azure, GCP, Google Workspace) currently require the operator to do an Azure-AD-app or service-account dance before they can be added in AiSOC. This is fine for SOC engineers but a friction point for everyone else. Hosted OAuth is the planned solution:++- **Phase 1 (current)**: connector schemas already declare OAuth metadata (`authorize_url`, `token_url`, `scopes`, `supported_in_hosted`). The UI shows an "OAuth coming soon" badge for capable connectors.+- **Phase 2 (planned)**: AiSOC Cloud (and self-hosted with an OAuth-app config) will surface a one-click flow that exchanges an authorization code for an offline refresh token, encrypts it via the vault, and stores it as the connector's `auth_config`.+- **Phase 3 (planned)**: scoped tokens for self-hosted air-gapped installs that cannot reach an OAuth provider — operators ship a refresh-token bundle out-of-band.++The `CredentialVault` and connector schema model are stable shapes. Adding hosted OAuth does not require any change to existing connector implementations.++## Auditing++Every encrypt and decrypt call emits a structured log line through `structlog`:++```+event=credential.encrypt connector_id=<uuid> tenant_id=<uuid> bytes=412+event=credential.decrypt connector_id=<uuid> tenant_id=<uuid> caller=scheduler+```++The plaintext is **never** logged. Pair this with your existing log pipeline (Elastic, Datadog, Splunk, Loki) to alert on unexpected decrypt patterns — e.g. a decrypt outside the scheduler context, or a sudden burst of decrypts from a single tenant.++## Threat model summary++| Threat | Mitigation |+|---|---|+| Stolen DB backup | Useless without `AISOC_CREDENTIAL_KEY` |+| Read-only DB role compromised | Cannot read secret payloads (only metadata) |+| Plaintext secret in API logs | Vault never logs plaintext; secret fields are filtered before request logging |+| Plaintext in HTTP response to UI | API redacts secret-typed fields on read |+| Compromised connector pod | Plaintext exposed only in-memory for the duration of one fetch |+| Lost master key | **Catastrophic** — stored credentials are unrecoverable. This is the intended failure mode. Recovery path: rotate every upstream credential and reconfigure each connector instance. |+| Compromised master key | Rotate via MultiFernet (see above), then rotate every upstream credential as a precaution |++## Related++- [Connectors overview](/docs/connectors/) — how the vault fits into the broader connector lifecycle.+- [Environment Variables](/docs/deployment/env-vars) — full env reference including `AISOC_CREDENTIAL_KEY` and related settings.diff --git a/apps/docs/sidebars.ts b/apps/docs/sidebars.tsindex 0874a357d..9486308ce 100644--- a/apps/docs/sidebars.ts+++ b/apps/docs/sidebars.ts@@ -12,6 +12,27 @@ const sidebars: SidebarsConfig = {label: "Core Concepts",items: ["concepts/cases", "concepts/playbooks", "concepts/detections"],},+ {+ type: "category",+ label: "Connectors",+ items: [+ "connectors/index",+ "connectors/azure-entra",+ "connectors/azure-activity",+ "connectors/azure-defender",+ "connectors/gcp-cloud-audit",+ "connectors/gcp-scc",+ "connectors/m365-audit",+ "connectors/google-workspace",+ "connectors/cloudflare",+ "connectors/github",+ ],+ },+ {+ type: "category",+ label: "Operations",+ items: ["operations/credentials"],+ },{type: "category",label: "Plugin SDK",diff --git a/apps/web/public/marketplace/index.json b/apps/web/public/marketplace/index.jsonindex a6ad76878..312cee107 100644--- a/apps/web/public/marketplace/index.json+++ b/apps/web/public/marketplace/index.json@@ -1,7 +1,7 @@{"$schema": "https://aisoc.dev/schemas/marketplace/v1.json","version": "1.0.0",- "generated": "2026-05-05T06:47:15Z",+ "generated": "2026-05-05T22:11:19Z","categories": [{"id": "playbooks",@@ -20,15 +20,15 @@}],"stats": {- "total": 6978,+ "total": 6987,"playbooks": 50,"detections": 6913,- "plugins": 15,- "verified": 865,+ "plugins": 24,+ "verified": 874,"community": 0,"by_tier": {"imported": 6113,- "stable": 865+ "stable": 874},"detections_by_tier": {"imported": 6113,@@ -221584,6 +221584,110 @@"enabled": true,"path": "playbooks/packs/v1/supply-chain/supply-vendor-breach.playbook.json"},+ {+ "id": "azure-activity",+ "type": "plugin",+ "name": "Azure Activity Logs Connector",+ "description": "Azure Activity Logs subscription-level control-plane events (resource creates, role assignments, policy changes) via the Azure Monitor REST API. Flags high-blast-radius operations such as RBAC role grants and policy modifications, then forwards to AiSOC for cloud-plane detection coverage.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "cloud",+ "azure",+ "activity",+ "audit",+ "control-plane",+ "microsoft"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_activity.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/azure-activity/plugin.yaml"+ },+ {+ "id": "azure-defender",+ "type": "plugin",+ "name": "Microsoft Defender Connector",+ "description": "Microsoft Defender (XDR / Defender for Cloud) alerts via Microsoft Graph Security API. Pulls cross-product alerts (endpoint, identity, cloud apps, cloud workloads) and normalizes them into AiSOC's incident schema. Requires an Azure AD app registration with SecurityAlert.Read.All.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "edr",+ "xdr",+ "azure",+ "microsoft",+ "defender",+ "alerts"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_defender.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/azure-defender/plugin.yaml"+ },+ {+ "id": "azure-entra",+ "type": "plugin",+ "name": "Microsoft Entra ID Connector",+ "description": "Microsoft Entra ID (formerly Azure AD) directory audits and risky sign-ins via Microsoft Graph. Streams directoryAudits, signIns, and IdentityRiskyUser events into AiSOC for identity-plane detection coverage. Requires an Azure AD app registration with AuditLog.Read.All and Directory.Read.All application permissions.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "iam",+ "azure",+ "entra",+ "identity",+ "microsoft",+ "audit"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_entra.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/azure-entra/plugin.yaml"+ },+ {+ "id": "cloudflare",+ "type": "plugin",+ "name": "Cloudflare Audit Logs Connector",+ "description": "Cloudflare account-scope audit logs (zone changes, API token grants, member adds, WAF/firewall edits) via the Cloudflare v4 API. Captures operator activity across the account so high-risk admin actions land in AiSOC alongside other identity-plane signal. Requires an API token scoped to Account: Audit Logs: Read.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "saas",+ "cloudflare",+ "audit",+ "identity",+ "admin",+ "edge"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/cloudflare.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/cloudflare/plugin.yaml"+ },{"id": "cloudflare-waf","type": "plugin",@@ -221640,6 +221744,85 @@"tier": "stable","path": "plugins/datadog-incidents/plugin.yaml"},+ {+ "id": "gcp-cloud-audit",+ "type": "plugin",+ "name": "GCP Cloud Audit Logs Connector",+ "description": "Google Cloud Platform Admin Activity, Data Access, and System Event audit logs via the Cloud Logging API. Captures IAM changes, resource mutations, and high-risk data-plane reads, then normalizes to AiSOC's event schema. Requires a service account with roles/logging.viewer on the target project.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "cloud",+ "gcp",+ "google",+ "audit",+ "logging",+ "control-plane"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/gcp_cloud_audit.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/gcp-cloud-audit/plugin.yaml"+ },+ {+ "id": "gcp-scc",+ "type": "plugin",+ "name": "GCP Security Command Center Connector",+ "description": "Google Cloud Security Command Center findings (misconfigurations, threats, vulnerabilities) at the organization scope. Streams ACTIVE findings into AiSOC for unified cloud-posture and runtime-threat triage. Requires a service account with roles/securitycenter.findingsViewer on the organization.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "cloud",+ "gcp",+ "google",+ "scc",+ "posture",+ "vuln",+ "findings"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/gcp_scc.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/gcp-scc/plugin.yaml"+ },+ {+ "id": "github",+ "type": "plugin",+ "name": "GitHub Connector (Audit + Code Scanning)",+ "description": "GitHub organization audit log and Code Scanning alerts via the GitHub REST API. Streams org-level admin events plus security findings (CodeQL, secret scanning, third-party scanners) into AiSOC for unified supply-chain and VCS threat coverage. Requires a fine-grained PAT or GitHub App installation token with read:audit_log and security_events scopes.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "vcs",+ "github",+ "audit",+ "code-scanning",+ "supply-chain",+ "identity"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/github.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/github/plugin.yaml"+ },{"id": "github-audit","type": "plugin",@@ -221696,6 +221879,32 @@"tier": "stable","path": "plugins/gitlab-audit/plugin.yaml"},+ {+ "id": "google-workspace",+ "type": "plugin",+ "name": "Google Workspace Connector",+ "description": "Google Workspace audit logs (login, admin, drive, token, mobile) via the Admin SDK Reports API. Provides identity- and SaaS-plane signal across the Workspace surface, including suspicious-login flags and 2-step-verification state changes. Requires a service account with domain-wide delegation and the admin.reports.audit.readonly scope.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "saas",+ "google",+ "workspace",+ "gsuite",+ "identity",+ "audit"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/google_workspace.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/google-workspace/plugin.yaml"+ },{"id": "jamf-mdm","type": "plugin",@@ -221724,6 +221933,34 @@"tier": "stable","path": "plugins/jamf-mdm/plugin.yaml"},+ {+ "id": "m365-audit",+ "type": "plugin",+ "name": "Microsoft 365 Audit Connector",+ "description": "Microsoft 365 unified audit log (Azure AD, Exchange, SharePoint/OneDrive, Teams, Power BI) via the Office 365 Management Activity API. Surfaces SaaS data-access and configuration events with the same Azure AD app credentials used by the Entra connector. Requires ActivityFeed.Read on the registered app.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "saas",+ "microsoft",+ "m365",+ "office365",+ "audit",+ "exchange",+ "sharepoint",+ "teams"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/m365_audit.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/m365-audit/plugin.yaml"+ },{"id": "mttr-widget","type": "plugin",diff --git a/marketplace/index.json b/marketplace/index.jsonindex a6ad76878..312cee107 100644--- a/marketplace/index.json+++ b/marketplace/index.json@@ -1,7 +1,7 @@{"$schema": "https://aisoc.dev/schemas/marketplace/v1.json","version": "1.0.0",- "generated": "2026-05-05T06:47:15Z",+ "generated": "2026-05-05T22:11:19Z","categories": [{"id": "playbooks",@@ -20,15 +20,15 @@}],"stats": {- "total": 6978,+ "total": 6987,"playbooks": 50,"detections": 6913,- "plugins": 15,- "verified": 865,+ "plugins": 24,+ "verified": 874,"community": 0,"by_tier": {"imported": 6113,- "stable": 865+ "stable": 874},"detections_by_tier": {"imported": 6113,@@ -221584,6 +221584,110 @@"enabled": true,"path": "playbooks/packs/v1/supply-chain/supply-vendor-breach.playbook.json"},+ {+ "id": "azure-activity",+ "type": "plugin",+ "name": "Azure Activity Logs Connector",+ "description": "Azure Activity Logs subscription-level control-plane events (resource creates, role assignments, policy changes) via the Azure Monitor REST API. Flags high-blast-radius operations such as RBAC role grants and policy modifications, then forwards to AiSOC for cloud-plane detection coverage.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "cloud",+ "azure",+ "activity",+ "audit",+ "control-plane",+ "microsoft"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_activity.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/azure-activity/plugin.yaml"+ },+ {+ "id": "azure-defender",+ "type": "plugin",+ "name": "Microsoft Defender Connector",+ "description": "Microsoft Defender (XDR / Defender for Cloud) alerts via Microsoft Graph Security API. Pulls cross-product alerts (endpoint, identity, cloud apps, cloud workloads) and normalizes them into AiSOC's incident schema. Requires an Azure AD app registration with SecurityAlert.Read.All.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "edr",+ "xdr",+ "azure",+ "microsoft",+ "defender",+ "alerts"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_defender.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/azure-defender/plugin.yaml"+ },+ {+ "id": "azure-entra",+ "type": "plugin",+ "name": "Microsoft Entra ID Connector",+ "description": "Microsoft Entra ID (formerly Azure AD) directory audits and risky sign-ins via Microsoft Graph. Streams directoryAudits, signIns, and IdentityRiskyUser events into AiSOC for identity-plane detection coverage. Requires an Azure AD app registration with AuditLog.Read.All and Directory.Read.All application permissions.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "iam",+ "azure",+ "entra",+ "identity",+ "microsoft",+ "audit"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_entra.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/azure-entra/plugin.yaml"+ },+ {+ "id": "cloudflare",+ "type": "plugin",+ "name": "Cloudflare Audit Logs Connector",+ "description": "Cloudflare account-scope audit logs (zone changes, API token grants, member adds, WAF/firewall edits) via the Cloudflare v4 API. Captures operator activity across the account so high-risk admin actions land in AiSOC alongside other identity-plane signal. Requires an API token scoped to Account: Audit Logs: Read.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "saas",+ "cloudflare",+ "audit",+ "identity",+ "admin",+ "edge"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/cloudflare.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/cloudflare/plugin.yaml"+ },{"id": "cloudflare-waf","type": "plugin",@@ -221640,6 +221744,85 @@"tier": "stable","path": "plugins/datadog-incidents/plugin.yaml"},+ {+ "id": "gcp-cloud-audit",+ "type": "plugin",+ "name": "GCP Cloud Audit Logs Connector",+ "description": "Google Cloud Platform Admin Activity, Data Access, and System Event audit logs via the Cloud Logging API. Captures IAM changes, resource mutations, and high-risk data-plane reads, then normalizes to AiSOC's event schema. Requires a service account with roles/logging.viewer on the target project.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "cloud",+ "gcp",+ "google",+ "audit",+ "logging",+ "control-plane"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/gcp_cloud_audit.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/gcp-cloud-audit/plugin.yaml"+ },+ {+ "id": "gcp-scc",+ "type": "plugin",+ "name": "GCP Security Command Center Connector",+ "description": "Google Cloud Security Command Center findings (misconfigurations, threats, vulnerabilities) at the organization scope. Streams ACTIVE findings into AiSOC for unified cloud-posture and runtime-threat triage. Requires a service account with roles/securitycenter.findingsViewer on the organization.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "cloud",+ "gcp",+ "google",+ "scc",+ "posture",+ "vuln",+ "findings"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/gcp_scc.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/gcp-scc/plugin.yaml"+ },+ {+ "id": "github",+ "type": "plugin",+ "name": "GitHub Connector (Audit + Code Scanning)",+ "description": "GitHub organization audit log and Code Scanning alerts via the GitHub REST API. Streams org-level admin events plus security findings (CodeQL, secret scanning, third-party scanners) into AiSOC for unified supply-chain and VCS threat coverage. Requires a fine-grained PAT or GitHub App installation token with read:audit_log and security_events scopes.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "vcs",+ "github",+ "audit",+ "code-scanning",+ "supply-chain",+ "identity"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/github.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/github/plugin.yaml"+ },{"id": "github-audit","type": "plugin",@@ -221696,6 +221879,32 @@"tier": "stable","path": "plugins/gitlab-audit/plugin.yaml"},+ {+ "id": "google-workspace",+ "type": "plugin",+ "name": "Google Workspace Connector",+ "description": "Google Workspace audit logs (login, admin, drive, token, mobile) via the Admin SDK Reports API. Provides identity- and SaaS-plane signal across the Workspace surface, including suspicious-login flags and 2-step-verification state changes. Requires a service account with domain-wide delegation and the admin.reports.audit.readonly scope.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "saas",+ "google",+ "workspace",+ "gsuite",+ "identity",+ "audit"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/google_workspace.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/google-workspace/plugin.yaml"+ },{"id": "jamf-mdm","type": "plugin",@@ -221724,6 +221933,34 @@"tier": "stable","path": "plugins/jamf-mdm/plugin.yaml"},+ {+ "id": "m365-audit",+ "type": "plugin",+ "name": "Microsoft 365 Audit Connector",+ "description": "Microsoft 365 unified audit log (Azure AD, Exchange, SharePoint/OneDrive, Teams, Power BI) via the Office 365 Management Activity API. Surfaces SaaS data-access and configuration events with the same Azure AD app credentials used by the Entra connector. Requires ActivityFeed.Read on the registered app.",+ "version": "1.0.0",+ "author": "AiSOC Core Team",+ "tags": [+ "saas",+ "microsoft",+ "m365",+ "office365",+ "audit",+ "exchange",+ "sharepoint",+ "teams"+ ],+ "plugin_type": "connector",+ "license": "MIT",+ "homepage": "https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/m365_audit.py",+ "min_aisoc_version": "4.0.0",+ "sdks": [],+ "mitre_techniques": [],+ "verified": true,+ "source": "core",+ "tier": "stable",+ "path": "plugins/m365-audit/plugin.yaml"+ },{"id": "mttr-widget","type": "plugin",diff --git a/plugins/azure-activity/plugin.yaml b/plugins/azure-activity/plugin.yamlnew file mode 100644index 000000000..89481116f--- /dev/null+++ b/plugins/azure-activity/plugin.yaml@@ -0,0 +1,32 @@+id: azure-activity+name: Azure Activity Logs Connector+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ Azure Activity Logs subscription-level control-plane events (resource creates,+ role assignments, policy changes) via the Azure Monitor REST API. Flags+ high-blast-radius operations such as RBAC role grants and policy+ modifications, then forwards to AiSOC for cloud-plane detection coverage.+author: AiSOC Core Team+tags: [cloud, azure, activity, audit, control-plane, microsoft]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_activity.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [tenant_id, client_id, client_secret, subscription_id]+ properties:+ tenant_id:+ type: string+ description: "Azure AD tenant ID (GUID)"+ client_id:+ type: string+ description: "Application (Client) ID of the Azure AD app registration"+ client_secret:+ type: string+ description: "Client secret for the Azure AD app registration"+ secret: true+ subscription_id:+ type: string+ description: "Azure subscription ID to pull Activity Logs from"diff --git a/plugins/azure-defender/plugin.yaml b/plugins/azure-defender/plugin.yamlnew file mode 100644index 000000000..f9f82f263--- /dev/null+++ b/plugins/azure-defender/plugin.yaml@@ -0,0 +1,29 @@+id: azure-defender+name: Microsoft Defender Connector+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ Microsoft Defender (XDR / Defender for Cloud) alerts via Microsoft Graph+ Security API. Pulls cross-product alerts (endpoint, identity, cloud apps,+ cloud workloads) and normalizes them into AiSOC's incident schema. Requires+ an Azure AD app registration with SecurityAlert.Read.All.+author: AiSOC Core Team+tags: [edr, xdr, azure, microsoft, defender, alerts]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_defender.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [tenant_id, client_id, client_secret]+ properties:+ tenant_id:+ type: string+ description: "Azure AD tenant ID (GUID)"+ client_id:+ type: string+ description: "Application (Client) ID of the Azure AD app registration"+ client_secret:+ type: string+ description: "Client secret for the Azure AD app registration"+ secret: truediff --git a/plugins/azure-entra/plugin.yaml b/plugins/azure-entra/plugin.yamlnew file mode 100644index 000000000..1685b3a46--- /dev/null+++ b/plugins/azure-entra/plugin.yaml@@ -0,0 +1,30 @@+id: azure-entra+name: Microsoft Entra ID Connector+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ Microsoft Entra ID (formerly Azure AD) directory audits and risky sign-ins+ via Microsoft Graph. Streams directoryAudits, signIns, and IdentityRiskyUser+ events into AiSOC for identity-plane detection coverage. Requires an Azure AD+ app registration with AuditLog.Read.All and Directory.Read.All application+ permissions.+author: AiSOC Core Team+tags: [iam, azure, entra, identity, microsoft, audit]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/azure_entra.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [tenant_id, client_id, client_secret]+ properties:+ tenant_id:+ type: string+ description: "Azure AD tenant ID (GUID)"+ client_id:+ type: string+ description: "Application (Client) ID of the Azure AD app registration"+ client_secret:+ type: string+ description: "Client secret for the Azure AD app registration"+ secret: truediff --git a/plugins/cloudflare/plugin.yaml b/plugins/cloudflare/plugin.yamlnew file mode 100644index 000000000..dd8993d49--- /dev/null+++ b/plugins/cloudflare/plugin.yaml@@ -0,0 +1,27 @@+id: cloudflare+name: Cloudflare Audit Logs Connector+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ Cloudflare account-scope audit logs (zone changes, API token grants, member+ adds, WAF/firewall edits) via the Cloudflare v4 API. Captures operator+ activity across the account so high-risk admin actions land in AiSOC+ alongside other identity-plane signal. Requires an API token scoped to+ Account: Audit Logs: Read.+author: AiSOC Core Team+tags: [saas, cloudflare, audit, identity, admin, edge]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/cloudflare.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [account_id, api_token]+ properties:+ account_id:+ type: string+ description: "Cloudflare account ID (visible in any zone Overview)"+ api_token:+ type: string+ description: "Account-scoped API token with Audit Logs: Read permission"+ secret: truediff --git a/plugins/gcp-cloud-audit/plugin.yaml b/plugins/gcp-cloud-audit/plugin.yamlnew file mode 100644index 000000000..f1adc29aa--- /dev/null+++ b/plugins/gcp-cloud-audit/plugin.yaml@@ -0,0 +1,26 @@+id: gcp-cloud-audit+name: GCP Cloud Audit Logs Connector+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ Google Cloud Platform Admin Activity, Data Access, and System Event audit+ logs via the Cloud Logging API. Captures IAM changes, resource mutations,+ and high-risk data-plane reads, then normalizes to AiSOC's event schema.+ Requires a service account with roles/logging.viewer on the target project.+author: AiSOC Core Team+tags: [cloud, gcp, google, audit, logging, control-plane]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/gcp_cloud_audit.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [project_id, service_account_json]+ properties:+ project_id:+ type: string+ description: "GCP project ID to pull Cloud Audit Logs from"+ service_account_json:+ type: string+ description: "Service account JSON key, encrypted at rest by the credential vault"+ secret: truediff --git a/plugins/gcp-scc/plugin.yaml b/plugins/gcp-scc/plugin.yamlnew file mode 100644index 000000000..e2344e54b--- /dev/null+++ b/plugins/gcp-scc/plugin.yaml@@ -0,0 +1,27 @@+id: gcp-scc+name: GCP Security Command Center Connector+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ Google Cloud Security Command Center findings (misconfigurations, threats,+ vulnerabilities) at the organization scope. Streams ACTIVE findings into+ AiSOC for unified cloud-posture and runtime-threat triage. Requires a+ service account with roles/securitycenter.findingsViewer on the+ organization.+author: AiSOC Core Team+tags: [cloud, gcp, google, scc, posture, vuln, findings]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/gcp_scc.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [organization_id, service_account_json]+ properties:+ organization_id:+ type: string+ description: "GCP organization ID (numeric)"+ service_account_json:+ type: string+ description: "Service account JSON key, encrypted at rest by the credential vault"+ secret: truediff --git a/plugins/github/plugin.yaml b/plugins/github/plugin.yamlnew file mode 100644index 000000000..31fcedcde--- /dev/null+++ b/plugins/github/plugin.yaml@@ -0,0 +1,27 @@+id: github+name: GitHub Connector (Audit + Code Scanning)+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ GitHub organization audit log and Code Scanning alerts via the GitHub REST+ API. Streams org-level admin events plus security findings (CodeQL, secret+ scanning, third-party scanners) into AiSOC for unified supply-chain and VCS+ threat coverage. Requires a fine-grained PAT or GitHub App installation+ token with read:audit_log and security_events scopes.+author: AiSOC Core Team+tags: [vcs, github, audit, code-scanning, supply-chain, identity]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/github.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [organization, token]+ properties:+ organization:+ type: string+ description: "GitHub organization slug, e.g. acme-corp"+ token:+ type: string+ description: "Fine-grained PAT or GitHub App installation token (read:audit_log, security_events)"+ secret: truediff --git a/plugins/google-workspace/plugin.yaml b/plugins/google-workspace/plugin.yamlnew file mode 100644index 000000000..62c525a43--- /dev/null+++ b/plugins/google-workspace/plugin.yaml@@ -0,0 +1,27 @@+id: google-workspace+name: Google Workspace Connector+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ Google Workspace audit logs (login, admin, drive, token, mobile) via the+ Admin SDK Reports API. Provides identity- and SaaS-plane signal across the+ Workspace surface, including suspicious-login flags and 2-step-verification+ state changes. Requires a service account with domain-wide delegation and+ the admin.reports.audit.readonly scope.+author: AiSOC Core Team+tags: [saas, google, workspace, gsuite, identity, audit]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/google_workspace.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [admin_email, service_account_json]+ properties:+ admin_email:+ type: string+ description: "Super-admin email to impersonate via domain-wide delegation"+ service_account_json:+ type: string+ description: "Service account JSON key, encrypted at rest by the credential vault"+ secret: truediff --git a/plugins/m365-audit/plugin.yaml b/plugins/m365-audit/plugin.yamlnew file mode 100644index 000000000..21fde585c--- /dev/null+++ b/plugins/m365-audit/plugin.yaml@@ -0,0 +1,30 @@+id: m365-audit+name: Microsoft 365 Audit Connector+version: "1.0.0"+plugin_type: connector+tier: stable+description: >+ Microsoft 365 unified audit log (Azure AD, Exchange, SharePoint/OneDrive,+ Teams, Power BI) via the Office 365 Management Activity API. Surfaces SaaS+ data-access and configuration events with the same Azure AD app credentials+ used by the Entra connector. Requires ActivityFeed.Read on the registered+ app.+author: AiSOC Core Team+tags: [saas, microsoft, m365, office365, audit, exchange, sharepoint, teams]+homepage: https://github.com/beenuar/AiSOC/tree/main/services/connectors/app/connectors/m365_audit.py+license: MIT+min_aisoc_version: "4.0.0"+config_schema:+ type: object+ required: [tenant_id, client_id, client_secret]+ properties:+ tenant_id:+ type: string+ description: "Azure AD tenant ID (GUID)"+ client_id:+ type: string+ description: "Application (Client) ID of the Azure AD app registration"+ client_secret:+ type: string+ description: "Client secret for the Azure AD app registration"+ secret: true