File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -119,16 +119,18 @@ def __to_ospd(
119
119
cvss = severity .get ("cvss_v2" , None )
120
120
result ["severity_vector" ] = cvss
121
121
result ["filename" ] = path .name
122
- bid = advisory .get ("bid " , [] )
123
- cve = advisory .get ("cve " , [] )
124
- xref = advisory .get ("xrefs " , [] )
122
+ cves = advisory .get ("cves " , None )
123
+ xrefs = advisory .get ("xrefs " , None )
124
+ advisory_xref = advisory .get ("advisory_xref " , "" )
125
125
refs = {}
126
- if bid :
127
- refs ['bid' ] = bid
128
- if cve :
129
- refs ['cve' ] = cve
130
- if xref :
131
- refs ['xref' ] = xref
126
+ refs ['url' ] = [advisory_xref ]
127
+ advisory_id = advisory .get ("advisory_id" , None )
128
+ if cves :
129
+ refs ['cve' ] = cves
130
+ if xrefs :
131
+ refs ['url' ] = refs ['url' ] + xrefs
132
+ if advisory_id :
133
+ refs ['advisory_id' ] = [advisory_id ]
132
134
133
135
result ["refs" ] = refs
134
136
result ["family" ] = meta_data .get ("family" , path .stem )
You can’t perform that action at this time.
0 commit comments