diff --git a/detection_rules/ghwrap.py b/detection_rules/ghwrap.py index a026a12ad..17fe5f092 100644 --- a/detection_rules/ghwrap.py +++ b/detection_rules/ghwrap.py @@ -113,7 +113,8 @@ def update_gist( # noqa: PLR0913 response.raise_for_status() data = response.json() files = list(data["files"]) - body["files"] = {file: {} for file in files if file not in file_map} + keep_names = {path.name for path in file_map} + body["files"] = {name: {} for name in files if name not in keep_names} response = requests.patch(url, headers=headers, json=body, timeout=30) response.raise_for_status() diff --git a/pyproject.toml b/pyproject.toml index 710803b62..3338d0704 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "detection_rules" -version = "1.6.15" +version = "1.6.16" 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"