fix(release): SBOM step conflicts with .[all] extras — install base only#39
Merged
Conversation
Failure fingerprint from run 29865374542:
ModuleNotFoundError: No module named 'cyclonedx.builder'
File ".../cyclonedx_py/_internal/utils/cdx.py", line 27
from cyclonedx.builder.this import this_component as lib_component
Chain of events in the failing job:
1. Step "pip install build twine cyclonedx-bom" installs
cyclonedx-python-lib 11.11.0 (dep of cyclonedx-bom v7).
2. Step "Generate CycloneDX SBOM" runs "pip install -e '.[all]'",
which pulls in checkov, which pins cyclonedx-python-lib>=5,<8.
pip *downgrades* the lib to 7.6.2 to satisfy checkov.
3. cyclonedx-py then imports cyclonedx.builder which was removed
between lib 8 and 11 — crash.
This bug has silently broken every release since April 2026 (v0.4.0
run 24622455355 fails identically). No SBOM has ever attached to a
GitHub Release for this project.
Fix: generate the SBOM against the base install only. The SBOM
should describe what "pip install iac-scanner" gives an end user;
optional extras (checkov, ollama, mcp) are separate opt-in dep trees.
Base install has zero SBOM/cyclonedx-lib conflicts.
Verified locally with the exact CI sequence: base .[all] downgrade no
longer occurs, cyclonedx-py environment succeeds, produces valid
CycloneDX 1.6 JSON.
Signed-off-by: alphacrack <18480504+alphacrack@users.noreply.github.com>
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.
What
One-line change to
.github/workflows/publish-pypi.yml: the SBOM step now runspip install -e "."instead ofpip install -e ".[all]".Why
The v0.5.0 publish attempt failed at the SBOM step:
Chain of events:
pip install build twine cyclonedx-bominstallscyclonedx-python-lib==11.11.0(dep of cyclonedx-bom v7).pip install -e ".[all]"pulls incheckov, which pinscyclonedx-python-lib>=5,<8. pip downgrades the lib to 7.6.2.cyclonedx-py environmentthen crashes becausecyclonedx.builderwas removed between lib 8 and 11.This has silently broken every release since v0.4.0 (April 2026). Confirmed by re-inspecting run 24622455355 — same fingerprint.
Why this fix over alternatives
.[all]— doesn't help: checkov's<8pin blocks lib>=8, and cyclonedx-bom v7 requires >=8. Hard conflict, not resolver order.pip install iac-scannergives an end user; optional extras have their own dep trees. Cleanest.What lands in the SBOM
Before this PR: + + + +
| | ___ | | _______ __
/ _| ' \ / _ / | |/ / _ \ \ / /
| (| | | | / (| < () \ V /
_|| ||_|_||____/ _/
By Prisma Cloud | version: 3.2.524
Update available 3.2.524 -> 3.3.8
Run pip3 install -U checkov to update + + (everything from ).
After this PR: + + + (default install). Users who install
iac-scanner[rules]etc. get the checkov dep tree in their own env; if they need an SBOM for that superset they should generate it locally.Verified
Ran the exact CI sequence locally on Python 3.12:
Under the
.[all]version this raisedModuleNotFoundError.Next steps
Once merged, I will:
v0.5.0(nothing was published anywhere yet — safe).v0.5.0on the new main tip (now with this fix reachable).release.ymlre-creates the Release → I manually dispatchpublish-pypi.ymlonv0.5.0.releaseenv for @alphacrack approval → PyPI upload + Sigstore + SBOM attached to Release.Related
Checklist