-
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
Reorganization of OVAL Test results #221
Conversation
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.
This is an amazing improvement! It will be very useful for debugging fails of complex rules.
return body; | ||
} | ||
|
||
function generate_referenced_endpoints(test_info, children_id, div) { |
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.
Consider if the code complexity of this function can be reduced, for example by inverting the condition or extracting the inner for loop to a separate function.
if data_id not in map_referenced_oval_endpoints: | ||
map_referenced_oval_endpoints[data_id] = [] | ||
if value not in map_referenced_oval_endpoints[data_id]: | ||
map_referenced_oval_endpoints[data_id].append(value) |
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.
Can the map be a collections.defaultdict? I think that would help you avoid this construction.
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.
I have generated a report from scan results of rule audit_rules_privilieged_commands and I have seen how the details about referenced dependencies works in the HTML report.
This PR changes the representation of components referenced by OVAL Tests, such as Objects, States, and Variables.
See the new representation:
Fixes: #216