Skip to content

ci(release): use secure timestamps and surface notarization rejections - #84

Merged
hubo1989 merged 1 commit into
mainfrom
hubo/translate-improve
Oct 27, 2026
Merged

hubo1989 merged 1 commit into
mainfrom
hubo/translate-improve

Conversation

@hubo1989

Copy link
Copy Markdown
Owner

变更

v1.0.2 / v1.0.3 的 Sparkle 更新失败,根因是 release 签名缺安全时间戳:

  • codesign --timestamp=none 显式禁用 RFC 3161 时间戳
  • Apple 公证服务对无时间戳签名一律 status: Invalid 拒绝
  • notarytool submit --wait 对 Invalid 仍返回 0,流程继续到 stapler staple 才以 exit 65 + Record not found 失败,真正原因被吞掉
  • 于是 1.0.2 的 DMG 既没公证也没 staple,用户 Sparkle 更新报错

修复

  1. release.yml 签名改用 --timestamp(CI 打包)
  2. project.pbxproj 框架重签脚本同步改用 --timestamp
  3. 公证后显式检测 status: Invalid,打印 Apple issues 日志并直接失败

验证

  • 需重跑 release 流水线实证公证通过(v1.0.3)
  • 发版产物将由 CI 公证 + staple + 重新生成 EdDSA 签名与 appcast

Root cause of 1.0.2/1.0.3 notarization failures: codesign ran with
--timestamp=none, so the Developer ID signature lacked the RFC 3161
secure timestamp Apple notarization requires and the submission came
back 'status: Invalid' (then failed at stapler with 'Record not found').

- Sign with --timestamp (CI bundle + Xcode framework-resign script)
- Fail the job at notarytool submit when status is Invalid and print
  Apple's issue log, instead of silently continuing to stapler
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 35faebef-61de-4089-bdb2-dbc9c8bd4ebe
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T13:19:52.907970Z
We couldn’t complete this review. Comment @codex review to try again.
c39dec1 PR opened
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hubo1989
hubo1989 merged commit 9a23725 into main Oct 27, 2026
2 checks passed
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🔍 OpenCodeReview found 2 issue(s) in this PR.

  • ✅ Successfully posted inline: 2 comment(s)

Comment on lines 275 to +276
--wait \
--timeout 30m
--timeout 30m 2>&1 | tee "$SUBMIT_LOG"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bug · high
notarytool 通过管道传给 tee 后,步骤的退出码取决于管道最后一个命令(tee),而该 run 块没有 set -o pipefail,因此 notarytool 提交失败(非 Invalid 而是错误退出)时会被 tee 的成功退出码掩盖,后续 Invalid 检查会基于不完整日志运行。建议在脚本开头加 set -euo pipefail。

Suggestion:

Suggested change
--wait \
--timeout 30m
--timeout 30m 2>&1 | tee "$SUBMIT_LOG"
set -euo pipefail
xcrun notarytool submit "$ZIP_PATH" \
--apple-id "$APPLE_ID" \
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
--team-id "$APPLE_TEAM_ID" \
--wait \
--timeout 30m 2>&1 | tee "$SUBMIT_LOG"


# notarytool exits 0 even for status: Invalid — surface the rejection
# and Apple's issue list instead of failing later at stapler with 65.
if grep -q "status: Invalid" "$SUBMIT_LOG"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bug · medium
该检查只覆盖 "status: Invalid";notarytool 也可能输出 "status: Rejected" 或 "status: In Progress"/超时等其他终态。建议改为排除 Accepted 的否定判断(如 ! grep -q "status: Accepted" "$SUBMIT_LOG"),避免 Rejected 提交被误当作成功并进入 stapler 步骤。

Suggestion:

Suggested change
if grep -q "status: Invalid" "$SUBMIT_LOG"; then
if ! grep -q "status: Accepted" "$SUBMIT_LOG"; then

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