Skip to content

debug(webhook): log full HMAC diagnostics on 401 - #6

Merged
Taure merged 2 commits into
mainfrom
debug/webhook-401
May 24, 2026
Merged

debug(webhook): log full HMAC diagnostics on 401#6
Taure merged 2 commits into
mainfrom
debug/webhook-401

Conversation

@Taure

@Taure Taure commented May 24, 2026

Copy link
Copy Markdown
Owner

Adds diagnostic logging to surface why verify_signature returns false in production. Doesn't leak the secret; logs byte sizes, SHA-256 fingerprints, the received signature header, and the computed expected signature. After we find the cause we revert this PR.

Adds a verbose ?LOG_WARNING on the verify_signature=false branch that
exposes everything we'd need to spot the actual mismatch, without
leaking the secret bytes:

- secret_type / secret_byte_size / secret_fingerprint (first 8 hex
  chars of SHA-256(secret); compare equality without exposure)
- body_byte_size / body_fingerprint (same idea)
- sig_header (the value GitHub sent; safe to log)
- sig_prefix_match (does it start with sha256=)
- expected_signature (what we computed; safe — it's only sensitive
  combined with the body which never leaves the request)

Once the root cause is found, this gets reverted to the lean line.
@github-actions

github-actions Bot commented May 24, 2026

Copy link
Copy Markdown

🔴 Code Coverage — 13.2%

23 of 174 lines covered.


✅ ELP Lint

No diagnostics.

@Taure
Taure merged commit 198d087 into main May 24, 2026
16 checks passed
@Taure
Taure deleted the debug/webhook-401 branch May 24, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant