Codebase Doctor
A CLI that scans a repository for leaked secrets, vulnerable dependencies, unsafe Postgres RLS, and broken CI. It prints a readable report or SARIF for GitHub code scanning.
TypeScript · Node.js · Vitest · PostgreSQL · SARIF · GitHub Actions
Try it
- Run a sample audit on a disposable fixture:
npx -y codebase-doctor demo - Audit the current repository:
npx -y codebase-doctor audit .
Problem
Repository reviews often depend on opaque model judgment, scattered linters, and one-off commands. That makes coverage difficult to inspect and results difficult to reproduce.
What I built
A TypeScript CLI inventories repositories, builds a bounded multi-language source graph, and scans secrets, dependencies, workflows, RLS, and accessibility. Coverage limits are reported per domain; validation and live database access require separate permission.
Decisions
- Treat skipped or unsupported analysis as visible state instead of a clean result.
- Use stable fingerprints so baselines distinguish new, unchanged, and resolved findings.
Evidence
- 17/17 seeded benchmark cases, 100% rule recall, zero medium+ false positives; 11/11 red-team mutants caught, 7/7 controls clean.
- A 100-repo field study found at least one high-severity finding in 23% of agent-configured repositories; 10% had a broken import target.
- Emits schema-versioned text, JSON, and SARIF with stable fingerprints, and reports coverage limits on every run.
Limits
- Built-in semantic coverage is intentionally narrower than the long-term product map.
- Approved child commands can execute repository-owned tooling, so permission remains explicit.