You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/versioning.md
+131-1Lines changed: 131 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Supported Versions and Releases
1
+
# Rule Supported Versions and Releases
2
2
3
3
This document provides detailed information about the different versions that are supported and released for prebuilt detection rules.
4
4
@@ -24,3 +24,133 @@ The following version(s) are maintained along with the current version.
24
24
## End of Life Policy
25
25
26
26
Our policy is to support and provide public releases for `Current`, `Current-1`, `Current-2`, `Current-3` versions. We maintain and do not release `Current-4` and `Current-5` versions.
27
+
28
+
29
+
# Code Supported Versions and Releases
30
+
31
+
This outlines the versioning strategy and release process for the [detection-rules](https://github.com/elastic/detection-rules) repository, covering the core code, `kql` and `kibana` libraries, configuration files, and the `hunting` folder. The strategy follows semantic versioning to ensure clear communication of changes to users and compatibility with different Elastic Stack versions.
32
+
33
+
> [!IMPORTANT]
34
+
> This versioning process **excludes** the detection rules themselves. Detection rules are released separately and are not tied to the following process.
35
+
36
+
---
37
+
38
+
## Versioning Strategy
39
+
40
+
### Components Covered by Versioning:
41
+
-**Core Detection-Rules Code**: Handles logic for rule management, CLI, etc.
42
+
-**Libraries**:
43
+
-**`kql`**: Manages Kibana Query Language parsing and operations.
44
+
-**`kibana`**: Handles integrations and API interactions with Kibana.
45
+
-**Configuration Files**: Under the `etc/` folder that impact schema and DAC.
46
+
-**Hunting Logic**: The `hunting/` folder, which manages hunting rules.
47
+
48
+
49
+
### Semantic Versioning Approach:
50
+
We will use **Semantic Versioning** with the format `MAJOR.MINOR.PATCH`:
51
+
-**MAJOR version (`X.0.0`)**: For backward-incompatible changes.
52
+
-**MINOR version (`0.Y.0`)**: For backward-compatible new features.
53
+
-**PATCH version (`0.0.Z`)**: For backward-compatible bug fixes or small improvements.
54
+
55
+
---
56
+
57
+
## Versioning Guidelines
58
+
59
+
### Patch Version (`0.0.Z`):
60
+
Increment the patch version when making bug fixes, performance improvements, or small enhancements that do not break backward compatibility. Open a PR to ensure the proper `pyproject.toml` files and any other `version` related files are bumped.
61
+
62
+
<details><summary>Expand for Examples</summary>
63
+
<p>
64
+
65
+
**Examples**:
66
+
-**Kibana Library**:
67
+
- Minor fixes to API calls to ensure correct data retrieval.
68
+
- Updates to the `kibana` lib without adding new features.
69
+
-**KQL Library**:
70
+
- Small bug fixes in the query parsing logic.
71
+
- Optimizations that don't alter functionality.
72
+
-**Core Detection-Rules Code**:
73
+
- Fixes for CLI bugs or performance tweaks.
74
+
- Minor enhancements to rule management that don’t require users to change workflows.
75
+
-**Hunting Folder**:
76
+
- Bug fixes in hunting rules logic.
77
+
- Small performance tweaks for the hunting rule management.
78
+
79
+
</p>
80
+
</details>
81
+
82
+
---
83
+
84
+
### Minor Version (`0.Y.0`):
85
+
Increment the minor version when adding backward-compatible new features, enhancements, or functionality.
86
+
87
+
<details><summary>Expand for Examples</summary>
88
+
<p>
89
+
90
+
**Examples**:
91
+
-**Kibana Library**:
92
+
- Adding a new API endpoint to interact with Elastic Kibana X.Y while maintaining backward compatibility with older versions.
93
+
-**KQL Library**:
94
+
- Adding new query parsing functionality that is backward-compatible with previous Elastic Stack versions.
95
+
-**Core Detection-Rules Code**:
96
+
- New CLI commands or functionality for managing detection rules.
97
+
- New optional fields in rule schemas that have minimum compatibility requirements. (e.g adding `alert_suppression` with `min_compat=8.14`).
98
+
-**Hunting Folder**:
99
+
- Adding new hunting rule management features that are optional and backward-compatible.
100
+
- Enhancements in generating hunting rule markdown or CLI features.
101
+
102
+
</p>
103
+
</details>
104
+
105
+
> [!NOTE]
106
+
> When bumping this version, the patch version should be reset to `0` and the major version should remain the same.
107
+
108
+
---
109
+
110
+
### Major Version (`X.0.0`):
111
+
Increment the major version when introducing backward-incompatible changes that require users to update workflows, Elastic Stack versions, or rule management strategies.
112
+
113
+
<details><summary>Expand for Examples</summary>
114
+
<p>
115
+
116
+
**Examples**:
117
+
-**Kibana Library**:
118
+
- Replacing or removing an existing API endpoint that forces users to upgrade to Elastic X.Y
119
+
-**KQL Library**:
120
+
- Structural changes to query parsing logic that break compatibility with previous Elastic Stack versions.
121
+
-**Core Detection-Rules Code**:
122
+
- Breaking changes to rule schema definitions or CLI workflows that require user updates.
123
+
- Forcing users to migrate to a newer Elastic Stack version due to changes in core code or schema compatibility.
124
+
-**Hunting Folder**:
125
+
- Major refactors of the hunting logic that break existing workflows.
126
+
- Changes to how hunting rules are defined or managed, requiring users to adjust configurations.
127
+
128
+
</p>
129
+
</details>
130
+
131
+
> [!NOTE]
132
+
> When bumping this version, the minor version and patch version should be reset to `0`.
133
+
134
+
---
135
+
136
+
## Tagging Process
137
+
138
+
Each release will be tagged using the following format:
139
+
-**Tag Format**: `vX.Y.Z` (e.g., `v1.2.0`).
140
+
-**Single Tag for Combined Releases**: If there are changes to the core detection-rules code or libraries (`kql`, `kibana`), they will be tagged together as a single release with the core detection-rules versioning.
141
+
-**Hunting Folder**: Changes to the hunting logic will be included in the combined release.
142
+
143
+
> [!CAUTION]
144
+
> When a version is bumped in a lib, we need to also bump the core `pyproject.toml` file *(e.g A version bump in `kql` will also require a similar version bump in the core detection-rules versioning)*.
145
+
---
146
+
147
+
## When to Trigger a GitHub Release
148
+
149
+
A draft release will be triggered in the following cases:
150
+
-**New Feature or Bug Fix**: Once a feature or bug fix is merged into `main`, a version bump is made according to the semantic versioning rules.
151
+
-**Version Bump**: After the version bump, a GitHub release will be created using **release-drafter** CI workflow to automate draft release generation.
152
+
153
+
As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish quarterly.
154
+
155
+
> [!IMPORTANT]
156
+
> Proper PR labels need to be added for this to properly be labeled and added to the draft.
0 commit comments