mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
prevent endgame_dict from being added to standard_actions if it is already present
This commit is contained in:
@@ -35,7 +35,17 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% set standard_actions = SOCMERGED.config.pop('actions') %}
|
{% set standard_actions = SOCMERGED.config.pop('actions') %}
|
||||||
|
|
||||||
{% if pillar.global.endgamehost != '' %}
|
{% if pillar.global.endgamehost != '' %}
|
||||||
|
{# this is added to prevent endgame_dict from being added to standard_actions for each time this file is rendered #}
|
||||||
|
{% set endgame = namespace(add=true) %}
|
||||||
|
{% for d in standard_actions %}
|
||||||
|
{% if d.name is defined %}
|
||||||
|
{% if d.name == 'Endgame' %}
|
||||||
|
{% set endgame.add = false %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
{% set endgame_dict = {
|
{% set endgame_dict = {
|
||||||
"name": "Endgame",
|
"name": "Endgame",
|
||||||
"description": "Endgame Endpoint Investigation and Response",
|
"description": "Endgame Endpoint Investigation and Response",
|
||||||
@@ -44,8 +54,10 @@
|
|||||||
"links": ["https://" ~ pillar.global.endgamehost ~ "/endpoints/{:agent.id}"]
|
"links": ["https://" ~ pillar.global.endgamehost ~ "/endpoints/{:agent.id}"]
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
{% if endgame.add %}
|
||||||
{% do standard_actions.append(endgame_dict) %}
|
{% do standard_actions.append(endgame_dict) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% do SOCMERGED.config.server.client.hunt.update({'actions': standard_actions}) %}
|
{% do SOCMERGED.config.server.client.hunt.update({'actions': standard_actions}) %}
|
||||||
{% do SOCMERGED.config.server.client.dashboards.update({'actions': standard_actions}) %}
|
{% do SOCMERGED.config.server.client.dashboards.update({'actions': standard_actions}) %}
|
||||||
|
|||||||
Reference in New Issue
Block a user