Skip to content

Commit f2fac1b

Browse files
authored
[FR] [DAC] Add existing mitre threat information on import (#4948)
1 parent 0e78ce3 commit f2fac1b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

detection_rules/cli_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ def rule_prompt( # noqa: PLR0912, PLR0913, PLR0915
189189

190190
# build this from technique ID
191191
if name == "threat":
192-
threat_map: list[dict[str, Any]] = []
193-
if not skip_errors:
192+
threat_map: list[dict[str, Any]] = kwargs.get("threat", [])
193+
if not skip_errors and not required_only:
194194
while click.confirm("add mitre tactic?"):
195195
tactic = schema_prompt("mitre tactic name", type="string", enum=tactics, is_required=True)
196196
technique_ids = ( # type: ignore[reportUnknownVariableType]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "detection_rules"
3-
version = "1.3.14"
3+
version = "1.3.15"
44
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."
55
readme = "README.md"
66
requires-python = ">=3.12"

0 commit comments

Comments
 (0)