
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.
@qrvey/health-checker
Advanced tools
 
An health check library for validating the availability of core service dependencies like Redis, PostgreSQL, and RabbitMQ.
npm install @qrvey/health-checker
Or with yarn:
yarn add @qrvey/health-checker
Service | Dependency Key |
---|---|
PostgreSQL | database |
Redis | cache |
RabbitMQ | eventBroker |
const {
HealthCheckService,
} = require('@qrvey/health-checker');
HealthCheckService.check(['cache', 'database', 'eventBroker']).then((result) => {
console.log(result);
/*
{
status: 'OK',
details: {
cache: 'OK',
database: 'OK',
eventBroker: 'OK'
}
}
*/
});
You can also check specific dependencies only:
HealthCheckService.check(['cache']).then((result) => {
console.log(result);
/*
{
status: 'OK',
details: {
cache: 'OK'
}
}
*/
});
You can expose the health check as a simple route in your Fastify app.
health.routes.js
const {
HealthCheckService,
} = require('@qrvey/health-checker');
const Fastify = require('fastify');
async function healthRoutes(fastify, _options) {
fastify.get('/health', async (_request, reply) => {
const dependencies = ['database', 'eventBroker'];
const result = await HealthCheckService.check(dependencies);
const httpStatus = result.status === "FAILED" ? 503 : 200;
return reply.code(httpStatus).send(result);
});
}
const app = Fastify({ logger: true });
app.register(healthRoutes);
app.listen({ port: 3000 });
GET /health
{
"status": "OK",
"details": {
"database": "OK",
"eventBroker": "OK"
}
}
If you want to explicitly validate that your service is subscribed to one or more RabbitMQ queues, you can pass an additional params object to the check method.
fastify.get('/health', async (_request, reply) => {
const dependencies = ['eventBroker'];
const params = {
eventBroker: {
queues: ['queue_name_1', 'queue_name_2'], // these must match the configured subscriptions
},
}
const result = await HealthCheckService.check(dependencies, params);
const httpStatus = result.status === "FAILED" ? 503 : 200;
return reply.code(httpStatus).send(result);
});
GET /health
{
"status": "OK",
"details": {
"eventBroker": "OK"
}
}
FAQs
 
The npm package @qrvey/health-checker receives a total of 1,902 weekly downloads. As such, @qrvey/health-checker popularity was classified as popular.
We found that @qrvey/health-checker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 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.