wazuh-puppet icon indicating copy to clipboard operation
wazuh-puppet copied to clipboard

Close the SCA policies tag

Open mrtc0 opened this issue 4 years ago • 3 comments

policies tag is not closed and the XML cannot be parsed. This fix closes the tag.

mrtc0 avatar Jul 10 '20 01:07 mrtc0

Hi @mrtc0, first of all, sorry for the late reply.

I just confirmed what you said above. Let us run some tests on your commit and I will let you know the results as soon as possible ( We just added testing through GitHub actions ).

Thanks for contributing, it's really appreciated!

Greetings, JP

Zenidd avatar Jul 27 '20 14:07 Zenidd

@Zenidd I confirmed that the test passes using act in my local environment. Is it possible to merge?

mrtc0 avatar Sep 15 '20 06:09 mrtc0

Hello again @mrtc0,

Sorry for the late reply. We are working hard to adapt our modules to the upcoming Wazuh 4.0 version.

About the PR, I think the proposed changes could lead to an error state in the Wazuh manager:

  <policies>
  <%- if @debian_additional_templates == 'yes' -%>
    <policy>cis_debianlinux7-8_L1_rcl.yml</policy>
    <policy>cis_debianlinux7-8_L2_rcl.yml</policy>
  <%- end -%>
  </policies>

Whether the comparison @debian_additional_templates == 'yes' is false, an empty <policies> </policies> block will be rendered leading to error:

2020/09/16 11:30:30 wazuh-modulesd: ERROR: (1202): Configuration error at '/var/ossec/etc/ossec.conf'.
wazuh-modulesd: Configuration error. Exiting

Could you consider this case and avoid rendering an empty <policies> </policies> block? It could be fixed by joining the <policies> </policies> inside the conditional block.

I'll keep an eye on this PR, let me know how it goes !

Greetings,

JP

Zenidd avatar Sep 16 '20 11:09 Zenidd