feat: add working application and synthetic sample data
GBB Demo authored on Nov 2, 2026
commit 6074254a6fb1
Root commit: changes are relative to an empty tree.
4 files changed, +32 −0
- .gitignore+3 −0@@ -1,0 +1,3 @@1+__pycache__/2+node_modules/3+.env
- README.md+5 −0@@ -1,0 +1,5 @@1+# Webhook Lab2+3+An HMAC webhook verification example using byte-exact payloads and safe comparison.4+5+Synthetic evaluation project.
- app.mjs+9 −0@@ -1,0 +1,9 @@1+import {createHmac, timingSafeEqual} from "node:crypto";2+export function sign(payload, secret) {3+ return "sha256=" + createHmac("sha256", secret).update(payload).digest("hex");4+}5+export function verify(payload, signature, secret) {6+ if (typeof signature !== "string" || !/^sha256=[a-f0-9]{64}$/.test(signature)) return false;7+ return timingSafeEqual(Buffer.from(sign(payload, secret)), Buffer.from(signature));8+}9+
- data/sample.json+15 −0@@ -1,0 +1,15 @@1+{2+ "environment": "demo",3+ "items": [4+ {5+ "id": "sample-1",6+ "name": "Explore the source",7+ "done": true8+ },9+ {10+ "id": "sample-2",11+ "name": "Review the draft PR",12+ "done": false13+ }14+ ]15+}