wazuh-puppet
wazuh-puppet copied to clipboard
Close the SCA policies tag
policies
tag is not closed and the XML cannot be parsed. This fix closes the tag.
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 I confirmed that the test passes using act in my local environment. Is it possible to merge?
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