
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@gasbuddy/configured-redis-client
Advanced tools
A small wrapper around redis to allow configuration from confit.
{
"connections": {
"redis": {
"module": "require:@gasbuddy/configured-redis-client",
"hosts":
}
}
}
The redis client attached to req.gb.db
is an ioredis Redis object.
Common redis ttl values can be found in Ttl
.
req.gb.db.redis.Ttl.oneMinute // => 60
req.gb.db.redis.Ttl.oneHour // => 3600
To make a key, use makeKey()
req.gb.db.redis.makeKey('redis', 'is', 'cool') // => 'redis:is:cool'
To create a key that begins with the name of your service, use makeServiceKey()
req.gb.db.redis.makeServiceKey('redis', 'is', 'cool') // => 'my-serv:redis:is:cool'
Use memoize()
to cache the result of a function call.
const redisClient = req.gb.db.redis;
const mySlowDataFunction = async () => {
// slow things here
};
// return cached value. on cache miss, cache and return result of mySlowdataFunction()
const myVal = redisClient.memoize(
mySlowDataFunction,
{
key: redisClient.makeKey('redis', 'is', 'cool'), // defaults to name of function
ttlSeconds: redisClient.Ttl.fiveMinutes, // defaults to one minute
},
);
FAQs
A configuration driven redis client
The npm package @gasbuddy/configured-redis-client receives a total of 112 weekly downloads. As such, @gasbuddy/configured-redis-client popularity was classified as not popular.
We found that @gasbuddy/configured-redis-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.