Commit c5cf870 1 parent 3cb0a64 commit c5cf870 Copy full SHA for c5cf870
File tree 1 file changed +8
-3
lines changed
src/main/java/org/dependencytrack/parser/nvd
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -172,10 +172,15 @@ public void parse(final File file) {
172
172
final List <VulnerableSoftware > vulnerableSoftwareInNode = new ArrayList <>();
173
173
final Operator nodeOperator = Operator .valueOf (node .getString ("operator" , Operator .NONE .name ()));
174
174
if (node .containsKey ("children" )) {
175
+ // https://github.com/DependencyTrack/dependency-track/issues/1033
175
176
final JsonArray children = node .getJsonArray ("children" );
176
- for (int l = 0 ; l < children .size (); l ++) {
177
- final JsonObject child = children .getJsonObject (l );
178
- vulnerableSoftwareInNode .addAll (parseCpes (qm , child , synchronizeVulnerability ));
177
+ if (children .size () > 0 ) {
178
+ for (int l = 0 ; l < children .size (); l ++) {
179
+ final JsonObject child = children .getJsonObject (l );
180
+ vulnerableSoftwareInNode .addAll (parseCpes (qm , child , synchronizeVulnerability ));
181
+ }
182
+ } else {
183
+ vulnerableSoftwareInNode .addAll (parseCpes (qm , node , synchronizeVulnerability ));
179
184
}
180
185
} else {
181
186
vulnerableSoftwareInNode .addAll (parseCpes (qm , node , synchronizeVulnerability ));
You can’t perform that action at this time.
0 commit comments