elastic / detection-rules

https://www.elastic.co/guide/en/security/current/detection-engine-overview.html
Other
1.92k stars 492 forks source link

[Bug] [DAC] Fix Kibana action connector export to export details with action connectors #3984

Closed eric-forte-elastic closed 1 month ago

eric-forte-elastic commented 1 month ago

Pull Request

Issue link(s):

Summary - What I changed

This PR addresses a bug when exporting action connectors, the required export details from the Kibana API were not provided. Now the flag appropriately informs the Kibana API call to include the necessary details to parse the action connectors separately from the rules.

How To Test

To test this, run the kibana export-rules command with the -ac flag without the -e flag. In prior tests, the Kibana export details were not provided and the parsing of the connectors would fail. Note you do not need rules with action connectors to test this as the parsing issue occurs with the Kibana response message details which will be provided regardless of whether or not you have exceptions or action connectors, but based on whether or not either of those flags are passed to the RuleResource.export_rules call.

Checklist

Contributor checklist

protectionsmachine commented 1 month ago

Bug - Guidelines

These guidelines serve as a reminder set of considerations when addressing a bug in the code.

Documentation and Context

Code Standards and Practices

Testing

Additional Checks