Repository navigation
ci(release): 镜像链补 provenance + SBOM attestation(§10.4 收敛) - #191
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
按治理规范 §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(pin10926c7…)把 SBOM 绑定到该 digest(push-to-registry: true);actions/attest-build-provenance@v2(pin96b4a1e…)绑定 SLSA provenance。workflow 级 permissions 增加
id-token: write+attestations: write。权衡:另一条路是把最后一步改成 buildx 二次构建 +
--push --provenance=true,但那要为 10.8GB 镜像多跑一遍完整构建(cache 仅 mode=min),成本与超时风险都更高。若你更想要 buildx 内联字段,告诉我即可改。