-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: kandji_alert_for_unencrypted_devices workflow
- Loading branch information
1 parent
226b393
commit 7ca12d7
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
""" | ||
admyral workflow push kandji_alert_for_unencrypted_devices -f workflows/kandji_unencrypted_devices2.py | ||
admyral workflow push kandji_alert_for_unencrypted_devices -f workflows/kandji_unencrypted_devices2.py --activate | ||
""" | ||
|
||
|
@@ -25,16 +25,16 @@ def kandji_alert_for_unencrypted_devices(payload: dict[str, JsonValue]): | |
) | ||
|
||
selected_fields = select_fields_from_objects_in_list( | ||
objects=unencrypted_devices, | ||
input_list=unencrypted_devices, | ||
fields=["device_name", "device_id"], | ||
) | ||
|
||
formatted_string = format_json_to_list_view_string( | ||
objects=selected_fields, | ||
json_value=selected_fields, | ||
) | ||
|
||
send_slack_message_to_user_by_email( | ||
email="[email protected]", | ||
text=formatted_string, | ||
text=f"🚨 Unencrypted devices detected 🚨:\n\n{formatted_string}", | ||
secrets={"SLACK_SECRET": "slack_secret"}, | ||
) |