Skip to content

fix(ci): 保留手动部署并严格校验已签名 Web 制品 - #751

Closed
LIghtJUNction wants to merge 3 commits into
mainfrom
codex/propose-fix-for-unsigned-release-vulnerability
Closed

LIghtJUNction wants to merge 3 commits into
mainfrom
codex/propose-fix-for-unsigned-release-vulnerability

Conversation

@LIghtJUNction

@LIghtJUNction LIghtJUNction commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

LMM API Pull Request

变更说明 / Summary

当前修订与独立 Draft PR #772 使用相同文件树。不要重复合并两份修复;完整测试记录、文件 SHA 和未完成项以 #772 为准。本 PR 保持 Draft,未合并到 main,未发布或部署。

已将当前 main e1d04c82dbfcd6111cf7e94713fd079084414299 及 #772 的修复合入本 PR 工作分支,解决原补丁与当前手动工作流的冲突。没有 force-push,保留原提交 5c05ab519880828aa1498cb3ed6d2b61e91fef18。

冲突修复提交:4be9e49e7bc930e1254161293f9d61f87435e3f6。
经本地测试的内容提交:9463e806022e06c10b4bd6ff0c9bbdb20eae163e。
两者文件树相同:b4f84a852220cb8c5c787083bdcf07f23f4e8acb。

原方案的 workflow_run 自动部署已被当前手动授权流程取代,不能原样恢复。当前改动保留 workflow_dispatch、精确签名身份与 issuer、受限部署密钥、主机验证、两主机顺序执行和失败停止。

实际修复:先验签,再解析校验文件与归档;在安装密钥前核对精确三文件集合、每份文件的发布摘要、标签解析 SHA、发布目标和归档 REVISION;拒绝非规范校验记录、缺失或重复的必要归档成员,以及错误的发布状态。

与上游的关系 / Upstream relationship

  • 不适用(部署、CI、仓库维护)

独立修订与详细报告:#772。

关联 Issue / Related issue

Related #757。本 Web 修复没有实现 format1 → format2 原生迁移,没有解决 #757。

变更类型 / Type of change

  • Bug 修复
  • 部署、CI 或构建
  • 测试

验证 / Verification

python3 -B scripts/test-web-deploy-contract.py -v
14 tests, exit 0

python3 -B -m py_compile scripts/test-web-deploy-contract.py
exit 0

git diff --check
exit 0

两个工作流通过 YAML 解析,其全部 18 个 Bash run 片段通过 bash -n。远端新文件 blob 与本地测试内容一致。完整本地测试日志 SHA256:97ec2977c6b17a3f919b3c49c1a58bbf13e293f45bfe006470f9dc27230bc9a4。

GitHub/cosign 使用显式测试替身;Bash、jq、tar、sha256sum、cmp 实际执行。未运行真实 cosign 信任链验证、actionlint、Actions 部署或原生 PostgreSQL 资格验证;容器缺少 PostgreSQL/cosign,且无法解析依赖源域名。不能将离线测试当作正式升级验收。

已读取实际发布 web-v0.1.143 的资产元数据,确认 .tar.gz、.tar.gz.sha256、.tar.gz.sigstore.json 三文件命名与发布/验证源码一致。不是对该发布的真实密码学验证。

失败处理与边界

验签、摘要、标签或归档检查失败时,在安装受限 SSH 密钥前退出。保留原有发布中断处理方式,不自动重试主机变更,不覆盖发布资产,不删除事务记录,不跳过安全检查。

#757 的停写、单一数据库 owner、DDL、重新封存及新 writer 启动流程仍未交付和验证。不得手工改旧凭据或摘要绕过该阻断。

提交检查 / Checklist

原始 PR 的自动部署方案及其旧测试结果属于历史提交,不再作为当前修订的行为或验证结论。

Copy link
Copy Markdown
Member Author

请先与当前 main 对齐,再判断此 PR 的剩余必要改动。当前 main 2e495eca 的 部署工作流仅提供 workflow_dispatch,并且已有 Sigstore 验签步骤,在加载部署凭据之前执行;本 PR 描述中“仅校验同一 release 的 checksum”的前提已经不符合当前文件。GitHub 当前也显示该文件存在合并冲突。

本分支删除手动入口、保留 workflow_run,会把发布成功后的部署触发改为自动路径。这是部署策略变化,不能与签名验证修正混为一项。建议在当前主线保留手动部署边界,只提取仍然缺失且有证据支持的校验增量;若确实要自动部署,应单独说明并取得维护者明确确认。

本条仅静态核对工作流与触发策略,未触发 CI、发布或部署。

Preserve manual deployment and exact Sigstore identity. Parse checksums and
archives only after verification, bind the exact published asset tuple and
resolved tag revision, and reject noncanonical checksums or duplicate members.

Add 14 offline tests executing actual workflow gate bodies with synthetic
artifacts and explicit GitHub/cosign doubles. These are not real signature,
PostgreSQL, systemd or production qualification.

Related #751. Native format1 to format2 migration in #757 remains unresolved.
…lict

Retain current manual-only deployment instead of the obsolete workflow_run
trigger. Use the tested gate ordering and exact artifact contract from #772.

This updates the PR branch only. It does not merge to main, publish, deploy,
or qualify the format1 to format2 migration in #757.
@LIghtJUNction LIghtJUNction changed the title fix(ci): verify web release provenance before deploy fix(ci): 保留手动部署并严格校验已签名 Web 制品 Oct 10, 2026

@LIghtJUNction LIghtJUNction left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论:当前修订修复了与 main 的冲突,但不批准合并或正式部署。

原提交基于旧工作流;恢复 workflow_run 自动部署会破坏当前发布/部署分别授权的要求。现已保留手动入口,并将 checksum/tar 解析放在精确 Sigstore 验签之后。发布元数据、三个实际下载文件的摘要、标签提交和归档 REVISION 现在必须一致,失败发生在密钥安装前。

已核对实际 web-v0.1.143 资产包含 archive、archive.sha256、archive.sigstore.json,文件命名与发布/验证源码一致。14 项离线工作流校验测试通过;相关 YAML 和全部 18 个 Bash run 片段通过语法检查。详细证据在独立 Draft PR #772,两者代码树相同,不能重复合并。

资格边界:测试使用显式 cosign/GitHub 替身,不证明真实信任链或 Actions/生产环境。#757 的 format1 + 已有 floor + Go107 旧 hook 原生迁移没有实现;停写、单一数据库 owner、DDL、重新封存、新 writer、中断恢复和数据一致性的 PostgreSQL 资格验证没有运行。保持 Draft,不修改旧凭据、摘要或启动拒绝分支来绕过这些阻断。

@LIghtJUNction
LIghtJUNction marked this pull request as ready for review October 11, 2026 12:31
Copilot AI balanced review requested due to automatic review settings October 11, 2026 12:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-11T12:34:48.368580Z 4be9e49 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Member Author

按维护者要求关闭过时修复分支;相关问题将基于最新 main 重新核验和修复。本次关闭不代表问题已修复。 独立修订 PR #772 保持开放,后续继续单独核验。

@LIghtJUNction LIghtJUNction added the duplicate This issue or pull request already exists label Oct 11, 2026
@LIghtJUNction

Copy link
Copy Markdown
Member Author

关闭本 PR 作为 #772 的重复实现,保留原分支、评论和审查记录,不删除代码或历史。

已再次读回当前 HEAD:

两者完整 Git tree 都是 b4f84a852220cb8c5c787083bdcf07f23f4e8acb,没有独有的源码改动。本轮独立只读核对也确认三点补丁一致,只涉及 .github/workflows/deploy-web-frontend.yml 与 scripts/test-web-deploy-contract.py。

原审查边界仍有效:#751 的评论 与 review 没有批准正式合并或部署。后续统一在 #772 跟踪,不重复合并同一补丁。

核对期间两者已由其他工作从 Draft 转为 Ready;此去重关闭不等于批准 #772,也不证明真实信任链、原生接管或生产资格。#756 与 #757 仍 OPEN。本轮没有触发 CI、签名发布或部署。

@LIghtJUNction
LIghtJUNction deleted the codex/propose-fix-for-unsigned-release-vulnerability branch November 5, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark codex duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants