09a7e2e81b
* Refresh Kibana module with API updates
* add import/export commands
* rename repo commands
* add RawRuleCollection and DictRule objects
* save exported rules to files; rule.from_rule_resource
* strip unknown fields in schema
* add remote cli test
* update docs
* bump kibana lib version
---------
Co-authored-by: brokensound77 <brokensound77@users.noreply.github.com>
(cherry picked from commit c567d3731a)
23 lines
619 B
Bash
Executable File
23 lines
619 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Path to the virtual environment
|
|
VENV_PATH="./env/detection-rules-build"
|
|
|
|
# Activate the virtual environment
|
|
source "$VENV_PATH/bin/activate"
|
|
|
|
echo "Running detection-rules remote CLI tests..."
|
|
|
|
echo "Performing a quick rule alerts search..."
|
|
echo "Requires .detection-rules-cfg.json credentials file set."
|
|
python -m detection_rules kibana search-alerts
|
|
|
|
echo "Performing a rule export..."
|
|
mkdir tmp-export 2>/dev/null
|
|
python -m detection_rules kibana export-rules -d tmp-export --skip-errors
|
|
ls tmp-export
|
|
echo "Removing generated files..."
|
|
rm -rf tmp-export
|
|
|
|
echo "Detection-rules CLI tests completed!"
|