Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@
</div></div>
</td>
</tr>
<tr role="row">
<th class="pf-m-fit-content" role="rowheader" scope="row"><b>Weight:</b></th>
<td role="cell">
<div class="pf-l-flex pf-m-column"><div class="pf-l-flex__item">
<p class="pf-c-table__text">{{ rule.weight }}</p>
</div></div>
</td>
</tr>
<tr role="row">
<th class="pf-m-fit-content" role="rowheader" scope="row"><p class="pf-c-table__text"><b>Severity:</b></p></td>
<td role="cell">
Expand Down
2 changes: 2 additions & 0 deletions openscap_report/scap_results_parser/data_structures/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"result",
"time",
"severity",
"weight",
"identifiers",
"references",
"description",
Expand All @@ -37,6 +38,7 @@ class Rule: # pylint: disable=R0902
multi_check: bool = False
time: str = ""
severity: str = ""
weight: float = 0.0
identifiers: list[Identifier] = field(default_factory=list)
references: list[Reference] = field(default_factory=list)
description: str = ""
Expand Down
1 change: 1 addition & 0 deletions openscap_report/scap_results_parser/parsers/rule_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def _insert_rules_results(self, rules):
rule_id = rule_result.get('idref')
rules[rule_id].time = rule_result.get('time')
rules[rule_id].result = rule_result.find('.//xccdf:result', NAMESPACES).text
rules[rule_id].weight = float(rule_result.get('weight'))

messages = rule_result.findall('.//xccdf:message', NAMESPACES)
if messages is not None:
Expand Down