
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@digitalocean/webhook-sdk
Advanced tools
Install the package:
npm install @digitalocean/webhook-sdk
or
yarn add @digitalocean/webhook-sdk
Use Signature.parse and signature.verify to verify an incoming webhook payload request.
const { Signature, HTTPHeaderSignature } = require('@digitalocean/webhook-sdk')
const express = require('express');
const { createServer } = require('http');
const app = express();
const server = createServer(app);
const SECRET = process.env.SIGNATURE_SECRET
app.post('/webhook', express.raw({ type: 'application/json' }), async (req, res) => {
try {
const signatureHeader = req.headers[HTTPHeaderSignature];
const signature = Signature.parse(signatureHeader);
signature.verify(req.body, SECRET);
res.status(200).send('verified');
} catch (error) {
return res.status(401).send(`failed to verify: ${error.message}`)
}
});
server.listen(8080, function () {
console.log('Listening on http://0.0.0.0:8080');
});
Use Signature.createSignature to sign a payload.
app.post('/sign', express.raw({ type: 'application/json' }), (req, res) => {
try {
const signature = Signature.createSignature({
payload: req.body,
secrets: [SECRET],
timestamp: Date.now()
})
return res.status(200).send(signature.toString())
} catch (error) {
return res.status(500).send(`failed to sign payload: ${error.message}`, )
}
})
Header: do-signature
Format: t={ts},v1={sig}
Examples:
t=1492774577,v1=5257a869e7ecee108d8bdt=1492774577,v1=5257a869e7ecee108d8bd,v1=cee108d8bd5257a869e7et=1492774577,v2=1fe71593b0c,v1=5257a869e7ecee108d8bdt=1492774577,v2=1fe71593b0c,v2=3190e6d8151ac120,v1=5257a869e7ecee108d8bd,v1=cee108d8bd5257a869e7eThis package is licensed under the Apache License 2.0.
Copyright 2023 DigitalOcean.
FAQs
SDK for consuming DigitalOcean webhook payloads.
We found that @digitalocean/webhook-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.