Skip to content

Commit

Permalink
Skip Development Rules from Security Docs (#4073)
Browse files Browse the repository at this point in the history
(cherry picked from commit eda179b)
  • Loading branch information
shashank-elastic authored and github-actions[bot] committed Sep 13, 2024
1 parent 32cdb93 commit 0e783eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions detection_rules/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ def generate_summary(self):

rule_entries = []
for rule in self.included_rules:
if rule.contents.metadata.get('maturity') == 'development':
continue
title_name = name_to_title(rule.name)
status = 'new' if rule.id in self.new_rules else 'update' if rule.id in self.updated_rules else 'deprecated'
description = rule.contents.to_api_format()['description']
Expand Down Expand Up @@ -394,6 +396,8 @@ def generate_rule_reference(self):
for rule in self.sorted_rules:
if isinstance(rule, DeprecatedRule):
continue
if rule.contents.metadata.get('maturity') == 'development':
continue
title_name = name_to_title(rule.name)

# skip rules not built for this package
Expand All @@ -419,6 +423,8 @@ def generate_rule_details(self):
"""Generate rule details for each prebuilt rule."""
included_rules = [x.name for x in self.included_rules]
for rule in self.sorted_rules:
if rule.contents.metadata.get('maturity') == 'development':
continue
rule_detail = IntegrationRuleDetail(rule.id, rule.contents.to_api_format(), {}, self.base_name)
rule_path = self.package_directory / f'{self.prebuilt_rule_base}-{name_to_title(rule.name)}.asciidoc'
prebuilt_rule_path = self.rule_details / f'{name_to_title(rule.name)}.asciidoc' # noqa: E501
Expand Down

0 comments on commit 0e783eb

Please sign in to comment.