We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d66c8e4 commit cb9cd04Copy full SHA for cb9cd04
code/hsec-tools/src/Security/OSV.hs
@@ -171,10 +171,10 @@ instance FromJSON Severity where
171
$ typeMismatch "severity" (Object o)
172
173
instance ToJSON Severity where
174
- toJSON (Severity cvss) = object ["type" .= CVSS.cvssVectorString cvss, "score" .= score]
+ toJSON (Severity cvss) = object ["score" .= CVSS.cvssVectorString cvss, "type" .= typ]
175
where
176
- score :: Text
177
- score = case CVSS.cvssVersion cvss of
+ typ :: Text
+ typ = case CVSS.cvssVersion cvss of
178
CVSS.CVSS31 -> "CVSS_V3"
179
CVSS.CVSS30 -> "CVSS_V3"
180
CVSS.CVSS20 -> "CVSS_V2"
0 commit comments