Repository navigation
ci(release): use secure timestamps and surface notarization rejections - #84
Conversation
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
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🔍 OpenCodeReview found 2 issue(s) in this PR.
|
| --wait \ | ||
| --timeout 30m | ||
| --timeout 30m 2>&1 | tee "$SUBMIT_LOG" |
There was a problem hiding this comment.
notarytool 通过管道传给 tee 后,步骤的退出码取决于管道最后一个命令(tee),而该 run 块没有 set -o pipefail,因此 notarytool 提交失败(非 Invalid 而是错误退出)时会被 tee 的成功退出码掩盖,后续 Invalid 检查会基于不完整日志运行。建议在脚本开头加 set -euo pipefail。
Suggestion:
| --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 |
There was a problem hiding this comment.
该检查只覆盖 "status: Invalid";notarytool 也可能输出 "status: Rejected" 或 "status: In Progress"/超时等其他终态。建议改为排除 Accepted 的否定判断(如 ! grep -q "status: Accepted" "$SUBMIT_LOG"),避免 Rejected 提交被误当作成功并进入 stapler 步骤。
Suggestion:
| if grep -q "status: Invalid" "$SUBMIT_LOG"; then | |
| if ! grep -q "status: Accepted" "$SUBMIT_LOG"; then |
变更
v1.0.2 / v1.0.3 的 Sparkle 更新失败,根因是 release 签名缺安全时间戳:
codesign --timestamp=none显式禁用 RFC 3161 时间戳status: Invalid拒绝notarytool submit --wait对 Invalid 仍返回 0,流程继续到stapler staple才以 exit 65 +Record not found失败,真正原因被吞掉修复
release.yml签名改用--timestamp(CI 打包)project.pbxproj框架重签脚本同步改用--timestampstatus: Invalid,打印 Apple issues 日志并直接失败验证