Skip to content

Commit

Permalink
Add env_yaml to xccdf as xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Honny1 committed Feb 26, 2024
1 parent fc3edb9 commit bebbc25
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ssg/build_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def to_xccdf(self):
def __str__(self):
return self.id_

def get_benchmark_xml_for_profile(self, profile):
def get_benchmark_xml_for_profile(self, env_yaml, profile):
rules, groups = self.get_components_not_included_in_a_profiles([profile])
profiles = set(filter(
lambda id_, profile_id=profile.id_: id_ != profile_id,
Expand All @@ -516,6 +516,7 @@ def get_benchmark_xml_for_profile(self, profile):
"profiles": profiles
}
return profile.id_, self.to_xml_element(
env_yaml,
components_to_not_include=components_to_not_include
)

Expand Down Expand Up @@ -1597,7 +1598,9 @@ def get_benchmark_xml_by_profile(self):
)

for profile in self.benchmark.profiles:
profile_id, benchmark = self.benchmark.get_benchmark_xml_for_profile(profile)
profile_id, benchmark = self.benchmark.get_benchmark_xml_for_profile(
self.env_yaml, profile
)
yield profile_id, benchmark

def load_compiled_content(self):
Expand Down

0 comments on commit bebbc25

Please sign in to comment.