Reuse embedded per-platform SBOMs and consolidate duplicate generation
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- devops, docker, github-actions, shell
- 領域
- devops, infrastructure, security
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Shell
- スター
- 136
- フォーク
- 8
- 平均マージ
- 17時間 19分
- マージ済み PR(30日)
- 53
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
philips-software/amp-devcontainer のほかの issue
-
Inventory smoke tests can hang despite command timeout; fail with bounded diagnostics対応中かも @rjaegers が 23 日前に担当しました。 オープン
philips-software/amp-devcontainer#1569 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
scheduled stale tool-versions
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
philips-software/amp-devcontainer#1475 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
philips-software/amp-devcontainer#1433 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
scheduled tool-versions
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
philips-software/amp-devcontainer#1222 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
philips-software/amp-devcontainer#1136 ·
メンテナーはふだん 1 日以内に返信
philips-software/amp-devcontainer の issue をすべて見る
似ている issue
-
documentation enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws/aws-networking-best-practices#256 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv#61 ·
-
openai-directory
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
smores56/homelab-platform#289 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信