ssg.checks module

ssg.checks.get_content_ref_if_exists_and_not_remote(check)[source]

Given an OVAL check element, examine the xccdf_ns:check-content-ref

If it exists and it isn’t remote, pass it as the return value. Otherwise, return None.

..see-also:: is_content_href_remote

ssg.checks.get_oval_contents(rule_obj, oval_id)[source]

Returns the tuple (path, contents) of the check described by the given oval_id or product.

ssg.checks.get_oval_path(rule_obj, oval_id)[source]

For the given oval_id or product, return the full path to the check in the given rule.

ssg.checks.is_content_href_remote(check_content_ref)[source]

Given an OVAL check-content-ref element, examine the ‘href’ attribute.

If it starts with ‘http://’ or ‘https://’, return True, otherwise return False.

Raises RuntimeError if the href element doesn’t exist.

ssg.checks.set_applicable_platforms(oval_contents, new_platforms)[source]

Returns a modified contents which updates the platforms to the new platforms.