File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
objects/abstract_security_content_objects Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,16 @@ class Detection_Abstract(SecurityContentObject):
67
67
search : str = Field (...)
68
68
how_to_implement : str = Field (..., min_length = 4 )
69
69
known_false_positives : str = Field (..., min_length = 4 )
70
+ explanation : None | str = Field (
71
+ default = None ,
72
+ exclude = True , #Don't serialize this value when dumping the object
73
+ description = "Provide an explanation to be included "
74
+ "in the 'Explanation' field of the Detection in "
75
+ "the Use Case Library. If this field is not "
76
+ "defined in the YML, it will default to the "
77
+ "value of the 'description' field when "
78
+ "serialized in analyticstories_detections.j2" ,
79
+ )
70
80
71
81
enabled_by_default : bool = False
72
82
file_path : FilePath = Field (...)
Original file line number Diff line number Diff line change 7
7
type = detection
8
8
asset_type = {{ detection.tags.asset_type.value }}
9
9
confidence = medium
10
- explanation = {{ detection.description | escapeNewlines() }}
10
+ explanation = {{ ( detection.explanation if detection.explanation else detection. description) | escapeNewlines() }}
11
11
{% if detection .how_to_implement is defined %}
12
12
how_to_implement = {{ detection.how_to_implement | escapeNewlines() }}
13
13
{% else %}
You can’t perform that action at this time.
0 commit comments