Skip to main content

osv_db/types/
credit.rs

1use serde::Deserialize;
2
3/// A credit entry for a person or organization.
4#[derive(Debug, Clone, Deserialize)]
5pub struct Credit {
6    /// Name of the credited person or organization.
7    pub name: String,
8    /// Contact URIs or handles for the credited party.
9    #[serde(default)]
10    pub contact: Vec<String>,
11    /// The role this party played.
12    #[serde(rename = "type")]
13    pub credit_type: Option<CreditType>,
14}
15
16/// The role a credited party played in discovering or fixing the vulnerability.
17#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
18pub enum CreditType {
19    /// Discovered the vulnerability.
20    FINDER,
21    /// Reported the vulnerability to the affected vendor.
22    REPORTER,
23    /// Analyzed the vulnerability.
24    ANALYST,
25    /// Coordinated the disclosure.
26    COORDINATOR,
27    /// Developed the remediation.
28    #[serde(rename = "REMEDIATION_DEVELOPER")]
29    RemediationDeveloper,
30    /// Reviewed the remediation.
31    #[serde(rename = "REMEDIATION_REVIEWER")]
32    RemediationReviewer,
33    /// Verified the remediation.
34    #[serde(rename = "REMEDIATION_VERIFIER")]
35    RemediationVerifier,
36    /// A tool used in the process.
37    TOOL,
38    /// Sponsored the work.
39    SPONSOR,
40    /// Any other role.
41    OTHER,
42}