libcnb_data/
sbom.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize)]
4pub enum SbomFormat {
5    /// Cyclone DX (JSON)
6    ///
7    /// See: <https://cyclonedx.org/>
8    #[serde(rename = "application/vnd.cyclonedx+json")]
9    CycloneDxJson,
10
11    /// SPDX (JSON)
12    ///
13    /// See: <https://spdx.dev/>
14    #[serde(rename = "application/spdx+json")]
15    SpdxJson,
16
17    /// Syft (JSON)
18    ///
19    /// See: <https://github.com/anchore/syft>
20    #[serde(rename = "application/vnd.syft+json")]
21    SyftJson,
22}
23
24/// All currently supported SBOM formats.
25pub const SBOM_FORMATS: &[SbomFormat] = &[
26    SbomFormat::CycloneDxJson,
27    SbomFormat::SpdxJson,
28    SbomFormat::SyftJson,
29];