soc-ai

command module
v0.0.0-...-738f650 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

soc-ai — agentic SOC plugin

An autonomous SOC agent for UTMStack. It connects to any LLM and executes operations against the SIEM through the backend MCP server (50+ tools), running a real tool-calling loop: plan → call tool → observe → repeat → conclude.

Two surfaces

  1. Real-time alert triage — alerts arrive via the correlation gRPC stream (InitCorrelationPlugin), are anonymized, and handed to the agent. The agent investigates with read-only tools, classifies the alert, and records an [AI SOC Agent] … assessment note (the Alerts UI parses this format). Mutating actions (status change, incident creation) are gated by config.

  2. Live operations endpoint — POST /api/v1/agent/task (SSE). Give it a free-form task; it operates the SIEM end to end and streams every step:

    curl -N -X POST localhost:8090/api/v1/agent/task \
      -H "X-Internal-Key: $KEY" -d '{"task":"how many open alerts, grouped by adversary?"}'
    → event: tool_call   data: {...}
    → event: tool_result data: {...}
    → event: final       data: {...}
    

Architecture

correlate(alert) ─► queue ─┐
                           ├─► agent.Run ─► LLMClient (openai-compat | anthropic)
POST /agent/task (SSE) ────┘        │   tools
                                    └─► ToolBroker ─► backend /api/v1/mcp (X-Internal-Key)
  • internal/agent/ — the engine.
    • llm.go — provider-neutral LLMClient interface + factory.
    • openai.go / anthropic.go — the two provider implementations.
    • mcp.go — ToolBroker, the MCP client to the backend (auth via X-Internal-Key, which maps to an internal actor that bypasses all gates).
    • loop.go — the agent loop, tool-gating, and the live-agent holder.
    • prompt.go — triage and ops system prompts.
  • config/ — YAML config (system_plugins_soc_ai.yaml) with fsnotify hot-reload and AES-CBC/PBKDF2 secret decryption (same scheme as aws/azure/gcp).
  • internal/queue/ — bounded worker queue feeding the triage agent.
  • internal/api/ — HTTP server: /health, /api/v1/analyze (manual submit), /api/v1/metrics, /api/v1/agent/task (SSE).

Configuration

See system_plugins_soc_ai.example.yaml. Provider/model/secret + behavior flags come from the YAML; backend URL, internal key and encryption key come from the platform plugin config.

Authentication

All SIEM operations go through the backend MCP server. The plugin authenticates with the platform internal key (X-Internal-Key); the backend resolves it to an internal actor (backend/pkg/http/middleware/auth.go) that skips every permission/role/license gate (backend/modules/mcp/server.go).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
api

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL