From 1bcbcb1f98d727bf26a0c93d9ff028f9e498bc95 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Sat, 18 Jul 2020 22:46:57 -0400 Subject: [PATCH] Fix idstools jinja --- salt/idstools/etc/disable.conf | 5 +++-- salt/idstools/etc/enable.conf | 5 +++-- salt/idstools/etc/modify.conf | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/salt/idstools/etc/disable.conf b/salt/idstools/etc/disable.conf index e667d54c7..84144a495 100644 --- a/salt/idstools/etc/disable.conf +++ b/salt/idstools/etc/disable.conf @@ -9,7 +9,8 @@ # - All regular expression matches are case insensitive. # re:hearbleed # re:MS(0[7-9]|10)-\d+ - +{%- if disabled_sids != None %} {%- for sid in disabled_sids %} {{ sid }} -{%- endfor %} \ No newline at end of file +{%- endfor %} +{%- endif %} \ No newline at end of file diff --git a/salt/idstools/etc/enable.conf b/salt/idstools/etc/enable.conf index da2dfb6af..5da0bfc61 100644 --- a/salt/idstools/etc/enable.conf +++ b/salt/idstools/etc/enable.conf @@ -9,7 +9,8 @@ # - All regular expression matches are case insensitive. # re:hearbleed # re:MS(0[7-9]|10)-\d+ - +{%- if enabled_sids != None %} {%- for sid in enabled_sids %} {{ sid }} -{%- endfor %} \ No newline at end of file +{%- endfor %} +{%- endif %} \ No newline at end of file diff --git a/salt/idstools/etc/modify.conf b/salt/idstools/etc/modify.conf index 52c4ca2ea..4ea75ada2 100644 --- a/salt/idstools/etc/modify.conf +++ b/salt/idstools/etc/modify.conf @@ -5,6 +5,8 @@ # Example changing the seconds for rule 2019401 to 3600. #2019401 "seconds \d+" "seconds 3600" +{%- if modify_sids != None %} {%- for sid in modify_sids %} {{ sid }} -{%- endfor %} \ No newline at end of file +{%- endfor %} +{%- endif %} \ No newline at end of file