Skip to content

Commit

Permalink
feat: add support for additional cyclonedx fields
Browse files Browse the repository at this point in the history
  • Loading branch information
psastras committed Jul 10, 2023
1 parent 4b5ab18 commit a05b247
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cargo-sbom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ serde-cyclonedx = { path = "../serde-cyclonedx", version = "0.8.2" }
serde-spdx = { path = "../serde-spdx", version = "0.8.2" }
serde_json = "1.0.99"
spdx = "0.10.1"
whoami = "1.4.1"

[[bin]]
name = "cargo-sbom"
Expand Down
6 changes: 6 additions & 0 deletions cargo-sbom/src/util/cyclonedx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ pub fn convert(
.version(built_info::PKG_VERSION)
.build()?,
])
.authors(vec![serde_cyclonedx::cyclonedx::v_1_4::OrganizationalContactBuilder::default().name(whoami::realname()).build()?])
.timestamp(
chrono::Utc::now()
.format("%Y-%m-%dT%H:%M:%S%.3fZ")
.to_string(),
)
.build()?,
)
.bom_format("CycloneDX")
Expand Down

0 comments on commit a05b247

Please sign in to comment.