# bluewave-labs/checkmate — AlpLab Radar Static Code Audit

- Ring: `adopt`
- Category: `dev`
- Overall score: `4.1/5`
- Implementation check: `verified`
- Maturity: `mature`
- Audited commit: `e645fbe4dceb` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-02T05:51:29Z
- Repository: https://github.com/bluewave-labs/checkmate
- Radar entry: https://radar.alplab.co/#repo/bluewave-labs/checkmate
- License: `AGPL-3.0`
- CI workflows: `.github/workflows`
- Tags: `uptime-monitoring`, `self-hosted`, `devops`, `status-pages`, `notifications`, `docker`

## Summary

A self-hosted uptime and infrastructure monitoring platform — React/MUI client plus Express 5/TypeScript server on MongoDB with a DB-backed job queue running 11 check provider types (HTTP, ping, port, DNS, Docker, gRPC, WebSocket, game, pagespeed, hardware-via-Capture, heartbeat), a status/threshold evaluation pipeline with incidents and 13 notification providers, public status pages, and optional Checkmate Connect cloud backup/tunnel.

## Implementation Check

Every core README claim maps to working code — monitor types in server/src/service/networkProviders/* with providerRegistry.ts, heartbeat ping keys in server/src/domain/heartbeat/heartbeat.service.ts, distributed workers in server/src/worker/worker.job-scheduler.ts (QUEUE_MODE worker/primary with queue_workers registry), Connect backups/tunnel in server/src/domain/connect/connect-tunnel.ts and connect.backup-tools.ts, and 19 locale files under client/src/locales/ — only the scale claims (1,600+ servers, memory footprint) are unverifiable statically.

## When to Use

Use it as a self-hosted replacement for SaaS uptime monitoring — website/server checks, cron heartbeats, Docker container and hardware monitoring with alerting across 13 channels and public status pages; skip it if you need a hosted SaaS, any client-side test guarantees, or cannot accept AGPL-3.0 terms for modified public deployments.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.5/5 |
| usability | 4.5/5 |
| reliability | 3.0/5 |
| security | 4.0/5 |
| integration | 4.5/5 |

## Code Evidence

server/src/index.ts startApp() builds shared services and branches primary vs worker mode via JobScheduler/HealthServer; server/src/worker/worker.pipeline.ts WorkerPipeline implements produce→buffer→ingestChecks→handleEvaluate with egress-degradation skipping (skipDegradedEgressCheck) and job-lease pullEvaluated for multi-worker safety; server/src/service/statusService.ts StatusService.updateMonitorStatus computes rolling status-window thresholds plus hardware/Docker breach counters; server/src/service/networkProviders/HttpProvider.ts uses pooled keep-alive agents with hpagent proxy cache and an insecure agent only behind explicit ignoreTlsErrors; server/src/service/networkProviders/DockerProvider.ts supports unix socket, mutual-TLS with the client key AES-256-GCM encrypted at rest (server/src/service/encryption/encryptionService.ts, versioned ciphertext with key-id rotation list), and Capture-agent fallback including log demux/truncation; server/src/domain/heartbeat/heartbeat.service.ts recordPing hashes the ping key before lookup and pushes back the dead-man's-switch job; server/src/domain/connect/connect-tunnel.ts validateTunnelRequest pins relayed requests to the local origin with an allowlisted method set and drops hop-by-hop headers, while connect.backup-tools.ts spawns mongodump/mongorestore with argument arrays and 0600 config files; server/src/app.ts wires helmet, CORS pinned to CLIENT_HOST, DOMPurify sanitizeBody/sanitizeQuery, and swagger UI from a generated openapi.json; server/src/api/routes/buildRouter.ts applies verifyJWT plus isAllowed role guards per route (e.g. deleteAllMonitors is superadmin-only in monitorRoutes.ts); tests are real and deep — server/test/unit/services/workerPipeline.test.ts, statusService.test.ts, monitorService.test.ts (113KB), dbQueueWorker.test.ts, plus ~28 integration tests (evaluateCursorMultiWorker.test.ts, heartbeatJobDownDetection.test.ts, incidentLifecycle.test.ts) — and .github/workflows/check-tests.yml runs npm test with coverage on every PR.

## Issues Found

CSP in server/src/app.ts allows 'unsafe-inline' and 'unsafe-eval' in script-src and sets hsts:false, weakening browser hardening; envValidation.ts only requires JWT_SECRET.min(1) and the default TOKEN_TTL is 99d (long-lived bearer tokens); .github/workflows/* use tag-ref unpinned GitHub Actions (e.g. actions/checkout@v4) across 22 steps; generalApiLimiter is skipped entirely when NODE_ENV=development (the default), so an operator who forgets NODE_ENV=production silently loses global rate limiting; sanitize.ts DOMPurify-strips all tags from every string in every request body, which can silently mangle legitimate payloads containing angle brackets; client/tsconfig.tsbuildinfo (a build artifact) is committed to the repo.

## Key Risks

Nothing was executed; all conclusions are from reading code at commit e645fbe. The React client has no test suite at all and CI (check-tests.yml) covers server tests only, with build/lint checks for the client. Runtime requirements: Node >=24, an external MongoDB, mongodump/mongorestore on PATH for Connect backups (bundled in the Docker image), and Capture agent for hardware metrics. AGPL-3.0 license obligations apply to modified deployments; the Helm chart is still on legacy v3.8.1 images per README. Scale and memory-footprint claims, telemetry receiving service behavior, and the Connect cloud side could not be verified statically.

## Reviewed Files

- `README.md`
- `package.json`
- `docker/Dockerfile`
- `docker/docker-compose.yaml`
- `SECURITY.md`
- `.github/workflows/check-tests.yml`
- `.github/workflows/check-build.yml`
- `server/package.json`
- `server/.env.example`
- `server/jest.config.ts`
- `server/src/index.ts`
- `server/src/app.ts`
- `server/src/config/routes.ts`
- `server/src/config/envValidation.ts`
- `server/src/worker/worker.pipeline.ts`
- `server/src/worker/worker.job-scheduler.ts`
- `server/src/worker/worker.health-server.ts`
- `server/src/service/statusService.ts`
- `server/src/service/globalPingService.ts`
- `server/src/service/encryption/encryptionService.ts`
- `server/src/service/networkProviders/HttpProvider.ts`
- `server/src/service/networkProviders/DockerProvider.ts`
- `server/src/domain/heartbeat/heartbeat.service.ts`
- `server/src/domain/users/user.service.ts`
- `server/src/domain/monitors/monitor.service.ts`
- `server/src/domain/monitors/monitor.schema.ts`
- `server/src/domain/monitors/monitor.model.ts`
- `server/src/domain/notifications/notification.service.ts`
- `server/src/domain/notifications/providers/INotificationProvider.ts`
- `server/src/domain/notifications/providers/webhook.ts`
- `server/src/domain/connect/connect-tunnel.ts`
- `server/src/domain/connect/connect.backup-tools.ts`
- `server/src/domain/telemetry/telemetry.service.ts`
- `server/src/api/controllers/monitorController.ts`
- `server/src/api/routes/monitorRoutes.ts`
- `server/src/api/routes/buildRouter.ts`
- `server/src/api/middleware/verifyJWT.ts`
- `server/src/api/middleware/verifyStatusPageAccess.ts`
- `server/src/api/middleware/rateLimiter.ts`
- `server/src/api/middleware/sanitization.ts`
