Skip to content

Instantly share code, notes, and snippets.

@yoshuawuyts
Created March 12, 2025 16:26
Show Gist options
  • Save yoshuawuyts/3522875ba0f0acaec4a036fe542c4ee2 to your computer and use it in GitHub Desktop.
Save yoshuawuyts/3522875ba0f0acaec4a036fe542c4ee2 to your computer and use it in GitHub Desktop.
# install dependencies
cargo install wasm-tools auditable2cdx wkg
# fetch the Rust http sample
wkg oci pull ghcr.io/bytecodealliance/sample-wasi-http-rust/sample-wasi-http-rust:latest -o sample.wasm
ls
# print the metadata, including all dependencies
wasm-tools metadata show sample.wasm | less
# extract the SBOM from the binary
auditable2cdx sample.wasm >> sample-sbom.json
jq -C < sample-sbom.json | less -Rr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment