From 1503976d108cff5f0d0688af89e47e6e8504617d Mon Sep 17 00:00:00 2001 From: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com> Date: Thu, 9 Apr 2026 12:40:10 -0400 Subject: [PATCH] [FR] Load ECS mapping based on supplied stack version (#5925) * Load ECS mapping based on supplied stack version --- detection_rules/index_mappings.py | 3 +-- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/detection_rules/index_mappings.py b/detection_rules/index_mappings.py index f3017145a..612001237 100644 --- a/detection_rules/index_mappings.py +++ b/detection_rules/index_mappings.py @@ -17,7 +17,6 @@ from elasticsearch.exceptions import BadRequestError from semver import Version from . import ecs, integrations, misc, utils -from .config import load_current_package_version from .esql import EventDataset from .esql_errors import ( EsqlKibanaBaseError, @@ -511,7 +510,7 @@ def prepare_mappings( # noqa: PLR0913 custom_mapping.update({index: index_mapping}) # Load ECS in an index mapping format (nested schema) - current_version = Version.parse(load_current_package_version(), optional_minor_and_patch=True) + current_version = Version.parse(stack_version, optional_minor_and_patch=True) ecs_schema = get_ecs_schema_mappings(current_version) # Filter combined mappings based on the provided indices diff --git a/pyproject.toml b/pyproject.toml index f10677509..710803b62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "detection_rules" -version = "1.6.14" +version = "1.6.15" description = "Detection Rules is the home for rules used by Elastic Security. This repository is used for the development, maintenance, testing, validation, and release of rules for Elastic Security’s Detection Engine." readme = "README.md" requires-python = ">=3.12"