diff --git a/detection_rules/packaging.py b/detection_rules/packaging.py index 6a6d5917e21..c287a20be9f 100644 --- a/detection_rules/packaging.py +++ b/detection_rules/packaging.py @@ -484,13 +484,14 @@ def _generate_registry_package(self, save_dir): package_dir = Path(save_dir).joinpath(manifest.version) docs_dir = package_dir / 'docs' - rules_dir = package_dir / 'kibana' / 'security-rule' + rules_dir = package_dir / 'kibana' / 'security_rule' docs_dir.mkdir(parents=True) rules_dir.mkdir(parents=True) manifest_file = package_dir.joinpath('manifest.yml') readme_file = docs_dir.joinpath('README.md') + notice_file = package_dir.joinpath('NOTICE.txt') manifest_file.write_text(yaml.safe_dump(manifest.asdict())) # shutil.copyfile(CHANGELOG_FILE, str(rules_dir.joinpath('CHANGELOG.json'))) @@ -503,6 +504,7 @@ def _generate_registry_package(self, save_dir): 'for the detection engine within the Elastic Security application.\n\n') readme_file.write_text(readme_text) + notice_file.write_text(Path(NOTICE_FILE).read_text()) def bump_versions(self, save_changes=False, current_versions=None): """Bump the versions of all production rules included in a release and optionally save changes."""