Skip to content

Commit 1e51d6d

Browse files
committed
Add optional explanation field to detections
1 parent b9ce7f9 commit 1e51d6d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contentctl/objects/abstract_security_content_objects/detection_abstract.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class Detection_Abstract(SecurityContentObject):
6060
search: str = Field(...)
6161
how_to_implement: str = Field(..., min_length=4)
6262
known_false_positives: str = Field(..., min_length=4)
63+
explanation: Optional[str] = None
6364

6465
enabled_by_default: bool = False
6566
file_path: FilePath = Field(...)

contentctl/output/templates/analyticstories_detections.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
type = detection
88
asset_type = {{ detection.tags.asset_type.value }}
99
confidence = medium
10-
explanation = {{ detection.description | escapeNewlines() }}
10+
explanation = {{ detection.explanation if detection.explanation else detection.description | escapeNewlines() }}
1111
{% if detection.how_to_implement is defined %}
1212
how_to_implement = {{ detection.how_to_implement | escapeNewlines() }}
1313
{% else %}

0 commit comments

Comments
 (0)