Security & secrets · 2026

Your .env file is probably already in your Git history.
The 15-minute audit that finds it.

A practical secret-hygiene audit for solo founders and small dev teams. Find leaked keys buried in your Git history, rotate them safely, and lock down env vars with five habits so the next leak does not happen — regardless of where you host.

Encrypted secrets, 30-second rotation.

Encrypted env vars, who-injected-what access logs and Telegram alerts when a deploy behaves off-baseline — on every Belmo plan.

No credit card required 1 service free forever Encrypted env vars by default Telegram, email & Slack alerts
Frequently asked

Quick answers

How do I check if a secret is in my Git history?

Do not just grep your working tree — a key you committed and deleted months ago is still in history. Install gitleaks and run gitleaks detect --source . --verbose from the repo root; it scans your entire commit history against provider regex rules (Stripe, GitHub, AWS, OpenAI, Anthropic, Slack). If it finds nothing, run trufflehog as a second opinion, and check GitHub's Security → Secret scanning alerts tab.

If I rotate a leaked key, do I still need to purge it from Git history?

Rotation is the only fix that matters — once the old key is revoked, anyone who finds it later gets a 401. Purging with git filter-repo is cosmetic (GitHub keeps orphan commits by SHA for a while). Purge if the repo was ever public, but never treat rewriting history as a substitute for rotating and explicitly revoking.

How do I stop AI coding tools from hardcoding API keys?

Add to your starter prompt or CLAUDE.md/.cursorrules: "Never write secrets in source files. Always read from process.env.X or os.getenv. Never commit .env." Models mostly respect this but occasionally forget, so back it with a gitleaks pre-commit hook that blocks any accidental key paste.

Where should production secrets actually live?

In your hosting platform's environment-variables section, never in a deployed file. The mental model: repo holds code plus a .env.example with empty values, the platform holds the real values injected at build or process start, and local dev uses a .gitignore'd .env. Three places, no overlap — and never screenshot env vars into Slack or a Loom.

How often should I rotate API keys?

Put a recurring 5-minute calendar event on the same day each month and rotate one or two of your highest-risk keys (the ones that spend money: OpenAI, Anthropic, Stripe, your cloud provider). Over a year you cover everything once. The point is keeping the rotation muscle warm for the real Friday-night incident.