All workAndrew Cates.

Project 34 of 84

env-sync Viewer

Fleet-wide secrets-drift monitor for the catesworks org: a scheduled collector runs the env-sync CLI against every service in a reviewed inventory and writes results to Postgres, and a read-only, auth-gated Next.js dashboard shows the latest per-key drift state of every target and flags targets that have gone quiet.

Status
Shipped
Area
Infra & Platform Ops
Last activity
2026
Stack
  • TypeScript
  • pnpm workspaces
  • Turborepo
  • Next.js
  • React
  • Supabase Auth
  • PostgreSQL
  • Drizzle ORM

Highlights

  1. Designed and shipped env-sync-viewer, a fleet-wide secrets-drift monitor: a 6-hourly GitHub Actions collector runs the env-sync CLI against 90+ CapRover and Vercel services and a read-only Next.js 16 dashboard shows per-key drift and flags silent targets as stale.
  2. Enforced least privilege in the database: INSERT-only collector and SELECT-only viewer Postgres roles under FORCE ROW LEVEL SECURITY, storing only 12-character SHA-256 fingerprints, compared server-side so no fingerprint or value reaches the browser.
  3. Closed a manifest-steered credential-exfiltration path before scaling: strict per-service pre-flight allowlist over a vendored, hash-pinned copy of env-sync's own parser, plus a test-pinned CapRover domain allowlist, then grew coverage from 4 to 41 CapRover services in 7 batches.
  4. Added Vercel as a second platform with one project-scoped token per service in an isolated per-platform job, after probing showed a team token reached 101 projects; onboarded 50 Vercel services and built a resumable, rate-limit-aware re-mint script with a 1Password master copy.
  5. Made credential scoping fail closed: each env-sync child gets an explicit environment (base floor, its platform's credentials, empty HOME) and ordered credential-free probes prove the pinned CLI enforces ENV_SYNC_ALLOWED_PLATFORMS before any write.
  6. Joined the collector to a tailnet as an ephemeral, tag-scoped node with one ACL grant and ACL tests so it reads 1Password through a tailnet-only Connect server.
  7. Ran each rollout step through consensus-reviewed plans, mutation-tested guards and real workflow runs read back from the database (e.g. 611 rows, 610 MATCH after the env-sync 0.5.0 pin; clean 50 Vercel + 40 CapRover run on 2026-10-12).
  8. Shipped a Docusaurus docs site and an anonymous Next.js marketing site (36 pages) whose copy is pinned to the code by drift tests, with 0 axe WCAG 2.2 AA violations across 37 paths; all Vercel deploys are manual from main-only environments.