Struct CveParameters

Source
pub struct CveParameters {
Show 19 fields pub cpe_name: Option<String>, pub cve_id: Option<String>, pub cvss_v2_metrics: Option<String>, pub cvss_v2_severity: Option<SeverityTypeV2>, pub cvss_v3_metrics: Option<String>, pub cvss_v3_severity: Option<SeverityType>, pub cwe_id: Option<String>, pub has_cert_alerts: Option<bool>, pub has_cert_notes: Option<bool>, pub has_kev: Option<bool>, pub has_oval: Option<bool>, pub is_vulnerable: Option<bool>, pub keyword: Option<Keyword>, pub last_mod: Option<LastModDate>, pub no_rejected: Option<bool>, pub pub_date: Option<PubDate>, pub limit_offset: Option<LimitOffset>, pub source_identifier: Option<String>, pub virtual_match: Option<VirtualMatch>,
}
Expand description

The CVE API is used to easily retrieve information on a single CVE or a collection of CVE from the NVD. The NVD contains 232,639 CVE records. Because of this, its APIs enforce offset-based pagination to answer requests for large collections. Through a series of smaller “chunked” responses controlled by an offset startIndex and a page limit resultsPerPage users may page through all the CVE in the NVD.

The URL stem for retrieving CVE information is shown below.

Fields§

§cpe_name: Option<String>

This parameter returns all CVE associated with a specific CPE. The exact value provided with cpeName is compared against the CPE Match Criteria within a CVE applicability statement. If the value of cpeName is considered to match, the CVE is included in the results.

§cve_id: Option<String>

This parameter returns a specific vulnerability identified by its unique Common Vulnerabilities and Exposures identifier (the CVE ID). cveId will not accept {CVE-ID} for vulnerabilities not yet published in the NVD.

§cvss_v2_metrics: Option<String>

This parameter returns only the CVEs that match the provided {CVSSv2 vector string}. Either full or partial vector strings may be used. This parameter cannot be used in requests that include cvssV3Metrics.

§cvss_v2_severity: Option<SeverityTypeV2>

This parameter returns only the CVEs that match the provided CVSSv2 qualitative severity rating. This parameter cannot be used in requests that include cvssV3Severity.

§cvss_v3_metrics: Option<String>

This parameter returns only the CVEs that match the provided {CVSSv3 vector string}. Either full or partial vector strings may be used. This parameter cannot be used in requests that include cvssV2Metrics.

§cvss_v3_severity: Option<SeverityType>

This parameter returns only the CVEs that match the provided CVSSv3 qualitative severity rating. This parameter cannot be used in requests that include cvssV2Severity. Note: The NVD will not contain CVSS v3 vector strings with a severity of NONE. This is why that severity is not an included option.

§cwe_id: Option<String>

This parameter returns only the CVE that include a weakness identified by Common Weakness Enumeration using the provided {CWE-ID}. Note: The NVD also makes use of two placeholder CWE-ID values NVD-CWE-Other and NVD-CWE-noinfo which can also be used.

§has_cert_alerts: Option<bool>

This parameter returns the CVE that contain a Technical Alert from US-CERT. Please note, this parameter is provided without a parameter value.

§has_cert_notes: Option<bool>

This parameter returns the CVE that contain a Vulnerability Note from CERT/CC. Please note, this parameter is provided without a parameter value.

§has_kev: Option<bool>

This parameter returns the CVE that appear in CISA’s Known Exploited Vulnerabilities (KEV) Catalog. Please note, this parameter is provided without a parameter value.

§has_oval: Option<bool>

This parameter returns the CVE that contain information from MITRE’s Open Vulnerability and Assessment Language (OVAL) before this transitioned to the Center for Internet Security (CIS). Please note, this parameter is provided without a parameter value.

§is_vulnerable: Option<bool>

This parameter returns only CVE associated with a specific CPE, where the CPE is also considered vulnerable. The exact value provided with cpeName is compared against the CPE Match Criteria within a CVE applicability statement. If the value of cpeName is considered to match, and is also considered vulnerable the CVE is included in the results.

§keyword: Option<Keyword>

keyword Keyword

§last_mod: Option<LastModDate>

last_mod LastModDate

§no_rejected: Option<bool>

By default, the CVE API includes CVE records with the REJECT or Rejected status. This parameter excludes CVE records with the REJECT or Rejected status from API response. Please note, this parameter is provided without a parameter value.

§pub_date: Option<PubDate>

pub_date PubDate

§limit_offset: Option<LimitOffset>

limit_offset LimitOffset

§source_identifier: Option<String>

This parameter returns CVE where the exact value of {sourceIdentifier} appears as a data source in the CVE record. The CVE API returns {sourceIdentifier} values within the descriptions object. The Source API returns detailed information on the organizations that provide the data contained in the NVD dataset, including every valid {sourceIdentifier} value.

§virtual_match: Option<VirtualMatch>

virtual_match VirtualMatch

Trait Implementations§

Source§

impl Clone for CveParameters

Source§

fn clone(&self) -> CveParameters

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CveParameters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CveParameters

Source§

fn default() -> CveParameters

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for CveParameters

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for CveParameters

Source§

fn eq(&self, other: &CveParameters) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for CveParameters

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for CveParameters

Source§

impl StructuralPartialEq for CveParameters

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,