Open
Description
Describe the Bug
According to the CLI documentation for kibana import-rules command, when setting --rule-file or --rule-id argument, only a single rule should be imported and not everything recursively from the directory.
However, this imports all exceptions and connectors and not only the exception lists and connectors linked to the rule of interest.
So all exception lists and connectors are imported if the env CUSTOM_RULES_DIR
is set (which is necessary to find items the rule depends on).
To Reproduce
In the Screenshare you can see the problem:
Screencast.From.2025-03-27.12-42-41.webm
- The env is set
- The command imports all the exceptions from the custom dir to Kibana though the rule doesn't contain any exceptions or connectors at all.
- Unset the env
- Only the rule is imported
Expected Behavior
Only the exceptions and connectors where the rule depends on should be imported.
Screenshots
No response
Desktop - OS
None
Desktop - Version
No response