mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-12-03 18:43:38 +01:00
## Summary - Validate duplicate trimmed webhook IDs directly in `ValidateWebhookInventory` instead of calling `webhookInventoryIdentity` after already skipping empty IDs. - Add unit coverage in `TestValidateWebhookInventory` for trimmed duplicate detection and legacy ID-less webhook compatibility. ## Why `ValidateWebhookInventory` skips entries with an empty trimmed ID before checking duplicates, so `webhookInventoryIdentity` always returned the trimmed ID and never reached its legacy SHA-256 fallback. Calling `webhookInventoryIdentity` still caused CodeQL (`go/weak-sensitive-data-hashing`, alert #368) to trace decrypted configuration imports from `decryptWithPassphrase` into `hashDeliveryDestination` (`internal/notifications/notification_dispatch.go:374`). ## Verification - `go test -v -count=1 -run 'TestValidateWebhookInventory|TestNotificationLegacyAnonymousWebhookInventoryRetainsAuthority' ./internal/notifications` - `go test -count=1 -run 'TestExport|TestImport' ./internal/config`