Skip to content

Commit

Permalink
chore: uploads sbom as artifact (contentauth/c2patool#293)
Browse files Browse the repository at this point in the history
Co-authored-by: Dylan Ross <[email protected]>
  • Loading branch information
dyro and Dylan Ross authored Nov 20, 2024
1 parent 78f9f76 commit 322dddf
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/publish-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
rust_version: [stable]
experimental: [false]
os: [ macos-latest, ubuntu-latest, windows-latest ]
rust_version: [ stable ]
experimental: [ false ]
include:
- os: macos-latest
artifact_name: c2patool_mac_universal.zip
Expand All @@ -152,6 +152,12 @@ jobs:
toolchain: ${{ matrix.rust_version }}
components: llvm-tools-preview

- name: Install cargo-sbom
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-sbom
version: '0.9.1'

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

Expand All @@ -166,3 +172,16 @@ jobs:
asset_name: ${{ matrix.uploaded_asset_name }}
tag: ${{ needs.repo-prep.outputs.new-tag }}
overwrite: true

- name: Generate SBOM
run: cargo sbom > c2patool.${{ matrix.os }}.sbom.json

- name: Upload SBOM to Github
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: c2patool.${{ matrix.os }}.sbom.json
asset_name: c2patool-${{ needs.repo-prep.outputs.new-tag }}-sbom.json
tag: ${{ needs.repo-prep.outputs.new-tag }}
overwrite: true

4 changes: 2 additions & 2 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ version = "0.9.12"

description = "Tool for displaying and creating C2PA manifests."
authors = [
"Gavin Peacock <[email protected]>",
"Maurice Fisher <[email protected]>",
"Gavin Peacock <[email protected]>",
"Maurice Fisher <[email protected]>",
]
license = "MIT OR Apache-2.0"
documentation = "https://opensource.contentauthenticity.org/docs/c2patool"
Expand All @@ -23,10 +23,10 @@ repository = "https://github.com/contentauth/c2patool"
[dependencies]
anyhow = "1.0"
c2pa = { version = "0.37.0", features = [
"fetch_remote_manifests",
"file_io",
"add_thumbnails",
"pdf",
"fetch_remote_manifests",
"file_io",
"add_thumbnails",
"pdf",
] }
clap = { version = "4.5.10", features = ["derive", "env"] }
env_logger = "0.11.4"
Expand Down
1 change: 1 addition & 0 deletions cli/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ yanked = "deny"
ignore = [
"RUSTSEC-2021-0127", # serde_cbor
"RUSTSEC-2023-0071", # rsa Marvin Attack: (https://jira.corp.adobe.com/browse/CAI-5104)
"RUSTSEC-2024-0384", # instant (https://github.com/contentauth/c2pa-rs/issues/663)
]
# Deny multiple versions unless explicitly skipped.
[bans]
Expand Down

0 comments on commit 322dddf

Please sign in to comment.