Open
Description
Hi team,
The JSON format of an agent's on-demand configuration responses is incorrect for arrays. For example, currently, the SCA configuration JSON is the following:
{
"sca":{
"enabled":"yes",
"scan_on_start":"yes",
"skip_nfs":"yes",
"interval":43200,
"policies":[
"cis_rhel7_linux_rcl.yml",
"system_audit_rcl.yml",
"system_audit_ssh.yml",
"system_audit_pw.yml"
]
}
}
So when in the Wazuh app we use the JSON to XML parser to show it in the XML viewer we get this output:
This is incorrect because the policies are composed of an array of policies. This would be fixed by changing the answer so that JSON adopts this format:
{
"sca":{
"enabled":"yes",
"scan_on_start":"yes",
"skip_nfs":"yes",
"interval":43200,
"policies":{
"policy":[
"cis_rhel7_linux_rcl.yml",
"system_audit_rcl.yml",
"system_audit_ssh.yml",
"system_audit_pw.yml"
]
}
}
}
This also happens in OpenSCAP Profiles
, Labels
, Syscheck Ignore
, Syscheck directories
.
Regards.