Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

dependency-watchdog

Latest version: v1.0.0

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: kartik_sharma_17
2 Versions

Scan summary

dependency-watchdog was last scanned on 23 Nov 2026 at version 1.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 23 Nov 2026.
  • Findings: No rules fired in version 1.0.0.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.0 LATEST 23 Nov 2026 No rules fired
0.0.0-stage 23 Nov 2026 Not shown

No rules fired in 1.0.0

Findings

Findings for v1.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

dependency-watchdog

Zero-dependency health monitoring for the things your service depends on. Register external APIs and databases, and get timeout detection, failure-rate and response-time tracking, an overall health status, and a ready-made Express /health endpoint.

Requires Node 18+ (uses built-in fetch and AbortController).

Install

npm install dependency-watchdog

Quick start (Express)

const express = require('express');
const { createWatchdog, checks } = require('dependency-watchdog');
const { Pool } = require('pg');

const pool = new Pool();
const app = express();

const watchdog = createWatchdog({ name: 'orders-service', timeoutMs: 3000 });

watchdog
  .addDependency('payments-api', checks.http('https://api.example.com/ping'), { type: 'api' })
  .addDependency('postgres', checks.postgres(pool), { type: 'database' })
  .addDependency('email', checks.http('https://mail.example.com/status'), {
    type: 'api',
    critical: false, // if this is down, the service is "degraded", not "unhealthy"
  });

watchdog.start(30000); // optional: poll in the background every 30s

app.get('/health', watchdog.middleware());
app.listen(3000);

GET /health returns 200 when healthy or degraded and 503 when unhealthy:

{
  "name": "orders-service",
  "status": "degraded",
  "timestamp": "2026-11-23T17:20:00.000Z",
  "uptimeSeconds": 3600,
  "dependencies": {
    "postgres": {
      "type": "database",
      "critical": true,
      "status": "healthy",
      "samples": 100,
      "failureRate": 0,
      "avgResponseMs": 4.2,
      "p95ResponseMs": 9.1,
      "consecutiveFailures": 0,
      "lastError": null
    },
    "email": { "status": "unhealthy", "critical": false, "failureRate": 0.8, "timeouts": 12 }
  }
}

(Trimmed for readability. Each dependency also reports min/max/last response time, totals, and last check/success/failure timestamps.)

How status is decided

Per dependency, over a rolling window of the last windowSize checks (default 100):

Status Condition
unhealthy unhealthyConsecutiveFailures failures in a row (default 3), or the last check failed and failure rate ≥ unhealthyFailureRate (default 0.5)
degraded last check failed, or failure rate ≥ degradedFailureRate (default 0.1), or average response time > slowMs (default 1000)
healthy none of the above
unknown no checks run yet

Overall: unhealthy if any critical dependency is unhealthy; degraded if anything is degraded or a non-critical dependency is unhealthy; otherwise healthy.

Latency numbers (avg/min/max/p95) are computed from successful checks only; failures and timeouts are counted separately.

Timeouts

Every check runs under a timeout (timeoutMs, default 5000, overridable per dependency). When it fires the check is recorded as a timeout failure and the AbortSignal passed to your check is aborted so it can cancel the underlying request.

Built-in checks

All take your own client, so the package adds no dependencies.

checks.http(url, { method, headers, body, expectedStatus }) // expectedStatus: number | number[] | (status) => boolean
checks.tcp(host, port)
checks.postgres(pool)      // pg Pool/Client      -> SELECT 1
checks.mysql(pool)         // mysql2/promise      -> SELECT 1
checks.mongo(dbOrClient)   // Db or MongoClient   -> { ping: 1 }
checks.redis(client)       // node-redis/ioredis  -> PING
checks.prisma(client)      // Prisma              -> SELECT 1
checks.database(fn)        // any async function

Or write your own: any function that throws, rejects, or returns false is a failure.

watchdog.addDependency('queue', async ({ signal }) => {
  await myQueue.ping({ signal });
});

Options

createWatchdog({
  name: 'service',
  windowSize: 100,
  timeoutMs: 5000,
  slowMs: 1000,
  degradedFailureRate: 0.1,
  unhealthyFailureRate: 0.5,
  unhealthyConsecutiveFailures: 3,
  cacheMs: 5000, // /health reuses results younger than this so probes can't hammer your dependencies
});

watchdog.middleware(opts):

  • details (default true): set false for a minimal { status, timestamp } response.
  • includeErrors (default false): raw error messages can contain hostnames or credentials, so they are redacted unless you opt in.
  • cacheMs: override the constructor value.
  • degradedStatusCode (default 200): e.g. set 207 or 503 if your load balancer should react to degraded.

API

  • addDependency(name, check, { type, critical, timeoutMs, slowMs }), removeDependency(name)
  • checkOne(name), checkAll() run checks now
  • getReport({ includeErrors }) returns the latest data without running checks
  • start(intervalMs), stop() background polling (timers never keep the process alive)
  • Events: watchdog.on('check', ...), watchdog.on('statusChange', ({ dependency, from, to }) => ...) (dependency is null for overall status)

Works with Express, Connect, and plain http servers. TypeScript types are included.

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm dependency-watchdog

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229