Repository navigation
feat(release): 可复现 portable ZIP、SBOM、NOTICE 与校验和 - #83
Merged
Merged
Conversation
This was referenced Aug 16, 2026
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.
背景
issue #56(父任务 #37):当前
cyberagent-desktop.exe是开发者预览产物,缺少正式 portable ZIP 的可复现构建、依赖/SBOM、许可证清单、版本元数据和校验和。ADR 0034 要求任何可分发 ZIP 必须携带第三方 notice、SBOM 和哈希。本次改动
cmd/releasegen:生成确定性的 CycloneDX 1.4 SBOM + 第三方NOTICE,并提供一个固定时间戳(1980-01-01)的确定性 ZIP 打包。go list -deps -tags "desktop,production,wv2runtime.error"),不是完整模块图,且序列号由模块图哈希派生(无随机 UUID/时间戳)。go mod download,因此不会改写go.sum。scripts/package-portable-zip.ps1:把 EXE、launcher、guide、LICENSE、README、NOTICE、sbom.json、release-metadata.json 打包成便携 ZIP,并生成SHA256SUMS与portable-zip-manifest.json。ZIP 用releasegen -zip固定时间戳,字节级可复现。.github/workflows/release-desktop.yml:release CI(tag / workflow_dispatch)——go mod tidy -diff(lockfile 漂移 fail-closed)→ 构建(含复现校验)→ 打包 → 上传 artifact。测试覆盖
cmd/releasegen:license 检测(MIT/Apache/缺失)、SBOM 确定性 + 排序、NOTICE 完整性、确定性 ZIP 字节稳定。go build/go vet/go test ./cmd/releasegen通过;打包全流程两次运行 ZIP SHA-256 一致;go.sum/go.mod无漂移。验证结果
go build ./...、go vet ./...、go test ./cmd/releasegen通过。zip_timestamps_reproducible: true)。安全边界与非目标
gh release create上传(需 tag + 人工发布动作);许可证识别是启发式,NOTICE附全文供人工复核。windows-latest上实跑(本机已逐 step 复现)。Refs #56