Skip to content

Generate license reports and SBOMs from build evidence (bom-tools 0.3.0) - #450

Merged
jadamcrain merged 4 commits into
mainfrom
sbom-from-build-evidence
Oct 9, 2026
Merged

jadamcrain merged 4 commits into
mainfrom
sbom-from-build-evidence

Conversation

@jadamcrain

@jadamcrain jadamcrain commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Replaces cargo cyclonedx + allow-list with bom-tools 0.3.0, which derives the third-party license reports and new CycloneDX 1.5 SBOMs from what each build actually compiled.

Why

The 1.7.0 third-party-licenses.txt came from cargo cyclonedx without feature flags, so it described the default features (ring), while Windows, macOS and the gnu Linux targets are built with tls-aws-lc: aws-lc-rs / aws-lc-sys ship but were never approved or listed.

What changes

  • Build jobs (Windows, macOS, Linux cross; FFI and JNI): each build runs through .github/scripts/build-evidence.sh, which does the build and records its evidence (cargo build log plus the full and runtime cargo tree) from the same arguments, and requires --target. macOS now builds with --target like the other platforms (copy and binding-test paths updated): without it cargo tree does not separate host and target features and the evidence cross-check fails.
  • Packaging: installs bom-tools pinned to --tag 0.3.0, generates third-party-licenses.txt / third-party-licenses-java.txt and dnp3-ffi.cdx.json / dnp3-ffi-java.cdx.json, and embeds each SBOM in its package next to the license report (C zip, .nupkg, .jar) via the existing --extra-files option.
  • Release: the draft GitHub release also attaches the two SBOMs, as a direct link. No other release job changes.
  • allowed.json: approve aws-lc-rs / aws-lc-sys (copyrights from their LICENSE file), review ring as Apache-2.0 AND ISC, add jobserver / pkg-config as build tools, move Step Function's MIT/Apache crates (rx509, scursor, sfio-rustls-config, oo-bindgen) to third_party, mark oo-bindgen, sfio-tokio-ffi, sfio-tracing-ffi as embedded (their code is copied into the product), drop workspace members, add commercial_license.

License audit: of the 95 shipped third-party crates, 89 are MIT; the remaining ones declare a single license with no standard alternative, except ring, now corrected. OpenSSL and Unicode-DFS-2016 drop out of the report; Apache-2.0 comes in (ring, aws-lc-sys).

Verified in CI

  • All 13 targets record evidence; packaging passes for dnp3-ffi and dnp3-ffi-java.
  • The SBOMs (155 and 167 components) validate with the CycloneDX CLI and the official 1.5 JSON schema; Trivy and OSV-Scanner parse them.
  • Each package contains its SBOM next to LICENSE.txt and the license report.

The SBOMs are a rollup of all platforms, matching the packages, which contain every platform's library.

Before merging

  • Review the copyright lines added for Step Function's crates (Copyright Step Function I/O LLC) and the commercial_license name.

Follow-ups

  • Bump xxhash-rust to 0.8.16 (GHSA-6g2r-675j-hx59, low), flagged by Trivy and OSV-Scanner on the new SBOM.

Replace cargo-cyclonedx and allow-list with bom-tools 0.3.0, which scopes
the third-party license reports and the new CycloneDX SBOMs to what each
build actually compiled.

cargo-cyclonedx described the default features, while most targets are
built with tls-aws-lc: the 1.7.0 reports listed ring and omitted
aws-lc-rs/aws-lc-sys.

- each build job records its evidence (cargo build log plus the full and
  runtime cargo tree) via .github/scripts/build-evidence.sh, which also
  does the build, so the arguments are defined once
- packaging runs bom-tools for dnp3-ffi and dnp3-ffi-java and uploads the
  SBOMs, which the GitHub release now attaches
- allowed.json: approve aws-lc-rs/aws-lc-sys, review ring as
  Apache-2.0 AND ISC, add jobserver/pkg-config as build tools, move Step
  Function's open-source crates to third_party, mark code-embedding build
  dependencies (oo-bindgen, sfio-tokio-ffi, sfio-tracing-ffi) as embedded,
  drop workspace members, add the commercial license
Without --target, cargo tree does not separate host and target features,
so on macOS it disagreed with the build log (tracing-core compiled with a
host-only feature set). Build macOS with --target like the other jobs, and
make build-evidence.sh refuse to run without it.
@jadamcrain
jadamcrain marked this pull request as ready for review October 9, 2026 22:21
@jadamcrain
jadamcrain merged commit 42abb67 into main Oct 9, 2026
33 checks passed
@jadamcrain
jadamcrain deleted the sbom-from-build-evidence branch October 9, 2026 22:24
jadamcrain added a commit to stepfunc/dnp3-no-serial that referenced this pull request Oct 9, 2026
…#8)

* Generate the license report and a CycloneDX SBOM with bom-tools 0.3.0

Same migration as stepfunc/dnp3#450: each build records its evidence with
upstream's build-evidence.sh, packaging runs bom-tools 0.3.0 for the
license report and the SBOM, the SBOM is embedded in the .nupkg and
attached to the release. The upstream ref is now a single DNP3_REF
variable.

* Release only when the upstream ref is the tag being released
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant