Skip to content
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

SeverityType does not contain element with name CVSS_V4 #2986

Open
0x6675636b796f75676974687562 opened this issue Nov 8, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@0x6675636b796f75676974687562
Copy link
Member

When uploading a (C)OSV JSON which contains CVSS_V4, such as:

{
  "severity": [
    {
      "type": "CVSS_V4",
      "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
    }
  ]
}

the following exception is printed to the log:

16:10:08.813 [boundedElastic-7] ERROR c.s.cosv.backend.service.CosvService - Failed to process raw COSV file with id: 1 kotlinx.serialization.SerializationException: com.saveourtool.osv4k.SeverityType does not contain element with name 'CVSS_V4'
	at kotlinx.serialization.json.internal.JsonNamesMapKt.getJsonNameIndexOrThrow(JsonNamesMap.kt:107)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Assembly trace from producer [reactor.core.publisher.MonoFlattenIterable] :
	reactor.core.publisher.Mono.flatMapIterable(Mono.java:3205)
	com.saveourtool.cosv.backend.service.CosvService$doProcess$1.invoke(CosvService.kt:192)
Error has been observed at the following site(s):
	*__Mono.flatMapIterable ⇢ at com.saveourtool.cosv.backend.service.CosvService$doProcess$1.invoke(CosvService.kt:192)
	|_         Flux.flatMap ⇢ at com.saveourtool.cosv.backend.service.CosvService$doProcess$1.invoke(CosvService.kt:193)
	|_   Flux.onErrorResume ⇢ at com.saveourtool.cosv.backend.service.CosvService$doProcess$1.invoke(CosvService.kt:194)
	|_     Flux.collectList ⇢ at com.saveourtool.cosv.backend.service.CosvService$doProcess$1.invoke(CosvService.kt:199)
	|_         Mono.flatMap ⇢ at com.saveourtool.cosv.backend.service.CosvService$doProcess$1.invoke(CosvService.kt:200)
	*_____________Mono.then ⇢ at com.saveourtool.cosv.backend.service.CosvService$doProcess$1$4.invoke(CosvService.kt:197)
Original Stack Trace:
		at kotlinx.serialization.json.internal.JsonNamesMapKt.getJsonNameIndexOrThrow(JsonNamesMap.kt:107)
		at kotlinx.serialization.json.internal.JsonNamesMapKt.getJsonNameIndexOrThrow$default(JsonNamesMap.kt:104)
		at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedEnum(TreeJsonDecoder.kt:87)
		at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeTaggedEnum(TreeJsonDecoder.kt:36)
		at kotlinx.serialization.internal.TaggedDecoder.decodeEnum(Tagged.kt:233)

Depends on:

@0x6675636b796f75676974687562 0x6675636b796f75676974687562 changed the title com.saveourtool.osv4k.SeverityType does not contain element with name 'CVSS_V4' SeverityType does not contain element with name CVSS_V4 Nov 8, 2024
@0x6675636b796f75676974687562 0x6675636b796f75676974687562 added bug Something isn't working good first issue Good for newcomers labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant