
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
hapi-version-prereq
Advanced tools
automgaically populates the version prereq for routes that support it
Hapi plugin for automagically populating the version header on routes that support it. At OT we use a mix of url-versioning and header-versioning. In some cases our APIs need to support both. This module represents some shared code for our narrow use-case.
installation:
npm install hapi-version-prereq
usage:
var hapi = require("hapi");
var joi = require("joi");
var server = Hapi.createServer('127.0.0.1', 3000, {});
server.route([{
method: 'GET',
path: '/v1/my-url',
config: {
handler: function(request, reply){
reply(request.pre.version)
}
}
},
{
method: 'GET',
path: '/my-url',
config: {
handler: function(request, reply){
reply(request.pre.version)
},
validate: {
headers: {
accept: joi.string().regex(/application\/vnd.myorg.mytype.v1\+json/)
}
}
}
}]);
server.pack.register([
{
plugin: require('hapi-version-prereq'),
options: {}
}], function(err){
if(err){
throw err;
}
server.start(function(){
server.log('server started');
});
});
/v1/my-url => { version: 'v1', mode: 'url' }
/my-url => { version: 'v1', mode: 'header' }
FAQs
automgaically populates the version prereq for routes that support it
The npm package hapi-version-prereq receives a total of 1 weekly downloads. As such, hapi-version-prereq popularity was classified as not popular.
We found that hapi-version-prereq demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.