Documentation
¶
Index ¶
Constants ¶
View Source
const ( EntityTypeAlert = "alert" EntityTypeCase = "case" EntityTypeTask = "task" EntityTypeObservable = "observable" EntityTypeComment = "comment" EntityTypePage = "page" EntityTypeAttachment = "attachment" EntityTypeTaskLog = "task-log" EntityTypeProcedure = "procedure" EntityTypePattern = "pattern" EntityTypeCaseTemplate = "case-template" )
Entity type constants for TheHive entities
View Source
const DateFormat = "2006-01-02T15:04:05"
View Source
const DefaultMaxCompletionRetries = 3
View Source
const DefaultMaxCompletionTime = 60 * time.Second
Variables ¶
View Source
var DefaultFields map[string][]string = map[string][]string{ EntityTypeAlert: {"_id", "title", "_createdAt", "severity", "status"}, EntityTypeCase: {"_id", "title", "_createdAt", "status", "severity"}, EntityTypeTask: {"_id", "title", "status", "_createdAt", "assignee"}, EntityTypeObservable: {"_id", "dataType", "_createdAt"}, EntityTypeComment: {"_id", "message", "_createdAt", "_createdBy"}, EntityTypePage: {"_id", "title", "_createdAt"}, EntityTypeAttachment: {"_id", "fileName", "size", "_createdAt"}, EntityTypeTaskLog: {"_id", "message", "_createdAt", "_createdBy"}, EntityTypeProcedure: {"_id", "patternId", "patternName", "description", "occurDate"}, EntityTypePattern: {"_id", "patternId", "name", "tactics", "platforms"}, EntityTypeCaseTemplate: {"_id", "name", "displayName", "description", "severity", "tags"}, }
Functions ¶
This section is empty.
Types ¶
type CtxKey ¶
type CtxKey string
const AuthErrorCtxKey CtxKey = "auth_error"
const HiveAPIKeyCtxKey CtxKey = "hive_api_key"
const HiveClientCtxKey CtxKey = "hive_client"
const HiveOrgCtxKey CtxKey = "hive_org"
const HiveURLCtxKey CtxKey = "hive_url"
const OpenAIAPIKeyCtxKey CtxKey = "openai_api_key"
const OpenAIBaseURLCtxKey CtxKey = "openai_base_url"
const OpenAIClientCtxKey CtxKey = "openai_client"
const OpenAIMaxTokensCtxKey CtxKey = "openai_max_tokens"
const OpenAIModelCtxKey CtxKey = "openai_model"
const OpenAIRequestStartTimeCtxKey CtxKey = "openai_request_start_time"
const PermissionsCtxKey CtxKey = "permissions"
const RequestIDCtxKey CtxKey = "request_id"
const SamplingModelRequestStartTimeCtxKey CtxKey = "sampling_model_request_start_time"
type EnvKey ¶
type EnvKey string
const EnvKeyBindHost EnvKey = "MCP_BIND_HOST"
const EnvKeyLogLevel EnvKey = "LOG_LEVEL"
const EnvKeyMCPHeartbeatInterval EnvKey = "MCP_HEARTBEAT_INTERVAL"
const EnvKeyMCPPort EnvKey = "MCP_PORT"
const EnvKeyMCPServerEndpoint EnvKey = "MCP_SERVER_ENDPOINT"
const EnvKeyOpenAIAPIKey EnvKey = "OPENAI_API_KEY"
const EnvKeyOpenAIBaseURL EnvKey = "OPENAI_BASE_URL"
const EnvKeyOpenAIMaxTokens EnvKey = "OPENAI_MAX_TOKENS"
const EnvKeyOpenAIModel EnvKey = "OPENAI_MODEL"
const EnvKeyPermissionsConfig EnvKey = "PERMISSIONS_CONFIG"
const EnvKeyTheHiveAPIKey EnvKey = "THEHIVE_API_KEY"
const EnvKeyTheHiveOrganisation EnvKey = "THEHIVE_ORGANISATION"
const EnvKeyTheHivePassword EnvKey = "THEHIVE_PASSWORD"
const EnvKeyTheHiveURL EnvKey = "THEHIVE_URL"
const EnvKeyTheHiveUsername EnvKey = "THEHIVE_USERNAME"
type FlagVar ¶
type FlagVar string
const FlagVarBindAddr FlagVar = "addr"
const FlagVarLogLevel FlagVar = "log-level"
const FlagVarMCPHeartbeatInterval FlagVar = "mcp-heartbeat-interval"
const FlagVarMCPServerEndpointPath FlagVar = "mcp-endpoint-path"
const FlagVarOpenAIAPIKey FlagVar = "openai-api-key"
const FlagVarOpenAIBaseURL FlagVar = "openai-base-url"
const FlagVarOpenAIMaxTokens FlagVar = "openai-max-tokens"
const FlagVarOpenAIModel FlagVar = "openai-model"
const FlagVarPermissionsConfig FlagVar = "permissions-config"
const FlagVarTheHiveAPIKey FlagVar = "thehive-api-key"
const FlagVarTheHiveOrganisation FlagVar = "thehive-organisation"
const FlagVarTheHivePassword FlagVar = "thehive-password"
const FlagVarTheHiveURL FlagVar = "thehive-url"
const FlagVarTheHiveUsername FlagVar = "thehive-username"
const FlagVarTransportType FlagVar = "transport"
type HeaderKey ¶
type HeaderKey string
const HeaderKeyOpenAIAPIKey HeaderKey = "X-OpenAI-Api-Key"
const HeaderKeyOpenAIBaseURL HeaderKey = "X-OpenAI-Base-Url"
const HeaderKeyOpenAIMaxTokens HeaderKey = "X-OpenAI-Max-Tokens"
const HeaderKeyOpenAIModelName HeaderKey = "X-OpenAI-Model-Name"
const HeaderKeyTheHiveAPIKey HeaderKey = "X-TheHive-Api-Key"
const HeaderKeyTheHiveOrganisation HeaderKey = "X-TheHive-Org"
const HeaderKeyTheHiveURL HeaderKey = "X-TheHive-Url"
type OutputEntity ¶ added in v0.3.1
type OutputEntity interface {
thehive.OutputAlert |
thehive.OutputCase |
thehive.OutputTask |
thehive.OutputObservable |
map[string]interface{}
}
OutputEntity is a union type representing possible output entities
type PermissionConfig ¶
type PermissionConfig string
const PermissionConfigAdmin PermissionConfig = "admin"
const PermissionConfigReadOnly PermissionConfig = "read_only"
type TheHiveMcpDefaultOptions ¶
type TheHiveMcpDefaultOptions struct {
// TheHiveURL is the URL of TheHive instance
TheHiveURL string
// TheHiveAPIKey is the API key for TheHive
TheHiveAPIKey string
// TheHiveUsername is the username for TheHive (for basic auth)
TheHiveUsername string
// TheHivePassword is the password for TheHive (for basic auth)
TheHivePassword string
// TheHiveOrganisation is the organisation for TheHive (optional)
TheHiveOrganisation string
// PermissionsConfigPath is the path to the permissions configuration file (optional, defaults to embedded read-only config)
PermissionsConfigPath string
// MCPServerEndpointPath is the endpoint path for the MCP server (default: /mcp)
MCPServerEndpointPath string
// MCPHeartbeatInterval is the heartbeat interval for the MCP server (default: 30s)
MCPHeartbeatInterval string
// TransportType is the transport type for the MCP server (default: http)
TransportType string
// BindAddr is the address to bind the HTTP server to (if using HTTP transport)
BindAddr string
// LogLevel is the logging level for the application
LogLevel string
// OpenAIBaseURL is the base URL for OpenAI API (optional)
OpenAIBaseURL string
// OpenAIAPIKey is the API key for OpenAI
OpenAIAPIKey string
// OpenAIModel is the model to use for OpenAI
OpenAIModel string
// OpenAIMaxTokens is the maximum tokens for OpenAI responses (default: 320000)
OpenAIMaxTokens int
}
func NewTheHiveMcpDefaultOptions ¶
func NewTheHiveMcpDefaultOptions() (*TheHiveMcpDefaultOptions, error)
Click to show internal directories.
Click to hide internal directories.