Skip to content

Commit 81cfdbc

Browse files
authored
fix: ScoreMethod.CVSSV31 serialization (CycloneDX#261)
CVSSv3.1 was used instead of the correct CVSSv31 Signed-off-by: Bálint József Jánvári <[email protected]>
1 parent fde870a commit 81cfdbc

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/CycloneDX.Core/Json/Converters/ScoreMethodConverter.cs

-4
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ public override void Write(
6161
{
6262
writer.WriteStringValue("other");
6363
}
64-
else if (value == ScoreMethod.CVSSV31)
65-
{
66-
writer.WriteStringValue("CVSSv3.1");
67-
}
6864
else if (value.ToString().StartsWith("CVSSV"))
6965
{
7066
writer.WriteStringValue("CVSSv" + value.ToString().Substring(5));

src/CycloneDX.Core/Models/Vulnerabilities/ScoreMethod.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public enum ScoreMethod
3030
CVSSV2,
3131
[XmlEnum(Name = "CVSSv3")]
3232
CVSSV3,
33-
[XmlEnum(Name = "CVSSv3.1")]
33+
[XmlEnum(Name = "CVSSv31")]
3434
CVSSV31,
3535
[XmlEnum(Name = "OWASP")]
3636
OWASP,

0 commit comments

Comments
 (0)