{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"RsigmaConfigPartial","description":"Top-level layered configuration. All sections optional.","type":"object","properties":{"version":{"description":"Config schema version, reserved for future migrations.","type":["integer","null"],"format":"uint32","minimum":0},"global":{"description":"Settings shared across all commands.","anyOf":[{"$ref":"#/$defs/GlobalPartial"},{"type":"null"}]},"daemon":{"description":"`rsigma engine daemon` settings.","anyOf":[{"$ref":"#/$defs/DaemonPartial"},{"type":"null"}]},"eval":{"description":"`rsigma engine eval` settings.","anyOf":[{"$ref":"#/$defs/EvalPartial"},{"type":"null"}]},"backtest":{"description":"`rsigma rule backtest` settings.","anyOf":[{"$ref":"#/$defs/BacktestPartial"},{"type":"null"}]},"coverage":{"description":"`rsigma rule coverage` settings.","anyOf":[{"$ref":"#/$defs/CoveragePartial"},{"type":"null"}]},"scorecard":{"description":"`rsigma rule scorecard` settings.","anyOf":[{"$ref":"#/$defs/ScorecardPartial"},{"type":"null"}]},"visibility":{"description":"`rsigma rule visibility` settings.","anyOf":[{"$ref":"#/$defs/VisibilityPartial"},{"type":"null"}]},"doc":{"description":"`rsigma rule doc` settings.","anyOf":[{"$ref":"#/$defs/DocPartial"},{"type":"null"}]},"hygiene":{"description":"`rsigma rule hygiene` settings.","anyOf":[{"$ref":"#/$defs/HygienePartial"},{"type":"null"}]},"mcp":{"description":"`rsigma mcp serve` settings.","anyOf":[{"$ref":"#/$defs/McpPartial"},{"type":"null"}]},"rulesets":{"description":"Named rule sets: sources, selectors, dependency policy, overlays, and pipelines.","type":["object","null"],"additionalProperties":{"$ref":"#/$defs/RulesetSpec"}},"convert":{"description":"`rsigma backend build` conversion groups.","anyOf":[{"$ref":"#/$defs/ConvertPartial"},{"type":"null"}]}},"$defs":{"GlobalPartial":{"description":"Cross-command settings.","type":"object","properties":{"log_format":{"description":"Diagnostic log format on stderr: `text` or `json` (maps to `--log-format`).","type":["string","null"]},"color":{"description":"Color policy: `auto`, `always`, `never` (maps to `--color`).","type":["string","null"]},"output_format":{"description":"Default structured output format: `json`, `ndjson`, `table`, `csv`,\n`tsv` (maps to `--output-format`).","type":["string","null"]}}},"DaemonPartial":{"description":"Daemon settings.","type":"object","properties":{"rules":{"description":"Path to a Sigma rule file or directory.","type":["string","null"]},"pipelines":{"description":"Builtin pipeline names or YAML file paths.","type":["array","null"],"items":{"type":"string"}},"rulesets":{"description":"Several named rulesets evaluated side by side.","type":["array","null"],"items":{"$ref":"#/$defs/RulesetEntryPartial"}},"sources":{"description":"External dynamic-source files or directories.","type":["array","null"],"items":{"type":"string"}},"enrichers":{"description":"Post-evaluation enricher config file.","type":["string","null"]},"stix_store":{"description":"Local STIX store root for `type: stix` enrichers (`stix-enrich` feature).","type":["string","null"]},"stix_store_allow_custom":{"description":"Parse custom STIX types when loading `stix_store` (MITRE ATT&CK).","type":"boolean"},"alert_pipeline":{"description":"Alert-pipeline config file (dedup, grouping, silencing, inhibition).","type":["string","null"]},"risk":{"description":"Risk-based alerting config file (annotation + per-entity risk incidents).","type":["string","null"]},"api":{"anyOf":[{"$ref":"#/$defs/ApiPartial"},{"type":"null"}]},"input":{"anyOf":[{"$ref":"#/$defs/InputPartial"},{"type":"null"}]},"output":{"anyOf":[{"$ref":"#/$defs/OutputPartial"},{"type":"null"}]},"correlation":{"anyOf":[{"$ref":"#/$defs/CorrelationPartial"},{"type":"null"}]},"state":{"anyOf":[{"$ref":"#/$defs/StatePartial"},{"type":"null"}]},"engine":{"anyOf":[{"$ref":"#/$defs/EnginePartial"},{"type":"null"}]},"nats":{"description":"Non-secret NATS knobs. Ignored unless built with `daemon-nats`.","anyOf":[{"$ref":"#/$defs/NatsPartial"},{"type":"null"}]},"tap":{"description":"Live event-tap limits (`GET /api/v1/tap`).","anyOf":[{"$ref":"#/$defs/TapPartial"},{"type":"null"}]},"tail":{"description":"Live detection-tail limits (`GET /api/v1/detections/stream`).","anyOf":[{"$ref":"#/$defs/TailPartial"},{"type":"null"}]},"dispositions":{"description":"Triage feedback loop (analyst dispositions + per-rule false-positive ratio).","anyOf":[{"$ref":"#/$defs/DispositionsPartial"},{"type":"null"}]},"capture":{"description":"Verdict-driven evidence capture. Startup-only; changing it requires a restart.","anyOf":[{"$ref":"#/$defs/CapturePartial"},{"type":"null"}]},"schema":{"description":"Schema classification and routing settings.","anyOf":[{"$ref":"#/$defs/SchemaPartial"},{"type":"null"}]},"logsource_routing":{"description":"Logsource-aware evaluation (conflict-based pruning) settings.","anyOf":[{"$ref":"#/$defs/LogsourcePartial"},{"type":"null"}]},"tenancy":{"description":"Logical multi-tenancy settings.","anyOf":[{"$ref":"#/$defs/TenancyPartial"},{"type":"null"}]},"runtime":{"description":"Thread pool sizing.","anyOf":[{"$ref":"#/$defs/RuntimePartial"},{"type":"null"}]}}},"RulesetEntryPartial":{"description":"One entry in a multi-ruleset list: a bare name or a schema-bound name.","anyOf":[{"description":"A bare ruleset name.","type":"string"},{"description":"A ruleset name with an optional schema binding.","type":"object","properties":{"name":{"description":"Ruleset name.","type":"string"},"when":{"description":"Schemas that admit an event to this ruleset.","anyOf":[{"$ref":"#/$defs/WhenPartial"},{"type":"null"}]},"tenants":{"description":"Tenants that admit an event to this ruleset.","type":["array","null"],"items":{"type":"string"}}},"required":["name"],"additionalProperties":true}]},"WhenPartial":{"description":"A ruleset's schema binding.","type":"object","properties":{"schemas":{"description":"Schema names that admit an event to this ruleset.","type":"array","items":{"type":"string"}}},"additionalProperties":true},"ApiPartial":{"description":"API listener settings.","type":"object","properties":{"addr":{"description":"Bind address for health, metrics, and the HTTP/OTLP API: a TCP\n`host:port`, or on Unix `unix:///path/to.sock` (TLS is rejected on a\nunix:// address).","type":["string","null"]},"tls":{"description":"TLS settings. Ignored unless built with `daemon-tls`, except\n`allow_plaintext`, which applies to every build.","anyOf":[{"$ref":"#/$defs/TlsPartial"},{"type":"null"}]},"auth":{"description":"Bearer-token authentication with `resource:action` permissions.\nAbsent = no authentication, which a non-loopback TCP address refuses\nunless `allow_unauthenticated` is set.","anyOf":[{"$ref":"#/$defs/AuthPartial"},{"type":"null"}]},"allow_unauthenticated":{"description":"Serve the API without authentication on a non-loopback TCP address\n(no `auth` block, no `--api-token-env`, no TLS client CA). Default:\nfalse, so such a daemon refuses to start.","type":["boolean","null"]},"audit":{"description":"Control-plane API audit trail (requires `--state-db`). Auto-enabled\nwhen a state database is configured; tune retention or disable here.","anyOf":[{"$ref":"#/$defs/AuditPartial"},{"type":"null"}]}}},"TlsPartial":{"description":"Server-side TLS settings (no key password; that stays env-only).","type":"object","properties":{"cert":{"type":["string","null"]},"key":{"type":["string","null"]},"client_ca":{"type":["string","null"]},"min_version":{"type":["string","null"]},"allow_plaintext":{"description":"Serve plaintext on a non-loopback TCP address. Applies to every build,\nwith or without `daemon-tls`. Default: false.","type":["boolean","null"]}}},"AuthPartial":{"description":"Bearer-token authentication for the daemon API. Token secrets never live\nin YAML: each token names an environment variable resolved at startup.","type":"object","properties":{"anonymous_permissions":{"description":"Permissions granted to requests with no `Authorization` header\n(e.g. `[\"metrics:read\"]` keeps Prometheus scraping token-free, or\n`[\"*:read\"]` protects only mutating endpoints). Default: none.\n`GET /healthz` and `GET /readyz` are always open.","type":["array","null"],"items":{"type":"string"}},"roles":{"description":"Operator-defined roles: role name to `resource:action` permission\nlist (`*` wildcards allowed, e.g. `\"*:read\"`, `\"silences:*\"`).\nMerged over the built-in roles (reader, operator, ingest, admin),\nwhich cannot be redefined.","type":["object","null"],"additionalProperties":{"type":"array","items":{"type":"string"}}},"tokens":{"description":"The accepted bearer tokens.","type":["array","null"],"items":{"$ref":"#/$defs/AuthTokenPartial"}}}},"AuthTokenPartial":{"description":"One bearer token: a name (for logs and metrics), exactly one of `role` /\n`permissions`, and the environment variable holding the secret.","type":"object","properties":{"name":{"description":"Token name, used in audit logs; never the secret.","type":["string","null"]},"role":{"description":"A built-in (reader, operator, ingest, admin) or operator-defined role.","type":["string","null"]},"permissions":{"description":"Inline permission list, as an alternative to `role`.","type":["array","null"],"items":{"type":"string"}},"token_env":{"description":"Environment variable holding the token secret. Required; the daemon\nrefuses to start when it is unset or empty.","type":["string","null"]},"tenant":{"description":"Tenant this token is bound to.","type":["string","null"]},"all_tenants":{"description":"Token may see every tenant. Never implied by a role.","type":["boolean","null"]}}},"AuditPartial":{"description":"Control-plane API audit trail settings (`daemon.api.audit`). Requires\n`--state-db`; auto-enabled when a state database is configured.","type":"object","properties":{"enabled":{"description":"Explicit enable/disable. Default: enabled when `--state-db` is set.","type":["boolean","null"]},"max_entries":{"description":"Maximum rows retained after pruning (newest kept). Default: 10000.","type":["integer","null"],"format":"uint64","minimum":0},"max_age":{"description":"Maximum age of retained rows (e.g. `720h`, `30d`). Default: 720h.","type":["string","null"]},"max_body_bytes":{"description":"Maximum request body bytes buffered for SHA-256 digest. Default: 65536.","type":["integer","null"],"format":"uint64","minimum":0},"sink":{"description":"Optional sink spec for audit JSON lines (`on_full=drop` appended when\nabsent). The SQLite table is always written when audit is enabled.","type":["string","null"]}}},"InputPartial":{"description":"Event input settings.","type":"object","properties":{"source":{"description":"Event source: `stdin`, `http`, `nats://host:port/subject`, or on Unix\n`unix:///path/to.sock` (newline-delimited events over a Unix socket).","type":["string","null"]},"stdin_mode":{"description":"How a stdin source ends: `batch` exits at end of input with the batch\nresult, `stream` keeps running until a shutdown signal.","type":["string","null"]},"format":{"description":"Log format: `auto`, `json`, `syslog`, `plain`, `logfmt`, `cef`.","type":["string","null"]},"syslog_tz":{"description":"Default timezone offset for RFC 3164 syslog.","type":["string","null"]},"syslog_strip_bom":{"description":"Strip a leading UTF-8 BOM from RFC 5424 syslog messages (default true).","type":["boolean","null"]},"buffer_size":{"type":["integer","null"],"format":"uint","minimum":0},"batch_size":{"type":["integer","null"],"format":"uint","minimum":0},"jq":{"description":"jq filter to extract the event payload.","type":["string","null"]},"jsonpath":{"description":"JSONPath query to extract the event payload.","type":["string","null"]},"tenant":{"description":"Tenant to bind to the single selected pull source.","type":["string","null"]},"nats_tenants":{"description":"One NATS subscription per tenant.","type":["array","null"],"items":{"$ref":"#/$defs/NatsTenantPartial"}}}},"NatsTenantPartial":{"description":"One tenant-bound NATS subscription.","type":"object","properties":{"subject":{"description":"Exact subject this subscription consumes.","type":["string","null"]},"tenant":{"description":"Tenant that owns every message from this subscription.","type":["string","null"]},"credentials_file":{"description":"Optional NATS credentials file for this subscription.","type":["string","null"]}}},"OutputPartial":{"description":"Detection output settings.","type":"object","properties":{"sinks":{"description":"Detection sinks: `stdout`, `file://path`, `nats://host:port/subject`,\n`otlp(s)://host:port` (gRPC), `otlphttp(s)://host:port` (HTTP); the `s`\nvariants use TLS. On Unix, `unix:///path/to.sock` writes NDJSON to a\nlocal socket. Optional query suffixes: `?on_full=drop`,\n`?format=ndjson|ocsf` (line sinks only: stdout, file, NATS, unix),\n`?compression=gzip` and `?timeout=<duration>` (OTLP, default `10s`), and\nfor TLS `?ca=`, `?client_cert=`, `?client_key=`, `?tls_domain=`.","type":["array","null"],"items":{"type":"string"}},"dlq":{"description":"Dead-letter queue for events that fail processing.","type":["string","null"]},"drain_timeout":{"type":["integer","null"],"format":"uint64","minimum":0},"include_event":{"type":["boolean","null"]},"pretty":{"type":["boolean","null"]},"retry_max":{"description":"Max delivery retries per sink before a result is routed to the DLQ.","type":["integer","null"],"format":"uint32","minimum":0},"backoff_base_ms":{"description":"Base backoff in milliseconds for the first sink delivery retry.","type":["integer","null"],"format":"uint64","minimum":0},"backoff_max_ms":{"description":"Backoff ceiling in milliseconds for sink delivery retries.","type":["integer","null"],"format":"uint64","minimum":0},"batch_max":{"description":"Max results drained into one sink delivery batch.","type":["integer","null"],"format":"uint","minimum":0},"batch_flush_ms":{"description":"Time in milliseconds a partial sink batch waits for more results before\nit is delivered. 0 delivers at once.","type":["integer","null"],"format":"uint64","minimum":0},"webhooks":{"description":"Webhook config files or directories declaring template-driven HTTP\nsinks (`--webhook`). Each path is loaded and validated at startup.","type":["array","null"],"items":{"type":"string"}}}},"CorrelationPartial":{"description":"Correlation settings.","type":"object","properties":{"suppress":{"description":"Suppression window for correlation alerts (e.g. `5m`, `1h`).","type":["string","null"]},"action":{"description":"Action after a correlation fires: `alert` or `reset`.","type":["string","null"]},"event_mode":{"description":"Correlation event inclusion: `none`, `full`, `refs`.","type":["string","null"]},"max_events":{"type":["integer","null"],"format":"uint","minimum":0},"max_state_entries":{"description":"Hard cap on `(correlation, group-key)` state entries before\nstalest-first eviction (default 100,000).","type":["integer","null"],"format":"uint","minimum":0},"max_group_entries":{"description":"Cap on retained entries within a single group's window state.\nUnset means unbounded (the historical behavior).","type":["integer","null"],"format":"uint","minimum":0},"timestamp_fields":{"description":"Extra event field names for timestamp extraction.","type":["array","null"],"items":{"type":"string"}},"timestamp_fallback":{"description":"Behavior when no timestamp is found: `wallclock` or `skip`.","type":["string","null"]},"emit_detections":{"description":"Emit output for rules referenced by correlations, including\ncorrelations that feed another correlation.","type":["boolean","null"]},"no_detections":{"description":"Deprecated inverse of `emit_detections`.","type":["boolean","null"]}}},"StatePartial":{"description":"Correlation state persistence settings.","type":"object","properties":{"db":{"description":"SQLite database for persisting correlation state.","type":["string","null"]},"save_interval":{"type":["integer","null"],"format":"uint64","minimum":0}}},"EnginePartial":{"description":"Matching-engine tuning settings.","type":"object","properties":{"bloom_prefilter":{"type":["boolean","null"]},"bloom_max_bytes":{"type":["integer","null"],"format":"uint","minimum":0},"observe_fields":{"type":["boolean","null"]},"observe_fields_max_keys":{"type":["integer","null"],"format":"uint","minimum":0},"allow_remote_include":{"type":["boolean","null"]},"strict_rules":{"description":"Refuse to load a rule set in which any rule fails to parse. Default:\nfalse, so rules that fail to parse are skipped and only a load in\nwhich every rule fails is refused.","type":["boolean","null"]},"cross_rule_ac":{"description":"Cross-rule Aho-Corasick pre-filter. Ignored unless built with `daachorse-index`.","type":["boolean","null"]},"match_detail":{"description":"Match-detail verbosity for detection output: `off` (default),\n`summary`, or `full`. Controls how much per-field match information\nis attached to detection results.","type":["string","null"]},"egress_policy":{"description":"HTTP egress policy applied to dynamic-source and enrichment HTTP clients:\n`default` (block link-local + cloud metadata), `strict` (also block\nloopback + RFC1918 private), or `permissive` (allow everything).","type":["string","null"]}}},"NatsPartial":{"description":"Non-secret NATS knobs. Secrets stay env-only.","type":"object","properties":{"consumer_group":{"description":"Shared durable consumer name for load balancing.","type":["string","null"]}}},"TapPartial":{"description":"Live event-tap limits. The only flag is `--enable-tap`; the tuning keys\nare config-file-only to keep the daemon flag surface minimal.","type":"object","properties":{"enabled":{"description":"Whether the `GET /api/v1/tap` endpoint accepts sessions (default\nfalse; the tap is opt-in because it exfiltrates raw events). Enabled\nby this key or the `--enable-tap` flag.","type":["boolean","null"]},"buffer_events":{"description":"Per-session bounded channel capacity. A full channel drops events\n(counted) rather than applying backpressure to the engine.","type":["integer","null"],"format":"uint","minimum":0},"max_sessions":{"description":"Maximum number of concurrent capture sessions (a new session over the\ncap is rejected with `409`).","type":["integer","null"],"format":"uint","minimum":0},"max_duration":{"description":"Largest capture window (humantime, e.g. `5m`); a longer `duration`\nquery param is rejected with `400`.","type":["string","null"]}}},"TailPartial":{"description":"Live detection-tail limits. The only flag is `--enable-tail`; the tuning\nkeys are config-file-only.","type":"object","properties":{"enabled":{"description":"Whether the `GET /api/v1/detections/stream` endpoint accepts sessions\n(default false; opt-in like the event tap). Enabled by this key or the\n`--enable-tail` flag.","type":["boolean","null"]},"buffer_events":{"description":"Per-session bounded channel capacity. A full channel drops detections\n(counted) rather than applying backpressure to the sink task.","type":["integer","null"],"format":"uint","minimum":0},"max_sessions":{"description":"Maximum number of concurrent tail sessions (a new session over the cap\nis rejected with `409`).","type":["integer","null"],"format":"uint","minimum":0}}},"DispositionsPartial":{"description":"Triage feedback loop settings (`daemon.dispositions.*`). Opt-in: the\ndisposition endpoints and the per-rule false-positive ratio are off until\nenabled by this key or the `--enable-dispositions` flag.","type":"object","properties":{"enabled":{"description":"Whether `POST`/`GET /api/v1/dispositions` accept requests and the\nper-rule false-positive ratio is computed. Default false.","type":["boolean","null"]},"source":{"description":"Optional pull source for dispositions (a file, HTTP, or NATS `--source`\nstyle spec). When unset, dispositions arrive only over the endpoint.","type":["string","null"]},"window":{"description":"Rolling window over which dispositions are counted (humantime, e.g. `30d`).","type":["string","null"]},"numerator":{"description":"Whether benign true positives count toward the ratio numerator:\n`fp_only` (default) or `fp_and_btp`.","type":["string","null"]},"min_sample":{"description":"Minimum dispositions a rule needs in the window before its ratio is\npublished (so a single false positive cannot publish a misleading 100%).","type":["integer","null"],"format":"uint64","minimum":0}}},"CapturePartial":{"description":"Verdict-driven evidence capture (`daemon.capture.*`).","type":"object","properties":{"enabled":{"description":"Retain admitted detection events for later spooling. Default false.","type":["boolean","null"]},"spool_dir":{"description":"Directory that receives completed disposition bundles. Required when enabled.","type":["string","null"]},"max_captured_incidents":{"description":"Maximum simultaneously-retained incidents.","type":["integer","null"],"format":"uint","minimum":0},"max_events_per_incident":{"description":"Maximum events retained per incident.","type":["integer","null"],"format":"uint","minimum":0},"max_event_bytes":{"description":"Maximum encoded JSON size of one event, in bytes.","type":["integer","null"],"format":"uint","minimum":0},"max_bytes_per_incident":{"description":"Maximum encoded JSON bytes retained for one incident.","type":["integer","null"],"format":"uint","minimum":0},"max_capture_bytes":{"description":"Maximum encoded JSON bytes retained across the ring.","type":["integer","null"],"format":"uint","minimum":0},"ttl":{"description":"Idle lifetime after last admission (humantime, e.g. `24h`).","type":["string","null"]},"max_spool_bytes":{"description":"Maximum bytes of completed bundles kept under `spool_dir`.","type":["integer","null"],"format":"uint64","minimum":0},"spool_queue_capacity":{"description":"Bounded queue of pending spool jobs.","type":["integer","null"],"format":"uint","minimum":0}}},"SchemaPartial":{"description":"Schema classification and routing settings (shared by `daemon` and `eval`).","type":"object","properties":{"observe":{"description":"Enable the schema observer (daemon `--observe-schemas`). Ignored by eval.","type":["boolean","null"]},"discover":{"description":"Enable schema signature discovery sampling (daemon `--discover-schemas`;\nimplies `observe`). Ignored by eval.","type":["boolean","null"]},"routing":{"description":"Enable schema routing (`--schema-routing`).","type":["boolean","null"]},"partition_rules":{"description":"Enable gated per-schema rule partitioning (`--schema-partition-rules`).","type":["boolean","null"]},"config":{"description":"Path to the schema config file with signatures and routing bindings\n(`--schema-config`).","type":["string","null"]},"on_unknown":{"description":"Unknown-schema policy: `warn`, `drop`, `passthrough`, or `error`\n(`--on-unknown`).","type":["string","null"]}}},"LogsourcePartial":{"description":"Logsource-aware evaluation settings (shared by `daemon` and `eval`).","type":"object","properties":{"enabled":{"description":"Enable conflict-based logsource pruning (`--logsource-routing`).","type":["boolean","null"]},"field_map":{"description":"Event field names each logsource dimension is read from\n(`--logsource-field-map`). Defaults to `product`/`service`/`category`.","anyOf":[{"$ref":"#/$defs/LogsourceDimensionsPartial"},{"type":"null"}]},"event_logsource":{"description":"Static event logsource applied when the field is absent\n(`--event-logsource`), for a single-source pipeline.","anyOf":[{"$ref":"#/$defs/LogsourceDimensionsPartial"},{"type":"null"}]},"strict":{"description":"Reserved for a future strict subset-routing mode. Currently ignored.","type":["boolean","null"]}}},"LogsourceDimensionsPartial":{"description":"A `{ product, service, category }` triple plus optional `custom` dimensions,\nused for both the logsource field-name map and the static event-logsource\noverride. Custom entries map a dimension name to an event field name (in\n`field_map`) or to a literal value (in `event_logsource`).","type":"object","properties":{"product":{"type":["string","null"]},"service":{"type":["string","null"]},"category":{"type":["string","null"]},"custom":{"type":["object","null"],"additionalProperties":{"type":"string"}}}},"TenancyPartial":{"description":"Logical multi-tenancy settings.","type":"object","properties":{"enabled":{"description":"Enable tenant isolation. Startup-only.","type":["boolean","null"]},"quotas":{"description":"Per-tenant state caps.","anyOf":[{"$ref":"#/$defs/TenantQuotasPartial"},{"type":"null"}]},"metrics_tenant_allowlist":{"description":"Tenants whose match counts get their own metric label. Others count\nunder `other`.","type":["array","null"],"items":{"type":"string"}}}},"TenantQuotasPartial":{"description":"Per-tenant state caps.","type":"object","properties":{"correlation_state":{"type":["integer","null"],"format":"uint","minimum":0},"active_alerts":{"type":["integer","null"],"format":"uint","minimum":0},"incidents":{"type":["integer","null"],"format":"uint","minimum":0},"risk_entities":{"type":["integer","null"],"format":"uint","minimum":0},"silences":{"type":["integer","null"],"format":"uint","minimum":0},"inhibition_sources":{"type":["integer","null"],"format":"uint","minimum":0},"stream_sessions":{"type":["integer","null"],"format":"uint","minimum":0}}},"RuntimePartial":{"description":"Daemon thread pool sizing.","type":"object","properties":{"worker_threads":{"description":"Tokio worker threads. Unset uses Tokio's default.","type":["integer","null"],"format":"uint","minimum":0},"detect_threads":{"description":"Rayon threads for parallel parsing and detection. Unset honors\n`RAYON_NUM_THREADS`, then Rayon's default.","type":["integer","null"],"format":"uint","minimum":0},"detect_inflight":{"description":"Detection batches evaluated concurrently (1 to 8). Unset honors\n`RSIGMA_DETECT_INFLIGHT`, then scales with the detection threads.","type":["integer","null"],"format":"uint","minimum":0}}},"EvalPartial":{"description":"`eval` settings.","type":"object","properties":{"rules":{"description":"Default rules path for `rsigma engine eval`.","type":["string","null"]},"pipelines":{"type":["array","null"],"items":{"type":"string"}},"input_format":{"type":["string","null"]},"syslog_tz":{"type":["string","null"]},"syslog_strip_bom":{"description":"Strip a leading UTF-8 BOM from RFC 5424 syslog messages (default true).","type":["boolean","null"]},"output":{"description":"Write detection and correlation results to this file instead of stdout\n(`--output`).","type":["string","null"]},"fail_on_detection":{"type":["boolean","null"]},"finding_format":{"description":"Finding wire shape: `native` or `ocsf` (`--finding-format`).","type":["string","null"]},"ocsf_version":{"description":"OCSF schema version when `finding_format` is `ocsf` (`--ocsf-version`).","type":["string","null"]},"schema":{"description":"Schema classification and routing settings.","anyOf":[{"$ref":"#/$defs/SchemaPartial"},{"type":"null"}]},"logsource_routing":{"description":"Logsource-aware evaluation (conflict-based pruning) settings.","anyOf":[{"$ref":"#/$defs/LogsourcePartial"},{"type":"null"}]},"ruleset":{"description":"Named ruleset to evaluate instead of `rules` (`--ruleset`).","type":["string","null"]},"rulesets":{"description":"Several named rulesets evaluated side by side (`--ruleset` repeated).","type":["array","null"],"items":{"$ref":"#/$defs/RulesetEntryPartial"}}}},"BacktestPartial":{"description":"`rsigma rule backtest` settings.","type":"object","properties":{"rules":{"description":"Default rules path for `rsigma rule backtest`.","type":["string","null"]},"corpus":{"description":"Event corpus file(s) or directory(ies), walked recursively.","type":["array","null"],"items":{"type":"string"}},"expectations":{"description":"Expectations YAML file.","type":["string","null"]},"unexpected":{"description":"Policy for unexpected fires: `fail`, `warn`, or `ignore`.","type":["string","null"]},"pipelines":{"description":"Builtin pipeline names or YAML file paths.","type":["array","null"],"items":{"type":"string"}},"input_format":{"description":"Input log format for non-NDJSON corpus files.","type":["string","null"]},"syslog_tz":{"description":"Default timezone offset for RFC 3164 syslog.","type":["string","null"]},"syslog_strip_bom":{"description":"Strip a leading UTF-8 BOM from RFC 5424 syslog messages (default true).","type":["boolean","null"]},"ruleset":{"description":"Named ruleset to backtest instead of `rules` (`--ruleset`).","type":["string","null"]},"findings":{"description":"Path for one finding per fire (`--findings`).","type":["string","null"]},"finding_format":{"description":"Finding wire shape: `native` or `ocsf` (`--finding-format`).","type":["string","null"]},"ocsf_version":{"description":"OCSF schema version when `finding_format` is `ocsf` (`--ocsf-version`).","type":["string","null"]}}},"CoveragePartial":{"description":"`rsigma rule coverage` settings.","type":"object","properties":{"rules":{"description":"Sigma rule file(s) or directory(ies) to map onto ATT&CK.","type":["array","null"],"items":{"type":"string"}},"atomics":{"description":"Atomic Red Team index path/URL, or an `atomics/` directory.","type":["string","null"]},"baseline":{"description":"Baseline ATT&CK Navigator layer path/URL (e.g. the SigmaHQ heatmap).","type":["string","null"]},"targets":{"description":"Target technique list file (one technique ID per line).","type":["string","null"]},"fail_on_gaps":{"description":"Exit non-zero when a requested cross-reference reports uncovered\ntechniques.","type":["boolean","null"]},"ruleset":{"description":"Named ruleset to map instead of `rules` (`--ruleset`).","type":["string","null"]}}},"ScorecardPartial":{"description":"`rsigma rule scorecard` settings. The verdict thresholds carry compiled\ndefaults; the inputs (including the two required JSON reports) and the report\npath are opt-in.","type":"object","properties":{"backtest":{"description":"The backtest JSON report (from `rule backtest --report`).","type":["string","null"]},"coverage":{"description":"The coverage JSON report (from `rule coverage --output-format json`).","type":["string","null"]},"metrics":{"description":"Prometheus exposition snapshot path or `/metrics` URL for production volume.","type":["string","null"]},"metrics_window":{"description":"Prometheus query-API range window (e.g. 7d) for last-fired and fire-rate.","type":["string","null"]},"triage":{"description":"Triage disposition feed file for the live false-positive ratio and latency.","type":["string","null"]},"report":{"description":"Program-artifact output path (`.md`/`.html`).","type":["string","null"]},"fail_on":{"description":"CI policy: `none`, `tune`, or `retire`.","type":["string","null"]},"min_precision":{"description":"Keep floor: precision proxy at or above this keeps the rule.","type":["number","null"],"format":"double"},"tune_max_precision":{"description":"Upper edge of the review band (used in the tune reason).","type":["number","null"],"format":"double"},"retire_max_precision":{"description":"Retire floor: precision proxy below this retires the rule.","type":["number","null"],"format":"double"},"min_volume":{"description":"Minimum total volume for a keep verdict.","type":["integer","null"],"format":"uint64","minimum":0},"stale_window":{"description":"Staleness window in days for the keep gate.","type":["integer","null"],"format":"uint64","minimum":0},"max_fp_ratio":{"description":"Live false-positive-ratio ceiling.","type":["number","null"],"format":"double"}}},"VisibilityPartial":{"description":"`rsigma rule visibility` settings. `rules` and `observed` are intentionally\nabsent: they are invocation-specific CLI arguments, not project defaults.","type":"object","properties":{"mapping":{"description":"Logsource/field to ATT&CK data-source mapping table path or URL. Unset\nuses the bundled default table.","type":["string","null"]},"fail_on_blind_spots":{"description":"Exit non-zero when a rule-expected data source has no observed\ntelemetry (every mapped field sits in the broken-coverage `missing` set).","type":["boolean","null"]}}},"DocPartial":{"description":"`rsigma rule doc` settings. The ADS bar itself (enforced statuses and\nrequired sections) lives in `.rsigma-lint.yml`, not here; this section only\ncarries the command's own defaults.","type":"object","properties":{"fail_on_missing":{"description":"Exit non-zero when any rule falls below the configured ADS bar (maps to\n`--fail-on-missing`).","type":["boolean","null"]}}},"HygienePartial":{"description":"`rsigma rule hygiene` settings. The silence and staleness thresholds carry\ncompiled defaults; the inputs and the `--fail-on` policy are opt-in.","type":"object","properties":{"rules":{"description":"Sigma rule file(s) or directory(ies) to report on.","type":["array","null"],"items":{"type":"string"}},"metrics":{"description":"Prometheus exposition snapshot path or `/metrics` URL for fire volume.","type":["string","null"]},"metrics_window":{"description":"Prometheus query-API range window (e.g. 7d) for a true last-fired.","type":["string","null"]},"fields":{"description":"A #55 field-observability JSON snapshot for the broken-coverage signal.","type":["string","null"]},"silent_threshold":{"description":"Age past which a never-fired rule is a retirement candidate (e.g. 365d).","type":["string","null"]},"stale_threshold":{"description":"Modified-date age past which a rule is flagged stale (e.g. 365d).","type":["string","null"]},"noisy_threshold":{"description":"Absolute per-window fire ceiling that overrides the robust outlier test.","type":["integer","null"],"format":"uint64","minimum":0},"fail_on":{"description":"CI policy: which findings fail (silent, noisy, untagged, no-owner,\nincomplete-ads, broken-fields, deprecated, any).","type":["array","null"],"items":{"type":"string"}},"ruleset":{"description":"Named ruleset to report on instead of `rules` (`--ruleset`).","type":["string","null"]}}},"McpPartial":{"description":"`mcp serve` settings. The MCP HTTP auth token and the daemon token are\ndeliberately absent: secrets stay flag/env-only (`--auth-token` /\n`RSIGMA_MCP_AUTH_TOKEN`, `--daemon-token` / `RSIGMA_MCP_DAEMON_TOKEN`).","type":"object","properties":{"http_addr":{"description":"Bind address for the Streamable HTTP transport (maps to `--http`).\nUnset means stdio.","type":["string","null"]},"lint_config":{"description":"Lint config file applied by the `lint_rules` tool (maps to `--lint-config`).","type":["string","null"]},"rules_dir":{"description":"Default root for relative path-based tool calls (maps to `--rules-dir`).","type":["string","null"]},"allow_unconfined_paths":{"description":"Run without `rules_dir`, leaving tool path arguments unconfined (maps\nto `--allow-unconfined-paths`). Required for the HTTP transport without\na root. Defaults to off.","type":["boolean","null"]},"allow_sigma_cli":{"description":"Allow the `convert_rules` tool to delegate targets without a native\nbackend to an installed sigma-cli (maps to `--allow-sigma-cli`).\nDefaults to off.","type":["boolean","null"]},"daemon_url":{"description":"Base URL of a running daemon (maps to `--daemon-url`). Unset means the\noperate-cycle tools stay unregistered.","type":["string","null"]},"daemon_ca":{"description":"Extra root CA PEM path for a self-signed daemon TLS listener (maps to\n`--daemon-ca`).","type":["string","null"]},"allow_operate_writes":{"description":"Register the mutating operate tools (maps to `--allow-operate-writes`).\nDefaults to off. The daemon token is deliberately absent: secrets stay\nflag/env-only (`--daemon-token` / `RSIGMA_MCP_DAEMON_TOKEN`).","type":["boolean","null"]}}},"RulesetSpec":{"description":"A named rule set: sources, selectors, dependency policy, overlays, and\npipelines.","type":"object","properties":{"description":{"description":"Free-form description shown by `ruleset list`.","type":["string","null"]},"sources":{"description":"Rule files or directories, processed in declaration order.","type":"array","items":{"type":"string"}},"include":{"description":"Selectors that admit candidates. An empty list admits everything.","type":"array","items":{"$ref":"#/$defs/RuleSelector"}},"exclude":{"description":"Selectors that reject candidates. Exclusion always wins.","type":"array","items":{"$ref":"#/$defs/RuleSelector"}},"dependencies":{"description":"Policy for unresolved correlation references: `error`, `include`, or\n`drop`.","type":["string","null"]},"overlays":{"description":"Metadata overlays, inline or loaded from files.","type":"array","items":{"$ref":"#/$defs/OverlayEntry"}},"stale_overlays":{"description":"Policy for overlays that match no kept rule: `error` or `warn`.","type":["string","null"]},"pipelines":{"description":"Builtin pipeline names or YAML file paths.","type":"array","items":{"type":"string"}},"output":{"description":"Default output directory for `ruleset build`.","type":["string","null"]}},"required":["sources"],"additionalProperties":true},"RuleSelector":{"description":"A metadata selector. Every key that is set must match; values within a key\nare alternatives.","type":"object","properties":{"id":{"description":"Rule ids, case-insensitive.","type":"array","items":{"type":"string"}},"name":{"description":"Rule `name` values, exact.","type":"array","items":{"type":"string"}},"title":{"description":"Title globs, case-insensitive.","type":"array","items":{"type":"string"}},"tags":{"description":"Tag globs, case-insensitive; a document matches when any tag does.","type":"array","items":{"type":"string"}},"level":{"description":"Levels, in their exact lowercase Sigma spelling.","type":"array","items":{"type":"string"}},"status":{"description":"Statuses, in their exact lowercase Sigma spelling.","type":"array","items":{"type":"string"}},"kind":{"description":"Document kinds: `detection`, `correlation`, or `filter`.","type":"array","items":{"type":"string"}},"path":{"description":"Globs over the file path relative to its source root; `*` does not\ncross `/`.","type":"array","items":{"type":"string"}},"logsource":{"description":"Logsource fields; a correlation matches through the rules it references.","anyOf":[{"$ref":"#/$defs/LogsourceSelector"},{"type":"null"}]}},"additionalProperties":true},"LogsourceSelector":{"description":"A logsource selector with exact, case-insensitive values.","type":"object","properties":{"product":{"description":"Logsource products.","type":"array","items":{"type":"string"}},"category":{"description":"Logsource categories.","type":"array","items":{"type":"string"}},"service":{"description":"Logsource services.","type":"array","items":{"type":"string"}}},"additionalProperties":true},"OverlayEntry":{"description":"One overlay entry: either inline patches for an id, or a file or directory\nof overlay files.","type":"object","properties":{"id":{"description":"Id or name of the document an inline entry patches.","type":["string","null"]},"file":{"description":"Overlay file holding a list of inline entries.","type":["string","null"]},"dir":{"description":"Directory of overlay files, applied in sorted order.","type":["string","null"]},"set":{"description":"Keys to replace.","anyOf":[{"$ref":"#/$defs/OverlayPatch"},{"type":"null"}]},"append":{"description":"Lists to extend.","anyOf":[{"$ref":"#/$defs/OverlayPatch"},{"type":"null"}]}},"additionalProperties":true},"OverlayPatch":{"description":"Metadata keys an overlay may set or append.","type":"object","properties":{"level":{"description":"Replacement level.","type":["string","null"]},"status":{"description":"Replacement status.","type":["string","null"]},"description":{"description":"Replacement description.","type":["string","null"]},"author":{"description":"Replacement author.","type":["string","null"]},"tags":{"description":"Tags to set or append; appended tags are deduplicated.","type":["array","null"],"items":{"type":"string"}},"references":{"description":"References to set or append.","type":["array","null"],"items":{"type":"string"}},"falsepositives":{"description":"False positives to set or append.","type":["array","null"],"items":{"type":"string"}},"fields":{"description":"Fields to set or append.","type":["array","null"],"items":{"type":"string"}},"custom_attributes":{"description":"Custom attributes merged per key; `null` under `set` removes a key.","type":["object","null"],"additionalProperties":true}},"additionalProperties":true},"ConvertPartial":{"description":"`rsigma backend build` conversion groups.","type":"object","properties":{"defaults":{"description":"Values inherited by every group that does not set them.","anyOf":[{"$ref":"#/$defs/ConvertGroupPartial"},{"type":"null"}]},"groups":{"description":"Named conversion groups, keyed by group name.","type":["object","null"],"additionalProperties":{"$ref":"#/$defs/ConvertGroupPartial"}}}},"ConvertGroupPartial":{"description":"One conversion group: a ruleset plus the target, format, and options used\nto convert it.","type":"object","properties":{"ruleset":{"description":"Named ruleset from the `rulesets` section to convert.","type":["string","null"]},"target":{"description":"Conversion target backend.","type":["string","null"]},"format":{"description":"Backend-specific output format.","type":["string","null"]},"pipelines":{"description":"Conversion pipelines. Never inherited from the ruleset.","type":["array","null"],"items":{"type":"string"}},"options":{"description":"Backend options, the `-O key=value` equivalents.","type":["object","null"],"additionalProperties":{"type":"string"}},"skip_unsupported":{"description":"Skip rules the backend cannot convert instead of failing.","type":["boolean","null"]},"without_pipeline":{"description":"Convert without requiring a pipeline.","type":["boolean","null"]},"output":{"description":"Query output path. The manifest is written next to it.","type":["string","null"]},"metadata":{"description":"Opaque values copied verbatim into the manifest.","type":["object","null"],"additionalProperties":true}}}}}
