Repository navigation
feat(stack): warn on LLVM-family site-layer packages and write a backport list - #11
Merged
Merged
Conversation
…ite layer A foss universe cannot see lfoss, lompi, lfbf, or llvm-compilers. The baseline drops an easystack entry on one of those toolchains. The stack diff then classifies the foss build of the same name as added. The solve prints that on standard error and still exits 0. Keep one lock per toolchain family, or pass `--baseline-also-toolchain` for that family.
The `component-reach` (schema 2) and `rebuild-set` (schema 5) outputs record cross-user, network-facing, local-only, not-reachable, or unclassified. The `stack sbom --backport-list` option writes the modules whose class justifies a backport, using Open Source Vulnerabilities (OSV) ranges and the software bill of materials (SBOM) reverse closure. Modules classed local-only, not-reachable, or unclassified stay in the recorded section.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproducer
The fixture stack has seven modules, and two of them justify a backport:
What and why
U6, LLVM-family site-layer warning.
A foss universe can't see
lfoss,lompi,lfbforllvm-compilers.The baseline drops an easystack entry on one of those toolchains.
The stack diff then marks the foss build of the same name as added, so it ends up in the site layer by mistake.
stack solvenow prints a warning on standard error for that case and still exits 0.The fix is one lock per toolchain family, or
--baseline-also-toolchainfor that family.A version bump, where the foss solve didn't add the name, stays quiet.
U8, reach classes and the backport list.
The
component-reach(schema 2) andrebuild-set(schema 5) outputs now record a reach class.The classes are
cross-user,network-facing,local-only,not-reachableandunclassified.Only
cross-userandnetwork-facingjustify a backport.stack sbom --backport-listwrites those modules for a stack lock.It uses Open Source Vulnerabilities (OSV) ranges and the reverse closure of the software bill of materials (SBOM).
The other classes stay in the recorded section of the list.
The
eb_stack_sbomtool takes the same arguments, and the tool count stays at 50.The package-identity test rejects a production comment that names an easyconfig.
The comment on the warning named one, and now it doesn't.
The integration job now runs
--test family_site_layer.Before and after
Each command runs from the repository root.
stack solveBefore, the solve exits 0 and prints only the missing entry on standard error:
After, the solve still exits 0 with 5 packages in the lock, and it adds the warning:
component-reacheb-stack component-reach \ --component curl \ --version '>=8,<9' \ --generation 2026.1 \ --easyconfigs tests/component_reach_recorded \ --generated-at 2026-10-24T00:00:00Z \ --out-dir /tmp/component-curlThe two runs wrote to separate
/tmp/beforeand/tmp/afterdirectories.Before:
After:
rebuild-setThe summary line is the same before and after.
Before,
rebuild-set.mdended at the paragraph that starts "That comparison can go wrong".After, that paragraph is followed by:
stack sbom --backport-listBefore, the flag didn't exist.
After, the reproducer above exits 0.
The list has
notebook/7.4.0-GCCcore-15.2.0(cross-user, blast radius 1, fixed in 7.5.0).It also has
cURL/8.17.0-GCCcore-15.2.0(network-facing, blast radius 2 because git depends on cURL, fixed in 8.18.0).The recorded section has zlib as
local-only, WinOnly asnot-reachableand Mystery asunclassified.Tests
Each check below passes on the tip.
Tests, fmt, clippy and the llms check also ran on the U6 commit.
Sphinx ran on the tip only.
cargo test --locked --all-targetsscripts/gen-llms-txt.py --checkcargo clippy --locked --all-targets -- -D warningssphinx-build -Wbuild succeeded.cargo fmt --checkTen ignored tests need the pinned EasyBuild trees from
scripts/fetch-upstream-trees.sh.Four test files cover the new behavior:
tests/family_site_layer.rs,tests/backport_list.rs,tests/component_reach.rsandtests/rebuild_set.rs.CI pending.
The backport tests use the cached advisories in
tests/backport_fixtures/osv, and none of them call the live OSV API.Repro
Note
Medium Risk
Changes stack solve stderr behavior, bumps JSON schema versions for rebuild-set and component-reach, and adds advisory-driven backport classification that operators may rely on for security decisions.
Overview
Adds security reach classification and a backport list path, plus a foss solve guardrail when LLVM-family packages look like mistaken site-layer adds.
stack solvenow emits a stderr warning (still exit 0) when a foss baseline easystack names an LLVM-family recipe (lfoss,lompi,lfbf,llvm-compilers) and the stack diff marks that package added—because the foss universe cannot see that family. Docs steer operators toward one lock per toolchain family or--baseline-also-toolchain.component-reach(schema 2) andrebuild-set(schema 5) record reach classes (cross-user,network-facing,local-only,not-reachable,unclassified); summaries and markdown now exposereach=/ per-file reach sections. Onlycross-userand `network-facing justify a backport.stack sbom --backport-list(andeb_stack_sbom) match locked modules to OSV via--cveor--osv-cache, optional--reachability, compute blast radius from SBOM reverse closure, and write markdown plus sibling JSON. CI addsbackport_listandfamily_site_layerintegration tests with fixtures undertests/backport_fixtures/.Reviewed by Cursor Bugbot for commit f081fe6. Bugbot is set up for automated code reviews on this repo. Configure here.