
Research
/Security News
11 Malicious NuGet Tools Pose as Game Cheats to Drop a Windows Host-Surveillance Payload
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.
vip (very important process) is a module that uses a distributed lock module locked to ensure that only one copy of a function is running across a cluster
This is useful to avoid a split brain when running some kind of cluster wide co-ordination process
It uses etcd which uses the raft protocol
$ npm install vip
Create a new vip function that will run only once on the elected node:
var vip = require('vip')
// pass the etcd connection string
var vipcontroller = vip('127.0.0.1:4001,127.0.0.1:4002')
// this can also be an etcdjs object
var vipcontroller = vip(etcdjs('127.0.0.1:4001,127.0.0.1:4002'))
// create a candidate passing the key path and node name
var httpRouter = vipcontroller({
path:'/http_router',
id:'node1',
value:'apples',
ttl:10
}, function(){
// here we start the router
// this code will only ever have one copy running across the cluster
})
httpRouter.on('select', function(id, value){
// this is run only on the node that was elected
})
httpRouter.on('change', function(id, value){
// this is run across all nodes
})
httpRouter.start()
var vipcontroller = vip(etcdhosts)Create a controller that is connected to some etcd peers
var service = vipcontroller(opts, fn)Create a new candidate function - opts is an object with the following keys:
fn is executed once and only when the node is elected as the current leader for the service across the cluster
This event is triggered when the node has been elected and it's value distributed to the cluster.
You can run logic in this function that should only be running on one server at a time.
This event is triggered when the lock value has changed regardless of which node was elected.
The nodeid is of the elected machine is passed as the second argument.
MIT
FAQs
very important process - use etcd to avoid a split brain across a cluster
The npm package vip receives a total of 8 weekly downloads. As such, vip popularity was classified as not popular.
We found that vip 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.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.

Research
/Security News
4 compromised asyncapi packages deliver miasma botnet loader on macOS, Linux and Windows.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.