feat(scitt): add SCITT verification support with headers and error ha…#17
feat(scitt): add SCITT verification support with headers and error ha…#17kperry-godaddy merged 6 commits intomainfrom
Conversation
…d improve error messages
csnitker-godaddy
left a comment
There was a problem hiding this comment.
All three findings from the review pass are resolved:
-
CurrentHeadersexpired-token suppression —verify/scitt/supplier.go:166-172now readstokenExpunder the RLock and suppresses the token whennow >= exp. Matches Rust supplier semantics. Boundary behavior (now == exp → suppressed) is pinned by test. -
Clock-skew clamp + overflow guard —
verify/scitt/status_token.go:88-93clampsclockSkewto[0, MaxClockSkew]before the int64 conversion, closing the overflow path.WithSupplierClockSkewapplies the same clamp, so the agent-side bypass is also closed.TestVerifyStatusTokenAt_ClockSkewClampingexercisesmath.MaxInt64directly. -
ans_namerequired at decode —decodeStatusPayloadnow rejects tokens missingans_name, andverify.go:598-606drops theif != ""guard with a comment documenting the invariant. Matches Rust oracle.
The follow-up nil-logger guard at supplier.go:167-171 is also correct and has a dedicated regression test (nilLogger: true).
Full test suite passes. LGTM.
…ndling