package ocaml-sbom

All checked builds pass
  1. Overview
  2. Docs
SBOM generator for OCaml projects

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-sbom-0.1.0.tbz
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

CircleCI

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 (.opam or .opam.locked files)
  • 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-sbom

To 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 --verbose

An 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.6

or

$ ocaml-sbom export myproject.ocaml-sbom -o myproject.spdx --format spdx-3.0

Dev Dependencies (3)

  1. odoc with-doc
  2. testo >= "0.5.0" & with-test
  3. ocamlformat >= "0.28.0" & < "0.29.0" & with-dev-setup

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building ocaml-sbom with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.1.0 (this version) n/a n/a good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure