Skip to content

Commit 6963c5a

Browse files
authored
Change asset type to security_rule (#1054)
* Change asset type to security_rule * Add notice.txt
1 parent 687c9fe commit 6963c5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

detection_rules/packaging.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,14 @@ def _generate_registry_package(self, save_dir):
484484

485485
package_dir = Path(save_dir).joinpath(manifest.version)
486486
docs_dir = package_dir / 'docs'
487-
rules_dir = package_dir / 'kibana' / 'security-rule'
487+
rules_dir = package_dir / 'kibana' / 'security_rule'
488488

489489
docs_dir.mkdir(parents=True)
490490
rules_dir.mkdir(parents=True)
491491

492492
manifest_file = package_dir.joinpath('manifest.yml')
493493
readme_file = docs_dir.joinpath('README.md')
494+
notice_file = package_dir.joinpath('NOTICE.txt')
494495

495496
manifest_file.write_text(yaml.safe_dump(manifest.asdict()))
496497
# shutil.copyfile(CHANGELOG_FILE, str(rules_dir.joinpath('CHANGELOG.json')))
@@ -503,6 +504,7 @@ def _generate_registry_package(self, save_dir):
503504
'for the detection engine within the Elastic Security application.\n\n')
504505

505506
readme_file.write_text(readme_text)
507+
notice_file.write_text(Path(NOTICE_FILE).read_text())
506508

507509
def bump_versions(self, save_changes=False, current_versions=None):
508510
"""Bump the versions of all production rules included in a release and optionally save changes."""

0 commit comments

Comments
 (0)