package ocaml-sbom
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=d69eed985a844bb32d2c5584e6bd7cf7d057acaab04cc5105e6b43236c259483
sha512=6a184c0c3926970d691f17f5c980a49b2cad6d1a2e2884b3d68c3489d2fbf6789ea18e040208406baaa5af5cee9bb095c18ea6cff537dddec30c9d06233e1f09
Description
ocaml-sbom is an SBOM generator for OCaml projects with export to CycloneDX and SPDX.
Added to opam-repository:
README
SBOM generator for OCaml projects
ocaml-sbom is an SBOM generator for OCaml projects or subprojects that use the Opam package manager.
Features
- Runs without installing the dependencies of the target project
- Produces a graph of all Opam dependencies
- Provides licensing information
- Works with or without lockfiles (
.opamor.opam.lockedfiles) - Supports manual corrections via an overlay file
- Exports to CycloneDX and to SPDX (2.3 and 3.0)
- Warns against possible non-opam components found in the project
Installation
Opam (>= 2.2.0) is required to build ocaml-sbom from source. Build it and install it with (coming soon!)
$ opam install ocaml-sbomTo run ocaml-sbom, you'll need opam even if you obtained a pre-built ocaml-sbom executable. However, you only need the bare opam command. No need to install an OCaml compiler or any Opam packages.
Usage
The target project must ship with one or several Opam files. These are typically placed at the project root and have the .opam extension. Lockfiles may be present. They have the .opam.locked extension and are picked up automatically by ocaml-sbom. The tool provides options to require or to ignore lockfiles, see ocaml-sbom --help.
First, generate the SBOM in ocaml-sbom's internal format. This may take a few minutes:
$ ocaml-sbom -o myproject.ocaml-sbom --verboseAn overlay file named ocaml-sbom.overlay.json is used if present. Its format is specified by https://github.com/LexiFi/ocaml-sbom/blob/main/lib/types/ocaml_sbom_overlay.atd. See ocaml-sbom overlay --help for examples.
Then export to your preferred SBOM format:
$ ocaml-sbom export myproject.ocaml-sbom -o myproject.cdx --format cyclonedx-1.6or
$ ocaml-sbom export myproject.ocaml-sbom -o myproject.spdx --format spdx-3.0
Dependencies (10)
- uuidm
-
spdx_licenses
>= "1.4.0" - sexplib0
- parsexp
- opam-format
- fpath
- cmdliner
-
atdml
build -
ocaml
>= "5.1.0" -
dune
>= "3.18"
Dev Dependencies (3)
-
odoc
with-doc -
testo
>= "0.5.0" & with-test -
ocamlformat
>= "0.28.0" & < "0.29.0" & with-dev-setup
Used by
None
Conflicts
None