Scan your whole stack
Are you using @samva/webhooks?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.52.0
@samva/webhooks was last scanned on 26 Nov 2026 at version 0.52.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.52.0 LATEST | 26 Nov 2026 | No rules fired |
| 0.51.0 | 24 Nov 2026 | No rules fired |
| 0.50.0 | 23 Nov 2026 | No rules fired |
| 0.49.0 | 20 Nov 2026 | Not shown |
| 0.48.0 | 18 Nov 2026 | Not shown |
Findings for v0.52.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.52.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
@samva/webhooksSamva is email and WhatsApp for AI agents, and the API developers build on. An agent gets its own address and WhatsApp number, and the same platform covers transactional and campaign sending, inbound replies threaded into conversations, programmable mailboxes, and signed webhooks.
Verify signed Samva webhook deliveries in Node.js, Bun, Cloudflare Workers, and other Web Crypto-compatible runtimes.
import { isKnownEvent, verifyRequest } from "@samva/webhooks";
const verified = await verifyRequest(request, process.env.SAMVA_WEBHOOK_SECRET!);
if (isKnownEvent(verified.event) && verified.event.type === "message.bounced") {
await suppressRecipient(verified.event.data.recipient, verified.event.data.occurredAt);
}
await persistAndHandleOnce(verified.id, verified.event);
Verification reads the exact request body, validates the Standard Webhooks signature and replay
window and the event-specific payload, and returns { id, event }. verified.id matches the webhook-id header. Preserve the raw
request body and keep the signing secret on the server.
Effect applications can use the optional Effect entrypoint:
import * as Webhooks from "@samva/webhooks/effect";
import { Effect } from "effect";
export async function verifyEvent(request: Request, secret: string) {
const program = Webhooks.verifyRequest(request, secret).pipe(
Effect.map((verified) => verified.event),
);
return Effect.runPromise(program);
}
Install the effect version this package lists in peerDependencies when using that entrypoint.
VerifiedWebhook.event is a WebhookEvent: a known SamvaWebhookEvent or an
UnknownWebhookEvent with type: string and data: unknown. Call isKnownEvent(event) before
branching on event.type to narrow known payloads. Per-event types such as MessageBouncedPayload
and ContactUnsubscribedPayload are exported from both entrypoints.
Signature verification is the authenticity gate. Signed new event types pass through as untyped
events; extra envelope and payload fields are accepted and preserved. Only malformed envelopes or
invalid payloads for known event types fail with MalformedWebhookPayloadError. Update the package
to gain types for new events. Bounce and complaint events publish once per affected address, each
with its own webhook-id; deduplicate using that ID rather than messageId.
For separate decoding, import MessageBouncedEventSchema or SamvaWebhookEventSchema from
@samva/webhooks/schemas (or the Effect entrypoint) and use Schema.decodeUnknownSync.
WebhookEventJsonSchemas exports the same wire contracts for JSON Schema validators.
Signing secrets are whsec_ followed by Base64-encoded secret bytes. Copy the entire secret from
Samva; the suffix is Base64, not hex or Base64url.
generateWebhookSecret and signWebhook produce the same signed bytes Samva sends, so a test can
exercise the success path and the failing-signature path without a live delivery. The fixture below
uses an event type the package does not know, which passes through as an untyped event; a known type
needs a payload that matches its schema.
import {
generateWebhookSecret,
InvalidWebhookHeadersError,
safeVerify,
signWebhook,
verify,
WebhookSignatureError,
} from "@samva/webhooks";
const secret = generateWebhookSecret();
const body = JSON.stringify({
type: "example.test",
timestamp: new Date().toISOString(),
data: { note: "fixture" },
});
const id = "evt_test_1";
const timestamp = Math.floor(Date.now() / 1000);
const signature = await signWebhook({ body, id, timestamp, secret });
const delivery = { body, id, timestamp: String(timestamp), signature, secret };
await verify(delivery); // resolves { id, event }
// A body changed by one byte fails the signature check.
await verify({ ...delivery, body: `${body} ` }).catch((error) => {
console.log(error instanceof WebhookSignatureError); // true
});
// An absent header fails before the signature is read.
await verify({ ...delivery, signature: undefined }).catch((error) => {
console.log(error instanceof InvalidWebhookHeadersError); // true
});
// safeVerify returns the failure instead of rejecting.
console.log((await safeVerify({ ...delivery, body: `${body} ` })).verified); // false
In an HTTP test, send the same webhook-id, webhook-timestamp, and webhook-signature header
values (the WEBHOOK_*_HEADER constants) with the signed body, then repeat the request with a
changed body and expect your handler to answer 4xx.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.