Feat: Add sbom_enabled and grype_enabled toggles - #45
Merged
ModeSevenIndustrialSolutions merged 1 commit intoSep 1, 2026
Conversation
ModeSevenIndustrialSolutions
requested review from
a team
and
a balanced review from Copilot
September 1, 2026 11:54
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
September 1, 2026 11:55
View session
There was a problem hiding this comment.
🟢 Approval recommended
Pull request overview
Adds opt-out controls for SBOM generation and Grype scanning while preserving existing default behavior.
Changes:
- Adds default-enabled
sbom_enabledandgrype_enabledinputs. - Applies each toggle only to its corresponding job.
- Documents both inputs in Maven and Gradle examples.
File summaries
| File | Description |
|---|---|
.github/workflows/maven-build-test.yaml |
Adds and applies Maven security-job toggles. |
.github/workflows/gradle-build-test.yaml |
Adds and applies Gradle security-job toggles. |
examples/maven/build-test/github.yaml |
Documents Maven caller options. |
examples/gradle/build-test/github.yaml |
Documents Gradle caller options. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
September 1, 2026 11:58
View session
The Maven and Gradle lanes ran SBOM generation and the Grype scan unconditionally, with no way for a caller to opt out. Every other workflow family exposes at least sbom_enabled, so a project moving between families met an inconsistent contract. Add sbom_enabled and grype_enabled (both boolean, default true). grype_enabled is independent of sbom_enabled, so the SBOM is still generated and uploaded when only the scan is dropped. The SBOM job's condition also guards the tests job, so the new clause is anchored on the SBOM job's own explanatory comment to leave the tests gate untouched. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
force-pushed
the
feat/add-sbom-grype-toggles
branch
from
September 1, 2026 12:27
d3f1337 to
87cdab5
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
September 1, 2026 12:28
View session
zxiiro
approved these changes
Sep 1, 2026
zxiiro
left a comment
There was a problem hiding this comment.
🤖 Auto-approved by agent: reviewed workflow/code change for security and CI/CD impact, found low risk. Adds additive sbom_enabled and grype_enabled inputs defaulting to true on Gradle/Maven workflows. Existing callers keep current scan behavior; no permission or pin changes.
ModeSevenIndustrialSolutions
merged commit Sep 1, 2026
7606cb0
into
lfreleng-actions:main
11 checks passed
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.
Summary
Adds
sbom_enabledandgrype_enabled(both boolean,default: true) to the Maven and Gradle lanes.Why
java-workflowswas the outlier: it ran SBOM generation and the Grype scan unconditionally, with no opt-out at all. Python, Go and Node all exposesbom_enabled, so a project moving between families met an inconsistent contract.The two inputs are independent by design. With
grype_enabled: falsethe SBOM is still generated and uploaded assbom-files; only the scan is skipped. That ordering matters — SBOM generation is what we want on by default, and coupling the two would have meant dropping the SBOM to escape a blocking CVE.A subtlety worth reviewing
Both lanes share this condition between two jobs —
testsandsbom:Only the
sbomjob should gain thesbom_enabledclause. The edit is therefore anchored on the SBOM job's own explanatory comment ("…even when the build fails (for example on a test failure)") rather than on the condition text. Verified afterwards that thetestsgate is unchanged in both files:The deliberate
!= 'skipped'semantics are preserved: the SBOM job keeps producing the dependency-scan signal even when the build fails, because it does its own checkout and does not consume build artefacts.Compatibility
default: true— no existing caller changes behaviour. No inputs removed or renamed. Nothing in either lane depends on thesbomorgrypejob results, so a skipped job cannot strand anything downstream.Not in scope
java-workflowsalso has no dependency-audit job, unlike thepip-audit/govulncheck/npm auditlanes elsewhere. That is a real coverage gap but a separate piece of work, and I am raising it as its own issue rather than smuggling it in here.Validation
yamllint,actionlint— cleanzizmor— no findingsprek runover the changed files — all hooks passedContext
Part of a seven-PR series standardising these toggles across the workflow estate. Companions: lfreleng-actions/workflows-template#56, lfreleng-actions/python-workflows#85, lfreleng-actions/go-workflows#67, lfreleng-actions/node-workflows#83.