You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Webhook signature verification panics in TinyGo modules using crypto under //go:export #346
Provider modules export their functions with //go:export and are built with tinygo build -buildmode c-shared. TinyGo runs those exports without a current goroutine. In Go 1.25's crypto/internal/fips140, every SHA-256 or HMAC Sum calls RecordApproved(), and TinyGo implements that as task.Current().FipsIndicator, which dereferences nil there.
The result is that any module verifying a webhook signature with crypto/sha256 or crypto/hmac traps. For example, Mailgun with a webhook signing key configured, called through the host registry:
A minimal reactor reproduces it with TinyGo 0.40.1 and both Go 1.24.11 and 1.25.5: sha256.Sum256, sha256.New().Sum and hmac.New(sha256.New, …).Sum all trap under //go:export and return correct digests under //go:wasmexport.
Likely affected: every module that hashes inside an export. That includes Mailgun (signing key), Resend (svix verification) and probably SendGrid's ECDSA check. None of these are checked yet except Mailgun.
Fix: switch the exports to //go:wasmexport, as the AhaSend provider does in #345. A module that imports the Extism PDK then can't be linked by the standard toolchain's test runner, so #345 moves the exports into a //go:build tinygo file.
Activity