Files
Pulse/internal
rcourtman 836098cd8b Validate webhook IDs directly without legacy hash branch (#5221)
## 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`
2026-11-27 00:01:54 +00:00
..