adding ident support for getting CVE names and urls#12
adding ident support for getting CVE names and urls#12isimluk merged 3 commits intoOpenSCAP:masterfrom
Conversation
lib/openscap/xccdf/item.rb
Outdated
|
|
||
| def idents | ||
| idenss = [] | ||
| idenss_it = OpenSCAP.xccdf_rule_get_idents(@raw) |
There was a problem hiding this comment.
I noticed trailing whitespace here.
It's nitpick, but I would feel better if we could get these fixed.
lib/openscap/xccdf/item.rb
Outdated
| end | ||
|
|
||
| def idents | ||
| idenss = [] |
There was a problem hiding this comment.
Did you perhaps mean to say indents ? Not sure whether this is a typo or legit.
There was a problem hiding this comment.
Sure, I can fix this one for you.
|
Thank You! Looks good, didn't test yet. Could you please write a test or two? |
lib/openscap/xccdf/ident.rb
Outdated
| OpenSCAP.xccdf_ident_get_id(@raw) | ||
| end | ||
|
|
||
|
|
lib/openscap/xccdf/ident.rb
Outdated
| end | ||
|
|
||
|
|
||
|
|
lib/openscap/xccdf/item.rb
Outdated
|
|
||
| def idents | ||
| idenss = [] | ||
| idenss_it = OpenSCAP.xccdf_rule_get_idents(@raw) |
There was a problem hiding this comment.
I think OpenSCAP.xccdf_rule_get_idents will backtrace really hard here if you pass in xccdf:Group element (the crash may occur only on some platforms, but still the risk exists).
You need to put this into the rule.rb.
|
Good point on the item vs rule. Have moved that across and cleared up the white space. Will look at writing some tests. "ident" is intentional as thats the name referred to in the arf schema.
|
|
@isimluk please review Added test for ident from a arf file (the way Cloudforms will consume this data) |
|
I thought we won't need ARF of size 275,156 Bytes just to test idents. I think we could have 1kB ARF file to test that, but I imagine working with all this file formats must be difficult for newcomer. Anyway, thanks a lot for contribution! And sorrry it took me so long to get this reviewed. |
This PR gives you the ability to query idents from the arf report. In the arf report it is actually the idents that contain the CVE references not the "references" element as shown below.