<div dir="ltr"><div>Hi,</div><div><br></div><div>I'm afraid we hit the limitation of OVAL specification: <a href="https://oval.mitre.org/language/version5.11/ovaldefinition/documentation/oval-definitions-schema.html#ObjectComponentType">https://oval.mitre.org/language/version5.11/ovaldefinition/documentation/oval-definitions-schema.html#ObjectComponentType</a> <br></div><div><br></div><div>> The required object_ref attribute provides a reference to an existing
OVAL Object declaration. The referenced OVAL Object
specifies a set of OVAL Items to collect. Note that an OVAL
Object might identify 0, 1, or many OVAL Items on a system. If
no items are found on the system then an error should be
reported when determining the value of an ObjectComponentType. If
1 or more OVAL Items are found then each OVAL Item will be
considered and the ObjectComponentType may have one or more values. <br></div><div><br></div><div>I think that the workaround could be that the regular expression always matches at least an empty string. Then I think the variable will not be empty but it would contain an item that contains an empty string, so the concatenation could proceed. I haven't tried it if it works, though.</div><div><br></div><div>Regards<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 31, 2019 at 3:26 PM Ilya Okomin <<a href="mailto:ilya.okomin@oracle.com">ilya.okomin@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
Hi Team,<br>
<br>
I need some piece of advice how to implement join in OVAL for
variables if some of them are empty .<br>
<br>
I'm looking at the existing example from master which uses
<concat>-<split>. However this code doesn't work as
expected for empty variable <span class="gmail-m_-327671260666358091pl-s"><span class="gmail-m_-327671260666358091pl-pds"></span>var_rfg_include_config_regex<span class="gmail-m_-327671260666358091pl-pds"></span></span> in <concat> - returned
result "no value", while expected would be "%^/etc/rsyslog.conf$": <br>
<a class="gmail-m_-327671260666358091moz-txt-link-freetext" href="https://github.com/ComplianceAsCode/content/blob/master/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_files_groupownership/oval/shared.xml#L43" target="_blank">https://github.com/ComplianceAsCode/content/blob/master/linux_os/guide/system/logging/ensure_rsyslog_log_file_configuration/rsyslog_files_groupownership/oval/shared.xml#L43</a><br>
<br>
Note: <a href="https://oval.mitre.org/language/version5.11/ovaldefinition/documentation/oval-definitions-schema.html#UniqueFunctionType" target="_blank">UniqueFunctionType</a>
looks more applicable here, but it doesn't work as well with the
same reason - returned result is "no value" when one of variables is
empty.<br>
<br>
Can any approach be suggested to avoid getting "no value" and return
expected result for sample <span class="gmail-m_-327671260666358091pl-s">var_rfg_all_log_files_as_string_regex<span class="gmail-m_-327671260666358091pl-pds"> </span></span>variable (with joined values from
defined only variables/objects)?<br>
<br>
Regards,<br>
Ilya.<br>
</div>
_______________________________________________<br>
Open-scap-list mailing list<br>
<a href="mailto:Open-scap-list@redhat.com" target="_blank">Open-scap-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/open-scap-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/open-scap-list</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Jan Černý<br>Security Technologies | Red Hat, Inc.</div>