Repository navigation
Description
Problem
The prebuilt detection rules reference (https://www.elastic.co/docs/reference/security/prebuilt-rules) lists about 2,200 rules as plain links under 11 domain headings, such as Cloud and Endpoint. The page is generated by docs-builder's detection-rules extension from the rule files in elastic/detection-rules, so nobody edits it by hand.
Finding a rule on this page is hard:
- The only way to search is the browser's find-in-page, which jumps from match to match instead of narrowing the list.
- The only grouping is domain. Readers can't narrow the list by severity, rule type, operating system, or MITRE ATT&CK® tactic, even though every rule file has that information.
- The page shows nothing but names. To see a rule's severity or type, readers open each rule's page.
- The Endpoint section alone has about 1,300 rules, so even the domain headings leave long lists.
Proposal
Generate the overview as one filterable table, using the {table} directive's existing :filterable: option:
| Column | Comes from | Values today |
|---|---|---|
| Rule | The rule name, linked to its page | One per rule |
| Domain | The Domain: tag |
11, such as Endpoint and Cloud |
| Severity | severity |
4, from Low to Critical |
| Rule type | type, shown with the names readers know, such as "Indicator match" for threat_match |
7 |
| OS | The OS: tags |
3, Windows, Linux, and macOS |
| Tactic | The Tactic: tags |
14 |
Readers could then search by name and narrow the list with a dropdown for every column except Rule. For example, they could list every high-severity Credential Access rule for Windows.
The change is in docs-builder's generator, so it needs no change in elastic/detection-rules, and every new rule appears in the table automatically.
Dependencies
- Let authors choose which columns get dropdowns in a
:filterable:table #4914 (:filter-columns:). Domain and Tactic each have more than 12 values, so:filterable:alone wouldn't give them a dropdown.:filter-columns:names the five columns that should get one. - Let authors pin the first column of a wide table #4917 (
:pin-first-column:). Six columns are wider than the page, so the OS and Tactic columns need sideways scrolling. Pinning the Rule column keeps the rule names in view while readers scroll. - Make filterable table controls easier to use #4919 isn't required, but a table with five dropdowns benefits most from its clearer controls.
Alternatives considered
A separate page for each domain. I measured this on the live page. Removing the Domain column still leaves the table about 145 px wider than the content area at a 1280 px window, so it doesn't solve the width problem. The pages would also be very uneven: Endpoint would have about 1,300 rules, while Email and SaaS would have 2 or 3 each. Readers would lose the ability to search all rules at once, and the change would need new pages and navigation.
Keeping the domain headings with a table under each. Each table would have its own search box and dropdowns, so readers couldn't search or filter across domains.
Open questions
- The deprecated rules page is generated the same way. Should it get the same table?
- Rules without a domain tag show as "Unspecified", as they do on the page today. Four rules on detection-rules
mainhave no domain tag.
Activity