{"modulePath":"github.com/utmstack/UTMStack/plugins/soc-ai","version":"v0.0.0-20261126134315-738f65073a40","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\n## Constants\n\n```go\nconst (\n\t// HTTP API Server\n\tHTTP_API_PORT = \"8090\"\n\n\t// API Endpoints\n\tAPI_ALERT_STATUS_ENDPOINT           = \"/api/utm-alerts/status\"\n\tAPI_INCIDENT_ENDPOINT               = \"/api/utm-incidents\"\n\tAPI_INCIDENT_ADD_NEW_ALERT_ENDPOINT = \"/api/utm-incidents/add-alerts\"\n\n\t// Status codes\n\tAPI_ALERT_COMPLETED_STATUS_CODE = 5\n\n\t// Timeouts (in seconds)\n\tHTTP_GPT_TIMEOUT = 90 // Timeout for LLM API calls\n\tHTTP_TIMEOUT     = 30 // Timeout for general HTTP calls\n\n\t// Startup timing\n\tCONFIG_STARTUP_DELAY = 2 // Seconds to wait for config system to initialize\n\tERROR_EXIT_DELAY     = 5 // Seconds to wait before exiting on fatal error\n\n\t// Config polling\n\tTIME_FOR_GET_CONFIG = 10 // Seconds between config refresh attempts\n\tCLEANER_DELAY       = 10\n\n\t// Correlation limits\n\tCORRELATION_MAX_ALERTS = 100 // Maximum historical alerts to fetch for correlation\n\n\t// Separators\n\tLOGS_SEPARATOR = \"\\n\\n\" // Double newline - cleaner for display\n)\n```\n\n## Variables\n\n```go\nvar (\n\tFakeUserName = \"John Doe\"\n\tFakeEmail    = \"jhondoe@gmail.com\"\n)\n```\nFake values for anonymization\n\n```go\nvar SensitivePatterns = map[string]*SensitivePattern{\n\t\"email\": {Regexp: `([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})`, FakeValue: \"jhondoe@gmail.com\"},\n}\n```\nSensitivePatterns defines patterns to anonymize in alert data\n\n## Functions\n\n```go\nfunc GetConfigUpdateChannel() \u003c-chan *Set\n```\n\n```go\nfunc StartConfigurationSystem()\n```\n\n## Types\n\n```go\ntype Cipher struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCipher(key string) *Cipher\n```\n\n```go\nfunc (c *Cipher) Decrypt(crypt string) (string, error)\n```\n\n```go\ntype Config struct {\n\t// Platform (from plugins.PluginCfg(\"com.utmstack\"))\n\tBackend     string\n\tInternalKey string\n\n\t// LLM (from YAML)\n\tProvider       string\n\tURL            string\n\tModel          string\n\tAPIKey         string // decrypted\n\tAuthType       string // bearer | header | none\n\tAuthHeaderName string\n\tCustomHeaders  map[string]string\n\tMaxTokens      int\n\tContextWindow  int\n\n\t// Agent behavior (from YAML)\n\tMaxToolIterations int\n\tAutoAnalyze       bool\n\t// AllowIncidents: whether the AUTOMATIC triage queue may create/update\n\t// incidents when it decides an alert warrants one. Unrelated to the\n\t// interactive chat — see Capabilities and TriageCapabilities.\n\tAllowIncidents bool\n\t// Capabilities: the interactive chat agent's tool groups. Always every\n\t// group — including \"incidents\" — since a person is already driving\n\t// that conversation; configuring SOC-AI at all is the signal it's meant\n\t// to be used. Never gated by AllowIncidents.\n\tCapabilities []string\n\n\t// Derived: true when the plugin is configured enough to run.\n\tModuleActive bool\n}\n```\n\n```go\nfunc GetConfig(tenantID string) *Config\n```\n\n```go\nfunc GetPlatform() *Config\n```\n\n```go\nfunc (c *Config) TriageCapabilities() []string\n```\nTriageCapabilities is what the AUTOMATIC triage queue may use — distinct from Capabilities (the chat's, always everything): the queue runs unattended, so unlike the chat, whether it may touch incidents is a real choice, gated by AllowIncidents. It has no business with dashboards, compliance, correlation, datasources or SOAR either way; the triage prompt never asks for them.\n\n```go\ntype SensitivePattern struct {\n\tRegexp    string\n\tFakeValue string\n\t// contains filtered or unexported fields\n}\n```\nSensitivePattern defines a pattern for anonymizing sensitive data\n\n```go\nfunc (sp *SensitivePattern) GetRegexp() *regexp.Regexp\n```\nGetRegexp returns the compiled regexp, compiling it on first access\n\n```go\ntype Set struct {\n\tDefault *Config\n\tTenants map[string]*Config\n}\n```\n\n","path":"github.com/utmstack/UTMStack/plugins/soc-ai/config","name":"config","synopsis":"","isRedistributable":true}
