Skip to content

[Bug] exclude_export_details export flag also excludes exceptions and exception lists #220920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Vexil-Derivative opened this issue Oct 30, 2024 · 4 comments
Labels
bug Fixes for quality problems that affect the customer experience Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@Vexil-Derivative
Copy link

Describe the Bug

When exporting detection rules via the API, setting exclude_export_details to true will only output the rule objects, excluding the exceptions and exception lists. Setting it to false exports the rules, exceptions, exception lists, and a summary line at the end of the file. The documentation states this flag should only exclude the summary line, so this behavior is unexpected.

To Reproduce

  1. Create at least 1 custom rule and add an exception
  2. Run the following 2 POST requests:
    POST <kibana host>:<port>/api/detection_engine/rules/_export
    POST <kibana host>:<port>/api/detection_engine/rules/_export?exclude_export_details
  3. Compare the two responses, note the second one does not include the exception logic.

Expected Behavior

The exclude_export_details flag should only exclude the final summary line. All rules and exception objects should be output regardless as to how this flag is set.

Screenshots

No response

Desktop - OS

None

Desktop - Version

No response

Additional Context

Tested on 8.15.1, but we also noticed the issue on 8.13 previously.

@Vexil-Derivative Vexil-Derivative added the bug Fixes for quality problems that affect the customer experience label Oct 30, 2024
@eric-forte-elastic
Copy link

👋 This is behavior of https://github.com/elastic/kibana which is the interface for the Elastic Security product where the detection rules from this repo are run. The API interaction that we use is dependent on the behavior from Kibana and as you mention the exclude_export_details flag when false will include rules, exceptions, and exception lists as well as actions and action connectors too. Given this, the detection rules repo needs to match Kibana's functionality and there is little we can do to address your issue in this repo.

@Mikaayenson Mikaayenson added the bug Fixes for quality problems that affect the customer experience label May 19, 2025
@Mikaayenson Mikaayenson transferred this issue from elastic/detection-rules May 19, 2025
@botelastic botelastic bot added the needs-team Issues missing a team label label May 19, 2025
@marshallmain marshallmain added the Team:Detection Rule Management Security Detection Rule Management Team label May 19, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@botelastic botelastic bot removed the needs-team Issues missing a team label label May 19, 2025
@pborgonovi pborgonovi added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label May 29, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@pborgonovi pborgonovi added the Team:Detections and Resp Security Detection Response Team label May 29, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

No branches or pull requests

6 participants