Repository navigation
feat(shorebird): build-time CycloneDX SBOMs for engine artifacts built into apps - #393
Conversation
…t into apps Adds shorebird/sbom (collect in each shard, emit once after), SBOM specs on the 14 artifacts built into apps in shorebird/ci, and a --package_licenses_path flag to licenses_cpp so SBOM components get SPDX ids from Flutter's own license scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adversarial review (agent)Reviewed at 8fcdf38. What I checked and found correct. I generated a toy
The five GN roots exist and are Blockers
Nits
|
Unique release bom-ref; fork subpaths include engine/src; Dart and Flutter fork ancestors; cargo '/' licenses as OR; rust-std component; JSON control characters; git identity for licenses_cpp tests; harfbuzz, ISC and BSD mappings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. Fixed in 849b53c (plus 08fea56 for
Not changing now: 6 (data_deps: runtime files, none third-party linked code in these roots; the test build will show it), 9 (secondary licenses carry no matcher; a handful of packages), 11 (per-package licenses are what the design chose; per-file would need licenses_cpp to scan per artifact), 12 (a renamed root fails the shard loudly in _build_engine), 13 (the embedding's Maven deps are declared in its pom, which Gradle resolves; adding them is a follow-up if customers ask). |
|
lgtm |
CI sets CARGO_TERM_COLOR=always, so the (*) dedupe marker came out wrapped in ANSI codes and leaked into crate license fields (seen in the _build_engine test build 46786597836). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test build 46786597836 at 849b53c (shards linux/android-arm64, linux/host, macos/ios): collect ran in every shard. I ran One bug came up: CI sets Note: the |
|
lgtm |
Why
The standard way, and where this departs
pkg:github, and updater crates getpkg:cargo.pedigree.ancestor, found byci/scan_deps.py's resolver, the same one our weekly OSV scan uses.licenses_cppgets a--package_licenses_pathflag that writes which matchers matched each package.spdx_ids.jsonmaps those matchers to SPDX ids; a matcher with no clear SPDX id becomes aLicenseRef.What changes
shorebird/sbom/sbom.py collectruns in a shard after ninja.gn gen --ide=json's target graph from each spec's roots, following only targets linked in the target toolchain, so build tools (flatc, gen_snapshot host builds) and actions' deps stay out.licenses_cppdoes, maps each file to its DEPS checkout, and lists the updater's crates withcargo tree -e normal,no-proc-macrofor the action's Rust target.sbom.py emitruns once after all shards. It writes<artifact>.cdx.jsonfor each artifact with ansbomlist, plusshorebird/<engine>/sbom.cdx.json.shorebird/ci/shards/*.jsonandcompose.json:flutter_shell_native,create_flutter_framework_dylib,flutter_framework_dylib,flutter_linux_gtkandflutter_windows.paths:sky_engine, the patched SDK and the Windows client wrapper.shard_runnerignores the new keys until PR 2.licenses_cpp: an additive flag and one new test. CI now builds and runslicenses_cpp_testrunnerinshorebird_engine_tests.yml.shorebird_sbom.ymlrunssbom_test.py. The tests cover the walk, the package naming, the DEPS mapping, purls and licenses, and check that every artifact'ssbomnames a spec.Upstream merge cost
tools/licenses_cpp/src(main.cc,license_checker.{cc,h}, and an appended test). Eric OK'd the edit in the design review.LicenseMap::Add, and a writer. Upstream's LICENSE output is unchanged.What could go wrong
-f shards=linux/android-arm64,macos/ios, publishes nothing) will show the real component lists before anything ships, and I'll check them against the design's expectations.LicenseRef.licenses_cppbehaviour change: none without the new flag. Its tests run in CI now.Landing
now. It's inert until _build_engine calls it (PR 2), so it can land once reviewed and green.Screenshots
No visible change: build scripts and CI only.
🤖 Generated with Claude Code