
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.
@epsor/consumer-wrapper
Advanced tools
@epsor/consumer-wrapper
It wrap the consumer connection to kafka, redis connexion, mongodb connexion to help you to develop new consumer faster.
@epsor/consumer-wrapper
assumes that a few environment variables are set:
EVENT_TOPIC
- The event topic to consumeMONGODB_URL
- The mongoDB server urlREDIS_URL
- The redis server urlKAFKA_HOST
- The kafka server info IP:PORTKAFKA_GROUP_ID
- The kafka group idThis package comes with AbstractHandler
which is supposed to be extanded by your consumers handler.
Here an example of a handler:
import { MongoDuplicateEntryError } from '@epsor/mongodb-wrapper';
class UserCreateHandler extends AbstractHandler {
/** @inheritdoc */
static get handlerName() {
return 'UserCreate';
}
/** @inheritdoc */
static get allowedTypes() {
return ['user.created'];
}
/** @inheritdoc */
static async handle({ mongo }, userCreatedDto) {
const users = await mongo.collection('users');
try {
await users.insertOne(userCreatedDto.fields);
} catch (err) {
if (err instanceof MongoDuplicateEntryError) {
// An error occurred
}
}
}
}
import { Consumer } from '@epsor/consumer-wrapper';
/** @type {AbstractHandler[]} */
import handlers from './handlers';
(async () => {
const consumer = new Consumer('b2c', handlers);
await consumer.initDependencies();
await consumer.createCollections('users');
await consumer.run();
})();
This package contains an express api endpoint to check pod's health.
npm start
to start the server.http://localhost:{HEALTHCHECK_PORT}/.well-known/express/server-health
. Default port is 8000
please look at the README.md of epsor-v2 to get the list of supported ports for every consumers.
FAQs
Event consumer
The npm package @epsor/consumer-wrapper receives a total of 0 weekly downloads. As such, @epsor/consumer-wrapper popularity was classified as not popular.
We found that @epsor/consumer-wrapper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 26 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.