In this original commit, the historical rule functionality was removed, and broke the file naming schema which appends rule version to the end of the rule_id (e.g. <rule_id>_<version>.json). This PR re-adds historical rules by default and ensures only the latest historical rules and the latest version are generated for the release package, but ensures they have versions appended. The versions are necessary for kibana's historical rules feature.
Check the /releases/8.16/fleet/8.16.0-beta.1/kibana/security_rule folder and ensure all haves have an <rule_id>_<version>
ls -ltr |grep -v "_"
Make sure rules have <= 2 rules only per build
Checklist
[x] Added a label for the type of pr: bug, enhancement, schema, Rule: New, Rule: Deprecation, Rule: Tuning, Hunt: New, or Hunt: Tuning so guidelines can be generated
[x] Added the meta:rapid-merge label if planning to merge within 24 hours
[ ] Secret and sensitive material has been managed correctly
[ ] Automated testing was updated or added to match the most common scenarios
[ ] Documentation and comments were added for features that require explanation
Additional Context
Now that the DAC Beta branch has been merged, this is the first DR release that runs on this code. Even though the original commit reflects a while ago, it was only recently merged into main. Furthermore, the issue only appeared since the rule files changed as a side effect of the inadvertent code additions. With the latest rules staged on epr, the issue appears since rule file names do not include versions.
Pull Request
Issue link(s): N/A First observed here
Summary - What I changed
In this original commit, the historical rule functionality was removed, and broke the file naming schema which appends rule version to the end of the rule_id (
e.g. <rule_id>_<version>.json
). This PR re-adds historical rules by default and ensures only the latest historical rules and the latest version are generated for the release package, but ensures they have versions appended. The versions are necessary for kibana's historical rules feature.How To Test
/releases/8.16/fleet/8.16.0-beta.1/kibana/security_rule
folder and ensure all haves have an<rule_id>_<version>
Checklist
bug
,enhancement
,schema
,Rule: New
,Rule: Deprecation
,Rule: Tuning
,Hunt: New
, orHunt: Tuning
so guidelines can be generatedmeta:rapid-merge
label if planning to merge within 24 hoursAdditional Context
Now that the DAC Beta branch has been merged, this is the first DR release that runs on this code. Even though the original commit reflects a while ago, it was only recently merged into main. Furthermore, the issue only appeared since the rule files changed as a side effect of the inadvertent code additions. With the latest rules staged on epr, the issue appears since rule file names do not include versions.