Skip to content

Add tested Python webhook signature example - #7

Open
asllanmaciel wants to merge 5 commits into
mainfrom
feat/python-hmac-example
Open

Add tested Python webhook signature example#7
asllanmaciel wants to merge 5 commits into
mainfrom
feat/python-hmac-example

Conversation

@asllanmaciel

Copy link
Copy Markdown
Owner

O que muda

  • adiciona examples/python/verify.py com validação de X-Hub-Signature-256 sobre o corpo bruto em bytes;
  • usa HMAC SHA-256 e hmac.compare_digest() para comparação em tempo constante;
  • rejeita secret vazio, assinatura ausente, algoritmo/prefixo incorreto e digest malformado;
  • adiciona regressões em tests/python-test.py, incluindo o vetor público da documentação do GitHub;
  • inclui o teste Python no workflow manual e documenta uso/validação local no README;
  • registra a melhoria no changelog.

Fixes #4.

Verificação executada

  • php -l examples/php/verify.php — passou
  • php -l tests/php-test.php — passou
  • php -d zend.assertions=1 -d assert.exception=1 tests/php-test.php — passou
  • node tests/node-test.mjs — passou
  • python3 -m py_compile examples/python/verify.py tests/python-test.py — passou
  • python3 tests/python-test.py — 5 testes, OK

Os checks existentes de PHP e Node.js foram executados junto com o novo teste para comprovar ausência de regressão no conjunto de exemplos.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T12:18:43.510931Z 08c3b4d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

Add a tested Python HMAC verification example

1 participant