Skip to content

Commit c82009b

Browse files
committed
fix: the adp container does only require the providerMetadata field
1 parent 79145a5 commit c82009b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/published.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,19 @@ pub struct AdpContainer {
309309
pub provider_metadata: ProviderMetadata,
310310

311311
/// If known, the date/time the vulnerability was disclosed publicly.
312+
#[serde(default, skip_serializing_if = "Option::is_none")]
312313
pub date_public: Option<Timestamp>,
313314

314315
/// A title, headline, or a brief phrase summarizing the information in an ADP container.
315316
#[serde(default, skip_serializing_if = "Option::is_none")]
316317
pub title: Option<String>,
317318

318319
/// A list of multi-lingual descriptions of the vulnerability. E.g., [PROBLEMTYPE] in [COMPONENT] in [VENDOR] [PRODUCT] [VERSION] on [PLATFORMS] allows [ATTACKER] to [IMPACT] via [VECTOR]. OR [COMPONENT] in [VENDOR] [PRODUCT] [VERSION] [ROOT CAUSE], which allows [ATTACKER] to [IMPACT] via [VECTOR].
320+
#[serde(default, skip_serializing_if = "Vec::is_empty")]
319321
pub descriptions: Vec<Description>,
320322

321323
/// List of affected products.
324+
#[serde(default, skip_serializing_if = "Vec::is_empty")]
322325
pub affected: Vec<Product>,
323326

324327
/// This is problem type information (e.g. CWE identifier). Must contain: At least one entry, can be text, OWASP, CWE, please note that while only one is required you can use more than one (or indeed all three) as long as they are correct). (CNA requirement: [PROBLEMTYPE]).

0 commit comments

Comments
 (0)