Skip to content

Docs: Record why the Go SBOM stays on cyclonedx-gomod - #115

Merged
ModeSevenIndustrialSolutions merged 3 commits into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:docs/go-sbom-generator
Sep 29, 2026
Merged

ModeSevenIndustrialSolutions merged 3 commits into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:docs/go-sbom-generator

Conversation

@ModeSevenIndustrialSolutions

@ModeSevenIndustrialSolutions ModeSevenIndustrialSolutions commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Settles #39 and #40 with evidence, recorded as BRIEF decision D25, in three atomic commits:

  1. Docs: record D25 in docs/BRIEF.md.
  2. Chore: repin maven-xml-settings-action to v0.1.1. See below.
  3. Docs: describe sbom as permanently Go-only in sonatype-lifecycle.yaml (Copilot round 1).

None of them touches a file #114 changes, so the two merge in either order.

Closes #39.
Closes #40.

The question

#39 asked whether Nexus IQ identifies components from syft-generated CycloneDX as well as from cyclonedx-gomod. #40, generalising scan_mode: 'sbom' to every ecosystem through sbom-action, rested entirely on that answer.

I'd held this back because #39's suggested method uploads SBOMs to the shared Nexus IQ server. The central question turned out to be answerable without any upload: Nexus IQ's component-details API looks components up by package URL and creates no application and no report.

Method

  • Generators at the exact versions each path runs: cyclonedx-gomod v1.10.0 (the lane's pin), and syft v1.51.1, which is the default of the anchore/sbom-action/download-syft step that sbom-action v0.2.0 pins. I read that default at the pinned commit, and checksum-verified the syft binary.
  • Two subjects: lfreleng-actions/test-go-project, and onap/policy-opa-pdp, the lane's one real sbom-mode caller, as Verify Nexus IQ ingestion of syft-generated CycloneDX SBOMs #39 recommends.
  • Invocations: each generator ran as its path runs it, including sbom-action's own syft scan dir:… -o [email protected].
  • Lookup: every Go package URL each generator emitted was looked up in Nexus IQ, verbatim and one at a time, so a rejected URL names itself.

Findings (policy-opa-pdp)

cyclonedx-gomod syft
Go modules reported 80 + root 103 + root
Of the 80 shared: identical identification, vulnerabilities and licences 80 / 80 80 / 80
Distinct vulnerabilities found 4 4 (the same four)
Modules outside the build and test graph 0 23 (4 unidentifiable)
Non-dependency components (GitHub Actions from .github/workflows) 0 17
Root module package URL …@v0.0.0-… no version, rejected by Nexus IQ with HTTP 400
Dependency edges 392 240
Root component the application the scanned directory

Identification is identical. That was #39's feared regression, and it didn't materialise. cyclonedx-gomod appends goos/goarch/type qualifiers and syft doesn't, but Nexus IQ echoes both back without them, so they don't affect matching.

Scope and graph are worse. syft reads go.sum, which is the over-reporting D23 moved the CLI path away from, and it adds CI actions to a CLM application. Its graph is also thinner, and direct-versus-transitive attribution rests on the graph.

Outcome

  • Verify Nexus IQ ingestion of syft-generated CycloneDX SBOMs #39: syft is not a like-for-like replacement for Go. Per the issue's own outcomes, keep the cyclonedx-gomod path. sbom-action has no cyclonedx-gomod backend (its cyclonedx backend drives the Maven and Gradle plugins), so there's nothing to switch to without building one.
  • Generalise the Nexus IQ SBOM upload path beyond Go #40: generalising has no remaining driver. It was proposed for "Python and Node.js projects wanting CLM coverage". Python now has a CLI path (D24), and Node.js projects already run the lane's CLI scan. The CLI path is also the better route, because sbom is fire-and-forget with no policy verdict. So sbom stays Go-only, and the validation rejecting it elsewhere becomes a standing restriction.

What I could not check, and why it doesn't change the answer

Three of #39's criteria need a real upload: how the Application Composition Report renders, upload-endpoint errors, and policy evaluation inside an application. I didn't upload anything to the shared server. Each of those could only confirm or worsen the result, because the scope and graph problems are independent of how the report displays them.

Recorded, not fixed

The lane runs cyclonedx-gomod mod without -test, so sbom mode omits the test-only modules D23 made the CLI path include. On the fixture, whose dependencies are all test-only, the SBOM names no dependency at all. Adding -test would change policy-opa-pdp's results (81 components → 82), and that project pinned sbom specifically to keep its results matching the Jenkins job it replaced. So it belongs with a change that project agrees to, not a silent default change.

The pin commit

v0.1.1 of maven-xml-settings-action was re-created on 2026-09-25 at 98f03c9, after the release it originally named failed. Both lanes still pinned 408eb05, the commit Dependabot bumped them to under the same tag on 2026-09-01, so their # v0.1.1 comments named a release the pinned code no longer was. gha-workflow-linter corrects that mismatch on any commit that stages a workflow file, so it had to land before the comment fix could.

Behaviour-neutral: between the two commits, action.yaml is unchanged. It has the same nine inputs, of which the lanes pass the same eight, and the same settings-content output they read. The 44 commits in between are release-workflow and repository housekeeping.

Validation

  • prek run --all-files — all hooks pass, including gha-workflow-linter, which no longer changes the pins
  • zizmor --persona auditor — 0 findings
  • tests/workflow-steps.sh — 69/69
  • gitlint — clean; commit signed with DCO sign-off

D20 left open whether sbom-action, which wraps syft, could replace
the lane's hand-installed cyclonedx-gomod, and so generalise
scan_mode 'sbom' to every ecosystem. It cannot for Go, and
generalising is not needed.

Checked with the exact generators each path would run:
cyclonedx-gomod v1.10.0, the lane's pin, and syft v1.51.1, the
default of the download-syft step sbom-action v0.2.0 pins. Both ran
on test-go-project and on onap/policy-opa-pdp, the lane's one real
sbom-mode caller, and every Go package URL each emitted was looked up
in Nexus IQ through its read-only component-details API, which
creates no application and no report.

Identification is identical: all 80 modules both generators report
for policy-opa-pdp are matched the same way, with the same
vulnerabilities and licences. cyclonedx-gomod's goos, goarch and type
qualifiers do not affect matching; Nexus IQ echoes the URLs without
them.

Scope is not. syft reads go.sum, reporting 23 more modules that are
in neither the build nor the test graph -- the over-reporting D23
moved the CLI path away from. It also catalogues the project's own
GitHub Actions as components, 17 of them, and names the root module
without a version, which Nexus IQ rejects with HTTP 400. Its
dependency graph is thinner: 240 edges against 392, under a root
that is the scanned directory rather than the application.

Generalising has no remaining driver. It was proposed for Python
and Node.js projects wanting CLM coverage; Python now has a CLI path
and Node.js projects already run the CLI scan, which can gate on
policy where an SBOM upload cannot. So sbom stays Go-only, and the
validation rejecting it elsewhere becomes a standing restriction.

Records, rather than fixes, that the sbom path omits test-only
dependencies the CLI path includes: adding -test would change
policy-opa-pdp's results, which it pinned sbom mode to keep stable.

Closes: lfreleng-actions#39
Closes: lfreleng-actions#40

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions requested review from a team and a balanced review from Copilot September 25, 2026 11:02
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 25, 2026

This comment was marked as resolved.

The v0.1.1 tag was re-created on 2026-09-25 at 98f03c9, after the
release it originally named failed. Both lanes still pinned 408eb05,
the commit Dependabot bumped them to under the same tag on
2026-09-01, so their '# v0.1.1' comments named a release the pinned
code no longer is. gha-workflow-linter corrects that mismatch on any
commit staging a workflow file.

Behaviour-neutral for both lanes. Between the two commits
action.yaml is unchanged: the same nine inputs, of which the lanes
pass the same eight, and the settings-content output they read. The
changes are release-workflow and repository housekeeping.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
Copilot review round 1.

D25 settles that scan_mode 'sbom' stays Go-only, but six places in
sonatype-lifecycle.yaml still described the restriction as
temporary, pointing at lfreleng-actions#39 or lfreleng-actions#40 to lift it: the header, the
scan_mode description, the go_sbom_tool_version note, two comments
in the scan_mode validation, and its error message. Reword each to
state the decision and cite D25, and drop the instructions to remove
the guard once lfreleng-actions#40 lands.

The error message loses 'currently' and names the way out: use
scan_mode 'cli' for other build types. tests/workflow-steps.sh
asserts on 'requires', which the new wording keeps.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Matthew Watkins <[email protected]>
Copilot AI review requested due to automatic review settings September 25, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The documentation is internally consistent, the Go-only restriction remains enforced and tested, and the new pin preserves the action implementation.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@zxiiro zxiiro left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved by agent: trivial change (dependency/docs/formatting only).

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit c60183d into lfreleng-actions:main Sep 29, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generalise the Nexus IQ SBOM upload path beyond Go Verify Nexus IQ ingestion of syft-generated CycloneDX SBOMs

3 participants