Documentation
¶
Index ¶
Constants ¶
const ( // HTTP API Server HTTP_API_PORT = "8090" // API Endpoints API_ALERT_STATUS_ENDPOINT = "/api/utm-alerts/status" API_INCIDENT_ENDPOINT = "/api/utm-incidents" API_INCIDENT_ADD_NEW_ALERT_ENDPOINT = "/api/utm-incidents/add-alerts" // Status codes API_ALERT_COMPLETED_STATUS_CODE = 5 // Timeouts (in seconds) HTTP_GPT_TIMEOUT = 90 // Timeout for LLM API calls HTTP_TIMEOUT = 30 // Timeout for general HTTP calls // Startup timing CONFIG_STARTUP_DELAY = 2 // Seconds to wait for config system to initialize ERROR_EXIT_DELAY = 5 // Seconds to wait before exiting on fatal error // Config polling TIME_FOR_GET_CONFIG = 10 // Seconds between config refresh attempts CLEANER_DELAY = 10 // Correlation limits CORRELATION_MAX_ALERTS = 100 // Maximum historical alerts to fetch for correlation // Separators LOGS_SEPARATOR = "\n\n" // Double newline - cleaner for display )
Variables ¶
var ( FakeUserName = "John Doe" FakeEmail = "jhondoe@gmail.com" )
Fake values for anonymization
var SensitivePatterns = map[string]*SensitivePattern{
"email": {Regexp: `([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})`, FakeValue: "jhondoe@gmail.com"},
}
SensitivePatterns defines patterns to anonymize in alert data
Functions ¶
func GetConfigUpdateChannel ¶
func GetConfigUpdateChannel() <-chan *Set
func StartConfigurationSystem ¶
func StartConfigurationSystem()
Types ¶
type Config ¶
type Config struct {
// Platform (from plugins.PluginCfg("com.utmstack"))
Backend string
InternalKey string
// LLM (from YAML)
Provider string
URL string
Model string
APIKey string // decrypted
AuthType string // bearer | header | none
AuthHeaderName string
CustomHeaders map[string]string
MaxTokens int
ContextWindow int
// Agent behavior (from YAML)
MaxToolIterations int
AutoAnalyze bool
// AllowIncidents: whether the AUTOMATIC triage queue may create/update
// incidents when it decides an alert warrants one. Unrelated to the
// interactive chat — see Capabilities and TriageCapabilities.
AllowIncidents bool
// Capabilities: the interactive chat agent's tool groups. Always every
// group — including "incidents" — since a person is already driving
// that conversation; configuring SOC-AI at all is the signal it's meant
// to be used. Never gated by AllowIncidents.
Capabilities []string
// Derived: true when the plugin is configured enough to run.
ModuleActive bool
}
func GetPlatform ¶
func GetPlatform() *Config
func (*Config) TriageCapabilities ¶
TriageCapabilities 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.
type SensitivePattern ¶
type SensitivePattern struct {
Regexp string
FakeValue string
// contains filtered or unexported fields
}
SensitivePattern defines a pattern for anonymizing sensitive data
func (*SensitivePattern) GetRegexp ¶
func (sp *SensitivePattern) GetRegexp() *regexp.Regexp
GetRegexp returns the compiled regexp, compiling it on first access