Fix: Give each lane its own SBOM artefact name - #31
Merged
tykeal merged 1 commit intoAug 25, 2026
Merged
Conversation
ModeSevenIndustrialSolutions
requested review from
a team
and
a balanced review from Copilot
August 25, 2026 18:02
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
August 25, 2026 18:03
View session
There was a problem hiding this comment.
Pull request overview
Prevents Maven and Gradle lanes from downloading each other’s SBOM artifacts.
Changes:
- Assigns lane-specific SBOM artifact names.
- Keeps each upload and download name aligned.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/maven-build-test.yaml |
Uses sbom-files-maven. |
.github/workflows/gradle-build-test.yaml |
Uses sbom-files-gradle. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The Maven and Gradle workflows both uploaded and downloaded an artefact named 'sbom-files'. A caller invoking both runs them in one workflow run, where they share a single artifact namespace. Duplicate names are permitted, so both uploads persisted as separate artifacts, but download-artifact resolves a name to the newest match: both Grype jobs pulled whichever lane happened to upload last. Two dispatches of the self-test showed the race directly: upstream main failed Maven and passed Gradle, while a branch run failed both, with the Gradle lane reporting maven-core and plexus-utils findings that belong to the Maven fixture rather than to the Gradle one. That run retained two 'sbom-files' artifacts, 3,472 and 148,503 bytes, and both jobs read the larger, later one. A lane that reports green having scanned the other lane's SBOM proves nothing about the lane it claims to cover, so name the artefact sbom-files-maven and sbom-files-gradle and keep each download in step with its upload. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
force-pushed
the
fix/sbom-artefact-name-collision
branch
from
August 25, 2026 18:11
42c11f8 to
6956708
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
August 25, 2026 18:11
View session
tykeal
approved these changes
Aug 25, 2026
This was referenced Aug 25, 2026
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.
Closes #30.
Problem
maven-build-test.yamlandgradle-build-test.yamlboth uploaded and downloaded an artefact named exactlysbom-files. A caller that invokes both — astesting.yamldoes — runs them in a single workflow run, where they share one artifact namespace.Duplicate artefact names are permitted, so both uploads persisted as separate artefacts. The ambiguity bites at download time:
download-artifactresolves a name to the newest matching artefact, so both Grype jobs pulled whichever lane happened to upload last.The failure mode is quiet and the wrong way round: a lane can report green having scanned the other lane's SBOM, proving nothing about the lane it claims to cover.
Evidence it was real
Two
workflow_dispatchruns of the same self-test, same fixtures and pins, differing only in run:main32874334329In the second, the Gradle lane's Grype output listed
maven-coreandplexus-utils— not dependencies of the Gradle fixture. It had scanned Maven's SBOM.That run's artefact list shows the mechanism plainly — two live artefacts sharing one name:
Both Grype jobs read the newer, larger one. (The same run also shows two
grype-scan-resultsartefacts, for the same reason.)Fix
Name the artefact per lane,
sbom-files-mavenandsbom-files-gradle, keeping each download in step with its upload. Four lines, plus a comment recording why the name must stay lane-specific so it does not regress.Verified
Self-test on this branch: 32880512411
Two distinct artefact IDs and sizes an order of magnitude apart: each lane now resolves its own SBOM, and Gradle reports "No vulnerabilities found" — matching the behaviour upstream showed when the race happened to fall its way.
The Maven lane still fails, and should: the placeholder fixture is
apache/maven3.9.9, carrying real CVEs (velocity 1.5,jetty 6.1.4,maven-core 2.0-SNAPSHOT). That is pre-existing fixture debt and the gate working, unchanged by this PR and unrelated to the collision.Scope note
This fixes collisions between the two lanes, which is what #30 describes and what was observed. It does not make a single lane safe against a caller matrixing it against itself (two legs of
maven-build-test.yamlin one run would still sharesbom-files-maven), because GitHub exposes no caller-leg discriminator to a called workflow.docker-workflowshandles that case by hashing the distinguishing inputs into abuild_idand suffixing artefact names with it; adopting the same pattern here would need a metadata output that java's job graph does not currently carry, so I have left it as a separate concern rather than widening this change.Validation
prek run --all-files— all hooks passzizmor --persona auditor .github/workflows/— no findingsaislop ci --changes --base upstream/main— 0 errors, 0 warnings