Skip to content

Releases: SBOM is never attached and main SBOMs aren't publicly consumable #4507

Closed

Description

@ayshushus

After #4393 release process automation, neither trigger in .github/workflows/sbom.yml produces a consumable SBOM.

Something must start an SBOM run once the automated release exists and the SBOM must end up as a release asset. Also note that calling the SBOM workflow from release_actions.yml generates the SBOM but attaches nothing.

Activity

  1. added
    P3
    on Sep 9, 2026
  2. moved this from 🆕 Needs triage to 🔖 Ready in Pontoon Roadmapon Sep 9, 2026
  3. added theissue type on Sep 9, 2026
  4. eemeli commented on Sep 10, 2026

    @eemeli
    Member

    If you call the action with an sbom_name matching the git tag, it should work from release_actions.yml. See the corresponding code in moz-l10n.

  5. self-assigned this
    on Sep 14, 2026
  6. flodolo commented on Sep 15, 2026

    @flodolo
    Collaborator

    Calling the sbom workflow from the release one requires a token, but also won't work: the sbom action will run against the current HEAD of main, which might not match the release changeset.

    A possible workaround is to call the actions directly in release, but that's not ideal

    Add sha to the release job's outputs (the current PR only exports release and version):

      release:
        name: New release
        if: github.repository == 'mozilla/pontoon'
        runs-on: ubuntu-latest
        permissions:
          contents: write
          pull-requests: read
        outputs:
          release: ${{ steps.check.outputs.release }}
          version: ${{ steps.check.outputs.version }}
          sha: ${{ steps.revision.outputs.sha }}

    Then add a new job:

      sbom:
        name: Generate and attach SBOM
        needs: release
        if: needs.release.outputs.release == 'true'
        runs-on: ubuntu-latest
        permissions:
          contents: write
        steps:
          - name: Clone repository at the released revision
            uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
            with:
              ref: ${{ needs.release.outputs.sha }}
              persist-credentials: false
          - name: Generate CycloneDX SBOM
            uses: anchore/sbom-action@3ad7283483fc7af8ff2b4ea19663c2d5ca935e26 # v0.24.2
            with:
              format: cyclonedx-json
              artifact-name: ${{ needs.release.outputs.version }}.cyclonedx.json
              output-file: ${{ needs.release.outputs.version }}.cyclonedx.json
              upload-release-assets: false
              dependency-snapshot: true
          - name: Upload SBOM as a release asset
            env:
              GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
              GH_REPO: ${{ github.repository }}
              VERSION: ${{ needs.release.outputs.version }}
            run: gh release upload "$VERSION" "$VERSION.cyclonedx.json"

    Instead, I've asked security folks to add a ref parameter to mozilla/ssdlc-actions/.github/workflows/ssdlc-sbom.yml, and use that for the checkout.

  7. flodolo commented on Sep 17, 2026

    @flodolo
    Collaborator

    @ayshushus
    Version 1.3 was released, supporting a ref.
    mozilla/ssdlc-actions#47

    You should be able to move forward, removing the sbom workflow, and moving the steps to the release workflow.

  8. moved this from 🔖 Ready to ✅ Done in Pontoon Roadmapon Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3hours

Type

Fields

Priority

None yet

Effort

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions