Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version to profile element in the data stream #10909

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ssg/entities/profile_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def _add_selects(self, element, selections, prefix, selected):
def to_xml_element(self):
element = ET.Element('{%s}Profile' % XCCDF12_NS)
element.set("id", OSCAP_PROFILE + self.id_)
if self.metadata and 'version' in self.metadata and self.metadata['version'] is not None:
add_sub_element(element, "version", XCCDF12_NS, str(self.metadata["version"]))
if self.extends:
element.set("extends", self.extends)
title = add_sub_element(element, "title", XCCDF12_NS, self.title)
Expand Down
1 change: 1 addition & 0 deletions tests/unit/ssg-module/data/ospp.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<ns0:Profile xmlns:ns0="http://checklists.nist.gov/xccdf/1.2" id="xccdf_org.ssgproject.content_profile_ospp">
<ns0:version>4.2.1</ns0:version>
<ns0:title override="true">Protection Profile for General Purpose Operating Systems</ns0:title>
<ns0:description override="true">This profile is part of Red Hat Enterprise Linux 9 Common Criteria Guidance
documentation for Target of Evaluation based on Protection Profile for
Expand Down
Loading