Skip to content

ci(release): 镜像链补 provenance + SBOM attestation(§10.4 收敛) - #191

Merged
ReSerendipity merged 2 commits into
mainfrom
ci/release-standard-b4
Oct 18, 2026
Merged

ReSerendipity merged 2 commits into
mainfrom
ci/release-standard-b4

Conversation

@ReSerendipity

Copy link
Copy Markdown
Owner

按治理规范 §10.4 收敛:镜像链须有 provenance + SBOM。

为什么不用 buildx 内联字段:本仓发布链刻意是「build(push: false) + load 到本地 daemon → Trivy 门禁 → 再 docker push」,而 docker exporter 不承载 attestation(在 load 下写 provenance: true 会直接报错)。为保住「先扫描后推送」这条安全属性,改用官方 attest-action 针对已推送 digest 绑定:

  • Push image after scan gate 增加 id: push,从 docker push 输出解析 digest(sed 兼容 <tag>: digest: sha256:… size: … 行格式);
  • Generate dependency SBOM (CycloneDX):cyclonedx-py requirements 生成 sbom-cyclonedx.json;
  • actions/attest-sbom@v2(pin 10926c7…)把 SBOM 绑定到该 digest(push-to-registry: true);
  • actions/attest-build-provenance@v2(pin 96b4a1e…)绑定 SLSA provenance。

workflow 级 permissions 增加 id-token: write + attestations: write。

权衡:另一条路是把最后一步改成 buildx 二次构建 + --push --provenance=true,但那要为 10.8GB 镜像多跑一遍完整构建(cache 仅 mode=min),成本与超时风险都更高。若你更想要 buildx 内联字段,告诉我即可改。

@ReSerendipity
ReSerendipity merged commit ff39320 into main Oct 18, 2026
17 of 18 checks passed
@ReSerendipity
ReSerendipity deleted the ci/release-standard-b4 branch October 18, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant