Skip to content

feat(action): add sbom input so SPDX output is reachable from the GitHub Action - #1099

Open
Ayush7614 wants to merge 1 commit into
OWASP:mainfrom
Ayush7614:feature/action-sbom-input-1078
Open

feat(action): add sbom input so SPDX output is reachable from the GitHub Action#1099
Ayush7614 wants to merge 1 commit into
OWASP:mainfrom
Ayush7614:feature/action-sbom-input-1078

Conversation

@Ayush7614

Copy link
Copy Markdown
Collaborator

Closes #1078.

Summary

The CLI supports --sbom cyclonedx|spdx but the GitHub Action only exposed the legacy cdx boolean, so SPDX 2.3 SBOMs were unreachable in CI.

Changes

  • New sbom input (cyclonedx|spdx, case-insensitive, cdx/spdx2.3 aliases). Takes precedence over cdx.
  • New sbom-inventory-only input wired to --sbom-inventory-only (warns when no SBOM output is enabled).
  • cdx kept as deprecated fallback (elif), so existing workflows keep working and setting both does not emit two SBOM flags.
  • Unknown sbom values fail fast with ::error:: instead of silently scanning without an SBOM.
  • Docs updated in website/docs/github-action.md.

Verification

  • tests/github-action.test.ts: 7 tests pass (new: sbom wiring, cdx fallback precedence, invalid-format rejection, inventory-only, alias normalization).
  • npm run build passes; action.yml parses as valid YAML.

…Hub Action

Closes OWASP#1078.

The CLI supports --sbom cyclonedx|spdx but the Action only exposed the
legacy cdx boolean, so SPDX SBOMs were unreachable in CI. This adds a
first-class sbom input (cyclonedx|spdx, case-insensitive, with cdx/spdx2.3
aliases) plus sbom-inventory-only, keeps cdx as a deprecated fallback
(sbom wins when both are set), and fails fast on unknown formats instead
of silently scanning without an SBOM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(action): add sbom input so SPDX output is reachable from the GitHub Action

1 participant