Skip to content

Commit

Permalink
fix: ScoreMethod.CVSSV31 serialization (#261)
Browse files Browse the repository at this point in the history
CVSSv3.1 was used instead of the correct CVSSv31

Signed-off-by: Bálint József Jánvári <4534880+dzsibi@users.noreply.github.com>
  • Loading branch information
dzsibi authored May 20, 2024
1 parent fde870a commit 81cfdbc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/CycloneDX.Core/Json/Converters/ScoreMethodConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ public override void Write(
{
writer.WriteStringValue("other");
}
else if (value == ScoreMethod.CVSSV31)
{
writer.WriteStringValue("CVSSv3.1");
}
else if (value.ToString().StartsWith("CVSSV"))
{
writer.WriteStringValue("CVSSv" + value.ToString().Substring(5));
Expand Down
2 changes: 1 addition & 1 deletion src/CycloneDX.Core/Models/Vulnerabilities/ScoreMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public enum ScoreMethod
CVSSV2,
[XmlEnum(Name = "CVSSv3")]
CVSSV3,
[XmlEnum(Name = "CVSSv3.1")]
[XmlEnum(Name = "CVSSv31")]
CVSSV31,
[XmlEnum(Name = "OWASP")]
OWASP,
Expand Down

0 comments on commit 81cfdbc

Please sign in to comment.