Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions contentctl/objects/deployment_email.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, ConfigDict


Expand All @@ -8,3 +10,4 @@ class DeploymentEmail(BaseModel):
message: str
subject: str
to: str
sendcsv: Optional[bool] = False
3 changes: 3 additions & 0 deletions contentctl/output/templates/savedsearches_detections.j2
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ action.email.subject.alert = {{ detection.deployment.alert_action.email.subject
action.email.to = {{ detection.deployment.alert_action.email.to }}
action.email.message.alert = {{ detection.deployment.alert_action.email.message | custom_jinja2_enrichment_filter(detection) | escapeNewlines() }}
action.email.useNSSubject = 1
{% if detection.deployment.alert_action.email.sendcsv %}
action.email.sendcsv = 1
{% endif %}
{% endif %}
{% if detection.deployment.alert_action.slack %}
action.slack = 1
Expand Down