voteblake / csaf-rs

CSAF data types for Rust, building towards VEX support
MIT License
0 stars 5 forks source link

Parsing a document might panic #27

Open ctron opened 6 months ago

ctron commented 6 months ago

Having a vector string with an unknown metric might panic. It should report an error instead:

You should not have been able to construct a cvss_json::Cvss3 except from a cvss::v3::Base which should always have a valid vector string: UnknownMetric { name: "E" }

I think the cause for this is: https://github.com/voteblake/csaf-rs/blob/76cb9ede10adb1fbb495b17e5fd8d95c5cf6c900/src/vulnerability.rs#L216-L221