RepoOps
Open the app
04 / AI Security

Find the env var nobody declared before you deploy

Three scans read what a repository declares before it ships: the env vars the code reads against the ones your env files declare, the classic secret and network footguns in the checkout, and what your coding agent is allowed to do there. Each finding names the file, the line and the fix, and none of them changes a file.

Last updated

Watch it

30.0 s, captions on. Narration: Microsoft Zira Desktop (provisional voice; an approved narration source is pending).Transcript
Read the narration
  1. 0:00 It works on your machine.
  2. 0:02 Prod boots with a variable nobody declared.
  3. 0:06 Compare what the code reads with what the env files declare.
  4. 0:10 Names, never values.
  5. 0:13 Each finding names the file and line, the variable, and the fix.
  6. 0:17 A clean result means these checks did not fire.
  7. 0:23 Fix the declaration before the deploy.
  8. 0:25 The guide covers the five checks.

Synthetic example. Read the guide

1

How to

The RepoOps desktop app tracking the repository, and git on the machine. The tracked path must be a git working tree.

A .env.example at the repository root. Without one the env scan reports that once instead of checking each variable.

  1. Open Settings under This machine, and pick the repository on the Config doctor card.

    The card reads the last scan on open, or scans when there is none. It lists tracked files and the untracked files git does not ignore, finds every env var the code reads and every KEY= line in the .env family, and runs five checks. The pill counts critical, high and heads-up; findings sort High first.

  2. Fix each finding from its How to fix line, then press Scan again.

    The checks are: An env var your code reads is never declared (High), A var in your .env isn't in .env.example (High), No .env.example, but your code reads env vars, A hard-coded localhost URL will break in prod, and A var in .env.example is never used. Each card shows up to 25 path:line rows. The server keeps the last result until you press Re-scan or restart the app.

  3. Record each variable in the registry.

    Env config renders the repository's .claude/brain/config.md. Add a row per variable naming what reads it and what happens when it is missing. Without the file the tab shows its empty state; the Config doctor works either way.

  4. Open AI Security, then the Secrets tab, and press Re-scan on Footgun checks under What an agent could leak.

    Seven checks run over every tracked and untracked-not-ignored file: a .env file tracked by git and a key committed in a tracked file (Critical); a key in a file about to be committed, a server bound to all interfaces, and a wildcard or reflected CORS origin (High); a .env that .gitignore does not cover and a key-shaped string in a test or example file (Heads-up). A matched secret shows only its first four and last two characters.

  5. Arm the write-time secret gate, if agents write code on this machine.

    Under Write-time secret gate, tick Check every write against the secret patterns, then press Send a test candidate write and read Blocked in the log. Tick Refuse a write the gate could not check only if the dashboard runs whenever your agent does. Agent Code Security covers the gate in full.

  6. Open AI Security, then Risky commands and enforcement, pick the repository under What the repository lets an agent do, and read Claude Code permissions.

    It merges .claude/settings.json and .claude/settings.local.json (local wins on the mode) and shows the resolved mode, every allow, ask and deny rule, the hooks, the autonomy zones and the Risk findings behind a 0 to 100 score: 100 minus 40 per error, 20 per warning and 5 per info finding.

  7. Under Allow rules no session used, read each rule's verdict, then press Propose removing them.

    Each allow rule is checked against the tool calls this repository's Claude Code sessions made on this machine in the last 30 days: used (how often, and when last), unused, too new to judge (the posture history shows it added inside the 30 days), or not judged (a pattern RepoOps cannot evaluate). Nothing is suggested until 20 sessions ran in the window. The button opens one pull request against .claude/settings.json that removes the unused project rules; a rule in .claude/settings.local.json is not committed, so you remove it there yourself. RepoOps never edits the file and never removes a deny rule. Nothing changes until a person merges the pull request, and with PromptCompute connected the request also waits there for the person who approves access. In Ask: "Which permissions has my agent never used?"

2

Use cases

A fresh clone that boots half-configured

Situation
An agent added a webhook handler that reads a new variable. The value sits in one developer's local .env and nothing else names it.
You do
Open the Config doctor on Settings, read the High finding, add the blank placeholder to .env.example as the fix shows, set the value on the deploy host, and press Scan again.
You see
The high pill reads 0 and the variable is declared where a fresh clone and a deploy can see it. Whether the host has the value is something only the host knows.

A repository that grants its agent bypass

Situation
A teammate committed .claude/settings.json with permissions.defaultMode set to bypassPermissions.
You do
Open Claude Code permissions on AI Security's Risky commands and enforcement tab, read the default mode and where it comes from, then the high finding under Risk findings. Remove the mode, add scoped Bash allow rules and a deny for secret files, and reload.
You see
The error is gone and the score rises by 40. The score counts findings by severity; it is not a measure of safety.
3

Expected outcome

WorkedThe Config doctor reads No finding and says none of the checks fired in the files scanned, and that the scan does not check the values set where you deploy.
WorkedFootgun checks reads No footguns found, with the number of files it read.
WorkedClaude Code permissions reads no risks found, and the posture is 100 only when no check, including the MCP and autonomy checks, added a finding.
Did not workCould not scan: not a git repository (sync the repo first).

Next step: The tracked path is not a git working tree or has not synced. Sync it, then press Scan again.

Did not workFootgun checks reads Unknown, not clean.

Next step: The scan read no files or git failed. Confirm the repository path in repos.config.json is a git checkout, then press Re-scan. It never paints clean for a scan that read nothing.

Did not workThe Config doctor says the repository is large, so the scan stopped early.

Next step: The scan stopped at 4,000 files or 24 MB. The findings cover the files it read; no setting raises the bound.

Did not workClaude Code permissions says to track a repository.

Next step: No repository is tracked on this machine. Add one in Setup, then reopen the tab.

Did not workPropose removing them is off and says fewer than 20 sessions ran.

Next step: A quiet month is not evidence. Work in the repository with Claude Code, and the rules are judged once 20 sessions ran in 30 days.

Did not workNot proposed: a pull request for this repository still waits for a person.

Next step: Merge or close the open pull request on GitHub first. One removal pull request per repository is open at a time.

4

What else to consider

What the env scan cannot see

It reads what git can list, so a gitignored .env is outside it, and it never reads a value or your deploy host. It skips docs, HTML, JSON, tests, examples, CI workflows and flag names ending in _OFF, _DISABLE, _SKIP, _ENABLE or _DEBUG, and it treats platform variables such as NODE_ENV and PORT as set. The Aggregator vendor keys panel under the findings reads set or missing for CURSOR_ADMIN_KEY and the Copilot metrics pair, never the values.

What the guardrails do not cover

They are the high-frequency footguns, not an audit. Cloud configuration, IAM and git history are out of scope, and each fix points at the command rather than running it. A clean result means none of these checks fired, not that the app is secure.

What the permission posture reads

Two files in the repository. It cannot see what a user-level settings file adds, and autonomy zones are shown read-only: they change in the repository's declared intent, not on this page. The unused-rule check reads only Claude Code sessions on this machine, newest 400 transcripts, so a rule another tool or another machine uses can read unused; review each rule before you merge.

Cost, egress and where it runs

Desktop only, with no model call and nothing sent anywhere. No hosted page shows these findings. None of the scans has an off switch: each runs when its page opens.