Reuse embedded per-platform SBOMs and consolidate duplicate generation
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- devops, docker, github-actions, shell
- Área
- devops, infrastructure, security
Línea de trabajo
Start by reading .github/workflows/wc-build-push.yml around platform SBOM generation, index merge, and the standalone scan; then inspect the inventory script and helpers/add-sbom-note/add-sbom-note.sh. Reproduce the documented registry inspection for the immutable sample index and compare embedded SPDX with standalone Syft output. Done means tested, validated per-platform extraction and coverage mappings preserve all consumers, with redundant scanning removed only where equivalent.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Goal
Use the existing per-platform BuildKit SBOMs as the canonical source wherever they meet consumer requirements, prove their coverage survives image assembly, and remove redundant post-build scanning without losing release SBOMs, dependency snapshots, or curated tool inventory.
This is not a request to add another scanner or assume platform SBOM generation is missing. Cryptographic signing and verification remain in philips-software/amp-devcontainer#1135.
Findings: two SBOM producers, not a Trivy multi-platform SBOM
Source inspected at af840070c907d71ce06334ea65eded00dc3946a4. Recheck before implementation.
| Path | Current behavior | Consumers |
|---|---|---|
docker/build-push-action, sbom: true |
BuildKit generates SPDX evidence during each platform build, attached through attestation manifests | Image consumers via registry/index |
anchore/sbom-action in merge-image |
Runs Syft again against the merged index without explicit platform selection; writes sbom.spdx.json |
Workflow/release assets, GitHub dependency snapshot, optional curated inventory |
Scheduled crazy-max/ghaction-container-scan |
Trivy vulnerability scanning with JSON/SARIF outputs; workflow does not configure SPDX/CycloneDX generation or a platform matrix | GitHub code-scanning reports |
BuildKit uses its Syft scanner by default unless a generator is overridden; none is specified here. The standalone action also runs Syft. Syft's documented default for an index is linux/amd64, not a scan of all its platforms. Thus there is overlapping generation, but the outputs may differ because of scanner versions/configuration: they must be compared before one is removed.
Real registry evidence
Read-only inspection of public ghcr.io/philips-software/amp-devcontainer-base:edge resolved index:
sha256:5dd8934f7527dbc675901f87357e8d235e4eab480c25ed2facbeaa4a058121f3
| Platform | Image manifest digest | Embedded SPDX blob digest |
|---|---|---|
linux/amd64 |
sha256:19a6a003b06ce3e87059d7eb1c035690cc76ada378a1b2d0e860c74279bcbe5b |
sha256:edf7c16c124ed939bdaf497489d4001411461944208e62101cde41844572ecf3 |
linux/arm64 |
sha256:e6308bce07ca214048ad4a4ff960f6ea10824be91d8af2779546b44facf38e49 |
sha256:efeefb25024ce2c3db4f4ffeddb5527643072e9e3490420bed18d4613f0626a1 |
Both embedded statements:
- Have
predicateType: https://spdx.dev/DocumentandspdxVersion: SPDX-2.3. - Identify their corresponding platform manifest as the subject.
- Report creators
syft-v1.51.0andbuildkit-v0.34.2. - Contain 336 package entries each. Equal counts do not imply identical packages or architecture-independent coverage.
The index therefore already contains an SBOM for each of these two platforms. This proves that sample's coverage and assembly preservation, not every flavor or historical release. The evidence is an in-toto statement stored in the image index, not by itself a cryptographically signed GitHub/Sigstore attestation.
Reproduce without pulling runnable image layers:
image='ghcr.io/philips-software/amp-devcontainer-base@sha256:5dd8934f7527dbc675901f87357e8d235e4eab480c25ed2facbeaa4a058121f3'
docker buildx imagetools inspect "${image}" --raw \
| jq '.manifests[] | {digest, platform, annotations}'
docker buildx imagetools inspect "${image}" --format '{{json .SBOM}}' \
| jq 'to_entries[] | {
platform: .key,
creators: .value.SPDX.creationInfo.creators,
packages: (.value.SPDX.packages | length)
}'
The evidence above was obtained through read-only registry API requests, with descriptor/blob SHA256 checks and subject-to-platform checks. The Docker commands are the documented equivalent inspection path.
Starting points
.github/workflows/wc-build-push.yml: platform generation around lines 118–132, digest handoff and index merge, standalone scan around lines 297–303, and inventory consumers..github/actions/generate-tool-inventory/generate-tool-inventory.sh: consumes one SPDX document and currently deduplicates tools by name.helpers/add-sbom-note/add-sbom-note.sh: custom ELF metadata used to make downloaded tools visible to Syft..github/workflows/vulnerability-scan.yml: separate vulnerability reporting, not the SBOM publication path.docs/reusable-build-system.md,docs/requirements/security.feature, and release-evidence consumers.
Implementation requirements
- Inventory required platforms from the actual runnable image descriptors of the immutable final index. Do not hard-code only the observed architectures or mistake attestation descriptors with
unknown/unknownfor runnable platforms. - Resolve and extract existing embedded SPDX predicates through their attestation manifests. Validate descriptor/blob digests, statement subject, platform association, expected predicate/schema, and nonempty usable package data. Preserve relationships back to the final index. Use supported registry tooling and the existing authentication model for GHCR and external registries.
- Emit a deterministic coverage manifest mapping final index digest → platform → runnable manifest digest → SBOM file/digest and generator metadata. Preserve separate platform documents; do not concatenate package lists into a document that silently conflates architectures or discards differing versions.
- Compare extracted output with the current standalone Syft output on representative images, including custom ELF notes, manually installed tools, purls, versions, and SPDX relationships. Reuse the embedded source when it meets the contract. If a necessary cataloger/configuration difference exists, align the build-time generator where feasible; retain a second scan only with demonstrated necessity and documented scope.
- Preserve every consumer before removing
anchore/sbom-action: workflow artifacts, release attachments, dependency snapshots, curated inventory, and signing inputs for philips-software/amp-devcontainer#1135. File extraction and format conversion do not require rescanning the image filesystem. - Make platform scope explicit for consumers that currently accept one document. Keep their existing compatibility contract with an explicitly identified platform or extend it deliberately with migration guidance. Do not silently flatten conflicting per-platform tool versions, overwrite release assets, or drop dependency information. Ensure outputs have unique flavor/platform names and stable digest mappings.
- Prefer extraction and reuse, not a new scan for every platform. Missing/corrupt/mismatched expected SBOMs must fail the evidence gate clearly; do not silently substitute the host platform's scan and report complete coverage.
- Document generation versus extraction versus signing, expected final-filesystem coverage, and any build-stage/context limitations. Update requirement/test traceability and consumer documentation. Preserve provenance generation and verification.
Required tests
- A multi-platform fixture has architecture-distinct packages/versions. Every runnable platform gets the correct extracted document and subject mapping after index assembly.
- Missing platform SBOM, incorrect subject, altered blob, unsupported/malformed document, duplicate/conflicting candidates, and missing registry permissions fail with actionable diagnostics.
- Extraction handles attestation descriptors without treating them as platforms and works with immutable index references rather than mutable-tag races.
- Existing curated tools, including custom ELF-note packages, remain discoverable; existing consumer tests pass and platform conflicts are not silently deduplicated.
- Release assets and workflow artifacts contain the expected uniquely named documents; dependency snapshots remain valid; signed predicates can consume the same canonical files without regeneration.
- Demonstrate coverage across supported flavors/platforms using a justified shared-workflow test matrix and representative real evidence.
- Show removal of the redundant standalone scan, or record the measured functional reason for any retained scan. Run relevant workflow lint and integration checks.
Acceptance criteria
- Existing platform coverage is proven and continuously checked, rather than assumed missing or complete.
- Canonical per-platform SBOMs and index/platform/digest mappings are available to downstream consumers.
- Redundant generation is removed where equivalent; any retained second scan has an evidenced purpose.
- Release artifacts, dependency snapshots, tool inventory, and provenance keep their intended behavior.
- No platform conflation, unsigned-as-signed claim, or unnecessary additional scanning is introduced.
- Automated positive/negative tests and consumer documentation cover the chosen design.
Coordination
This issue owns canonical SBOM selection, extraction, coverage checks, and consolidation. philips-software/amp-devcontainer#1135 owns cryptographic signing/verification of those documents; it must not treat index attachment alone as sufficient. This issue can complete without waiting for signing, avoiding a circular dependency.
Follow philips-software/amp-devcontainer#1134 for retention of platform subjects and associated registry evidence. Broader vulnerability-scanner coverage is not required here; do not remove the scheduled Trivy scan merely because SBOM generation is consolidated.
References
- Lenguaje dominante
- Shell
- Estrellas
- 136
- Forks
- 8
- Merge medio
- 17 h 19 min
- PR fusionados (30 d)
- 53
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de philips-software/amp-devcontainer
-
Inventory smoke tests can hang despite command timeout; fail with bounded diagnosticsPosiblemente ocupada @rjaegers la tomó hace 23 días. Abierto
philips-software/amp-devcontainer#1569 · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
Evaluate tool versionsAbiertoscheduled stale tool-versions
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
philips-software/amp-devcontainer#1475 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
philips-software/amp-devcontainer#1433 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Evaluate tool versionsAbiertoscheduled tool-versions
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
philips-software/amp-devcontainer#1222 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
philips-software/amp-devcontainer#1136 ·
Los mantenedores suelen responder en 1 día
Todos los issues de philips-software/amp-devcontainer
Issues similares
-
documentation enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aws/aws-networking-best-practices#256 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv#61 ·
-
ChatGPT directory is behind mainAbiertoopenai-directory
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
smores56/homelab-platform#289 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día