From 3d105c20aca5ec3ed438efe3373c198dc6a92951 Mon Sep 17 00:00:00 2001 From: Shashank K S Date: Fri, 8 Nov 2024 18:28:59 +0530 Subject: [PATCH 1/2] Fix extra new line in ATT&CK-coverage.md --- detection_rules/devtools.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/detection_rules/devtools.py b/detection_rules/devtools.py index 83efbe46685..7c2b020a42d 100644 --- a/detection_rules/devtools.py +++ b/detection_rules/devtools.py @@ -836,8 +836,7 @@ def raw_permalink(raw_link): if update_coverage: coverage_file_path = get_path('docs', 'ATT&CK-coverage.md') - header_lines = textwrap.dedent(""" - # Rule coverage + header_lines = textwrap.dedent("""# Rule coverage ATT&CK navigator layer files are generated when a package is built with `make release` or `python -m detection-rules`.This also means they can be downloaded from all successful builds. From 6eb55816b63421b7806425311776f4f6f6d13e87 Mon Sep 17 00:00:00 2001 From: Shashank K S Date: Fri, 8 Nov 2024 18:39:04 +0530 Subject: [PATCH 2/2] Fix spacing in file and update patch version --- detection_rules/devtools.py | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/detection_rules/devtools.py b/detection_rules/devtools.py index 7c2b020a42d..0df0fe10c99 100644 --- a/detection_rules/devtools.py +++ b/detection_rules/devtools.py @@ -838,17 +838,17 @@ def raw_permalink(raw_link): coverage_file_path = get_path('docs', 'ATT&CK-coverage.md') header_lines = textwrap.dedent("""# Rule coverage - ATT&CK navigator layer files are generated when a package is built with `make release` or - `python -m detection-rules`.This also means they can be downloaded from all successful builds. +ATT&CK navigator layer files are generated when a package is built with `make release` or +`python -m detection-rules`.This also means they can be downloaded from all successful builds. - These files can be used to pass to a custom navigator session. For convenience, the links are - generated below. You can also include multiple across tabs in a single session, though it is not - advisable to upload _all_ of them as it will likely overload your browsers resources. +These files can be used to pass to a custom navigator session. For convenience, the links are +generated below. You can also include multiple across tabs in a single session, though it is not +advisable to upload _all_ of them as it will likely overload your browsers resources. - ## Current rule coverage +## Current rule coverage - The source files for these links are regenerated with every successful merge to main. These represent - coverage from the state of rules in the `main` branch. +The source files for these links are regenerated with every successful merge to main. These represent +coverage from the state of rules in the `main` branch. """) updated_file = header_lines + '\n\n' + '\n'.join(markdown) + '\n' # Replace the old URLs with the new ones diff --git a/pyproject.toml b/pyproject.toml index 10b2b57f8bc..c5aeba9a8bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "detection_rules" -version = "0.1.3" +version = "0.1.4" 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"