
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
redis-sentinel
Advanced tools
Wrapper around node_redis creating a client pointing at the master server which autoupdates when the master goes down.
var sentinel = require('redis-sentinel');
// List the sentinel endpoints
var endpoints = [
{host: '127.0.0.1', port: 26379},
{host: '127.0.0.1', port: 26380}
];
var opts = {}; // Standard node_redis client options
var masterName = 'mymaster';
// masterName and opts are optional - masterName defaults to 'mymaster'
var redisClient = sentinel.createClient(endpoints, masterName, opts);
// redisClient is a normal redis client, except that if the master goes down
// it will keep checking the sentinels for a new master and then connect to that.
// No need to monitor for reconnects etc - everything handled transparently
// Anything that persists over the normal node_redis reconnect will persist here.
// Anything that doesn't, won't.
// An equivalent way of doing the above (if you don't want to have to pass the endpoints around all the time) is
var Sentinel = sentinel.Sentinel(endpoints);
var masterClient = Sentinel.createClient(masterName, opts);
You can get a connection to a slave (chosen at random) or the first available sentinel from the endpoints by passing in the role
attribute in the options. E.g.
// The master is the default case if no role is specified.
var masterClient = sentinel.createClient(endpoints, masterName, {role: 'master'});
var slaveClient = sentinel.createClient(endpoints, masterName, {role: 'slave'});
var sentinelClient = sentinel.createClient(endpoints, {role: 'sentinel'});
Where you should also transparently get a reconnection to a new slave/sentinel if the existing one goes down.
MIT
FAQs
Redis sentinel client for nodejs
The npm package redis-sentinel receives a total of 787 weekly downloads. As such, redis-sentinel popularity was classified as not popular.
We found that redis-sentinel 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.