-
Notifications
You must be signed in to change notification settings - Fork 9
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 multi-check rules #148
Conversation
4c2e208
to
f1053be
Compare
f1053be
to
ec5e8a4
Compare
return self.reports_with_oval_definitions[self.cpe_source] | ||
logging.warning(( | ||
"The given input does not contain a clear mapping of the OVAL definition used" | ||
" for CPE checks. The results of the OVAL definition in the CPE checks could " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces: at the end or at the start?
@@ -107,4 +107,11 @@ def parse_report(self): | |||
self._debug_show_rules(rules) | |||
report.rules = rules | |||
report.groups = groups | |||
|
|||
if len(report.profile_info.selected_rules_ids) > 0: | |||
report.profile_info.selected_rules_ids.extend(rule_parser.to_select_rule_ids) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be a ProfileInfo
mutate method, like extend_selected_rules_ids
. Along with the logic how/when to do that if len(report.profile_info.selected_rules_ids) > 0:
.
Why do you update it only when it is not empty by the way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two approaches how to determine if the rule is selected.
- First is to get information from elements
<xccdf-1.2:select ...>
. A list ofselected_rules_ids
represents these elements. - The second is to get information from the result of the rule.
The second approach is used if select elements aren't present in the ARF report. That is why the list is not extended when the list is empty.
…ysis system and specify which OVAL result report is for CPE
…nd rename the method to get_list_of_cpe_platforms_that_satisfy_evaluation_target
ec5e8a4
to
3edc61b
Compare
3edc61b
to
208db6c
Compare
Changes:
|
This PR adds multi-check rules to the HTML report.
Example:
![image](https://user-images.githubusercontent.com/26072444/226670703-f2333f5f-a33c-4289-b261-3a0df6b12acc.png)
Depend on: #140