
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@manifoldco/signature
Advanced tools
Verify signed HTTP requests from Manifold
Code of Conduct | Contribution Guidelines
$ npm install @manifoldco/signature
var Verifier = require('@manifoldco/signature').Verifier;
var verifier = new Verifier();
// Using the promise interface
verifier.test(req, req.rawBody).then(function() {
// Accept and handle request
}).catch(function(err) {
// Deny request on error
res.statusCode = err.statusCode || 500;
// Respond with JSON, including a message property
return res.json({ message: err.message });
});
// Using the callback interface
verifier.test(req, req.rawBody, function(err) {
if (err) {
// Deny request on error
res.statusCode = err.statusCode || 500;
// Respond with JSON, including a message property
return res.json({ message: err.message });
}
// Accept and handle request
});
var Verifier = require('@manifoldco/signature').Verifier;
var verifier = new Verifier();
// The verification library expects that the req.rawBody property
// exists so that the body dAoes not have to be read twice, this can be
// done automaticall with restify-plugins bodyParser
app.use(plugins.bodyParser({ mapParams: true }));
// Applying the verifier middleware with default master key and options (recommended)
app.use(function(req, res, next) {
verifier.test(req).then(function() {
// Accept and handle request
next();
}).catch(function(err) {
// Deny request on error
res.statusCode = err.statusCode || 500;
// Respond with JSON, including a message property
return res.json({ message: err.message });
});
});
var verifier = require('@manifoldco/signature').express;
// When using an existing body parser, we require you to add a verify step
// which will keep track of the original request body for the verifier
// middleware
app.use(bodyParser.json({ verify: verifier.appendRawBody }));
// Applying the verifier middleware with default master key and options (recommended)
app.use(verifier.middleware());
FAQs
Verify signed HTTP requests from Manifold
The npm package @manifoldco/signature receives a total of 3 weekly downloads. As such, @manifoldco/signature popularity was classified as not popular.
We found that @manifoldco/signature demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.