decouple SBOM generation from image build process

Ouverte
#139 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
20/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
docker, go
Domaine
build-system, devops

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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).

Langage dominant
Go
Étoiles
19
Forks
24
Merge moyen
8 j 22 h
PR mergées (30 j)
1

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de docker-library/meta-scripts

Toutes les issues de docker-library/meta-scripts

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.