decouple SBOM generation from image build process

Offen
#139 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
20/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
docker, go
Bereich
build-system, devops

Rechercherichtung

Start by reading how builds.json entries are assembled in the meta-scripts repo (the build and source keys), then read the three linked meta-scripts PRs (#87, #51, #124) for prior SBOM work. The change would add a separate sbom key alongside build and source, generated after the build from buildId plus image and scanner digests. Done means SBOMs are produced and regenerated independently of the image build, and builds.json carries the new sbom entry. This is a design proposal, not a scoped task.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Currently, we generate SBOMs as part of the image build process, but the only benefit we gain from doing so is marginal (rabbitmq uses ARG BUILDKIT_SBOM_SCAN_STAGE=true to scan non-final stages of the image, but the benefits gained from doing so are very unclear if existent at all).

If we decouple that and treat SBOMs as another separate "build" artifact that we can only generate once we have a build, and generate an sbomId from something like buildId + built image digest + SBOM scanning image digest, then we'd get some interesting benefits; notably:

  • SBOM scanner would no longer need to run on every architecture we want SBOMs for (they'd all run on a linux/amd64 instance regardless of image architecture)
  • SBOMs could be regenerated when the SBOM scanner image is updated (no longer requiring a rebuild of the image we're scanning to fix SBOM-specific issues)

Prior related art:

One way we could embed this is by adding an "sbom" key in builds.json next to "build" and "source" (whose order in that file I've been considering swapping, which would make it natural to have "source", "build", and then "sbom", listed in the order they have to be processed/exist).

Vorherrschende Sprache
Go
Sterne
19
Forks
24
Ø Merge
8 T. 22 Std.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus docker-library/meta-scripts

Alle Issues in docker-library/meta-scripts

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.