
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.
@opuscapita/cache
Advanced tools
Cache library for OpusCapita. By default it ships with three cache providers: dummy, memory and redis.
To have a look at the full API, please visit the related wiki page.
First got to your local code directory and run:
npm install @opuscapita/cache
If you are using the redis back-end, you'll need to have access to a running Consul server to get your endpoint configuration and a Redis server to connect to.
If all this is set up, go to you code and add the following command:
const Cache = require('@opuscapita/cache');
var cache = new Cache(); // using default: Memory driver
cache.put('hello', 'world').then(() => cache.get('hello')).then(console.log);
The default configuration object provides hints about what the module's standard behavior is like. In order to set plug-in (driver) specific configurations, you may add a sub-key to the configuration having the same name as the driver property you set and assign a configuration object there.
{
driver : 'memory',
keyPrefix: '',
defaultExpire: 600, // in seconds
pluginDirectory: 'plugins'
}
Example including memory driver configuration:
const Cache = require('@opuscapita/cache');
var cache = new Cache({
driver : 'memory',
keyPrefix: '',
checkPeriod: 10,
memory: {
checkPeriod: 600,
useClones: true
},
redis: {
consul: {
host: 'consul'
},
redis: {
endpointName: 'redis',
passwordKey: 'redis/password' // consul KV key name
}
}
});
If environment variable KUBERNETES_SERVICE_DISCOVERY is set then config library is not used at all for service discovery. Redis port is read from REDIS_PORT environment variable (6379 is used by default if variable not set).
There is a feature? which cause redis/redis/ path in the configuration... In the future version this shall change
{
driver: "redis",
redis: {
consul: {
host: "consul"
serviceSecretPath: '/path'
port:8500,
retryCount: 50,
retryTimeout: 1000,
logger: null,
},
redis: {
endpointName: "redis",
passwordKey: "redis/password",
},
},
}
Added new option to change redis retry interval and count.
FAQs
OpusCapita cache abstraction library
The npm package @opuscapita/cache receives a total of 147 weekly downloads. As such, @opuscapita/cache popularity was classified as not popular.
We found that @opuscapita/cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.