fix(create): wait for the clock to reach Rekor's integrated time after signing #359
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 529 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.375
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #359"
general
weight: 0.35
jdx
A release could fail for no lasting reason when the machine signing it had a clock a fraction of a second behind Rekor's. Signing now waits for the local clock to catch up before it returns the bundle, so the check that runs right after it passes. Verification is just as strict as before.
The problem
Rekor records when it adds an entry to its log (the entry's integrated time). sigstore's verifier rejects an entry whose integrated time is later than the verifier's own current time, and it allows no clock skew. That strictness is deliberate: sigstore/sigstore-rust#164 removed the skew allowance after an audit finding.
The action's "Verify what was written" step runs
packslip verifystraight afterpackslip createsigns the bundle. If the runner's clock is slightly behind Rekor's, the entry looks like it comes from the future, and the release fails:Re-running the job succeeded. Only a check made right after signing can hit this race. Anyone installing the release verifies it long after the entry exists.
What changed
After signing,
packslip create(and any other caller of the library'ssigstore::sign) now reads the integrated time of each log entry in the new bundle. If that time is still ahead of the local clock, it sleeps until the clock reaches it. With a fraction of a second of skew, the wait is under a second. The wait is capped at five seconds, so a clock that is badly wrong still fails verification with the same error as before, which is the right outcome for real skew. Bundles with no log entry never wait. That covers key-signed bundles made without--log.The verifier is unchanged.
Validation
signing_waits_for_the_clock_to_reach_the_integrated_time, uses a logged fixture bundle. It checks that a clock 200 ms behind waits exactly 200 ms, a clock at or after the integrated time doesn't wait, a clock 60 s behind waits only the five-second cap, and an unlogged bundle never waits.cargo test --all-featurespasses.cargo clippy --all-targetspasses with-D warnings, both with all features and with no default features.cargo fmt --checkpasses.Fixes #358
🤖 Generated with Claude Code
<!-- CURSOR_SUMMARY -->
---
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Signing now waits up to five seconds when the bundle’s latest transparency-log timestamp is ahead of the local clock. No wait occurs if there is no logged timestamp or the local clock has already reached it.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->