Python Package

Qualite SBOM

Generer et valider une Software Bill of Materials pour des packages Python.

Accès anticipé: Jusquu2019au 2026-12-31

Pour mgpy, une bonne SBOM est plus qu un simple format d export. Elle relie la realite du package, la visibilite des licences et la transparence supply chain dans un artefact auditable.

Points cles

  • CLI: Sous Windows, les exemples utilisent la forme recommandee py -3.12 -m <module> ... (par ex. py -3.12 -m manifestguard ...). Sous Linux/macOS, cela correspond generalement a python3.12 -m ....
  • La SBOM doit correspondre aux artefacts reellement produits et a leurs versions.
  • Des licences manquantes ou une origine peu claire rendent la SBOM faible pour une vraie approbation de release.
  • La generation de SBOM doit faire partie du chemin de release et non d une exception manuelle.

Workflow mgpy recommande

  1. Choisir d abord un format SBOM exploitable dans l environnement cible.
  2. Verifier ensuite le resultat face a pip freeze, aux artefacts de build et aux metadonnees du package.
  3. Regenerer la meme SBOM a chaque release afin de conserver des comparaisons utiles.

Demarrage rapide

py -3.12 -m manifestguard sbom --format spdx --output sbom.spdx.json
py -3.12 -m manifestguard sbom --format cyclonedx --output sbom.cdx.json
py -3.12 -m manifestguard check --extended

Prérequis

Colonnes
Installation interpreter
Python 3.12 + pip
Recommended default path for installation and CLI calls.
Project target versions
Python 3.8 to 3.12
These are the project/runtime targets mgpy can analyze.
mgpy runtime
Validated on Python 3.10 to 3.13
The tool runtime itself is covered for this range.
CLI invocation
Windows: py -3.12 -m manifestguard
Linux/macOS usually maps to python3.12 -m manifestguard.
Runtime packages
tomlkit, click, pydantic, packaging, watchdog, PyNaCl, rfc8785
tomli is only added for Python below 3.11.
Offline / wheel install
Optional via pip --no-index or wheel
Useful for air-gapped or approved bundle distribution paths.