SchemaFirst found 15 plaintext secrets in 11 files and drafted a varlock schema
SchemaFirst reads .env files, compose, workflows and MCP configs, drafts a varlock .env.schema and validates it with the real varlock CLI. On our synthetic monorepo it marked 15 items sensitive.
By David Discua
Measured in the lab
- 38
- variables in the draft
- 15
- plaintext secret occurrences
- 0 of 15
- secret values in outputs
- 0 in 5 targets
- varlock schema errors
- 13 env-bearing files scanned across 6 source kinds
- varlock scan root locations match ours (5 of 5)
- Wrong-typed PORT rejected by varlock with the draft
- Unquoted $NAME hazard confirmed by varlock load
- Secrets appear only as keyed fingerprints
From reports/measured.json · run on October 21, 2026. Synthetic fixture fixtures/acme-monorepo with fake values, run on a temp copy; varlock 1.23.0; optional description path not run
How it is wired
01/03Your repo keeps env values in many files.
varlock protects env vars once they are described in .env.schema with types, @sensitive and required flags. Most repos keep values scattered across .env files, per-service folders, docker-compose.yml, workflow env: blocks and MCP client configs, so the move rarely happens. SchemaFirst Migrator is our CLI that scans all of those, drafts the schema, validates it with the real varlock CLI and lists every file that still holds a plaintext secret. On our synthetic monorepo it drafted 38 variables, marked 15 sensitive and found 15 plaintext secret occurrences in 11 files. The catch is that sensitivity is a heuristic, so read the "Why" column before you commit the draft.
The catch
Classification uses name patterns, value shape and reference kind. A secret with a config-like name and a short lowercase value can come out @public, and the README gives DB_PASS2X as the example. Unknown items default to sensitive, which errs the safe way.
The fixture is synthetic with fake values, so the counts describe that one repo. "Committed" versus "local" is a filename rule, not git check-ignore. Code usage is regex-based and misses process.env[name]. The tool writes one root schema and no per-service @import schemas. The optional --describe flag sends variable names, never values, to Gemini for one-line descriptions, and the live path was not run in this lab, so the draft has no descriptions.
What we ran (keyless)
bun install --frozen-lockfile
cp -R fixtures/acme-monorepo /tmp/acme
bun --no-env-file src/cli.ts draft /tmp/acme --scan
bun run report
From reports/measured.json, run on October 21, 2026 with varlock 1.23.0:
| Metric | Value |
|---|---|
| Env-bearing files scanned | 13 (claude-settings 1, mcp 3, dotenv 6, dotenv-template 1, workflow 1, compose 1) |
| Variables in the draft | 38 (15 sensitive, 23 public) |
| Items with an inferred varlock type | 19 |
| Plaintext secret occurrences | 15 in 11 files (7 committed, 8 local) |
| Secret references, no plaintext | 4 |
Hazards predicted / confirmed by varlock load | 2 / 1 |
varlock load targets / schema errors | 5 / 0 |
varlock scan root locations matching ours | 5 (yes) |
| Secret values found in schema and report | 0 of 15 checked |
As a baseline, varlock init --agent on the same fixture drafted 12 items with 3 sensitive, and 9 of our 15 sensitive items were missing from it. That baseline reads .env.example and the root .env files with @defaultSensitive=false, so an item like DATABASE_URL, with a password in the URL, comes out public there. It picked up nothing from service folders, compose, workflows or agent configs.
The confirmed hazard was QUEUE_PASSWORD, whose value contains $NAME, which varlock resolves as a reference unless it is single-quoted. The second predicted hazard, a secret-shaped value in a NEXT_PUBLIC_ variable, is accepted by varlock load by design. A wrong-typed PORT was rejected by varlock with the draft in place.
How it is wired
SchemaFirst scans dotenv files, compose environment blocks, workflow env: at every level, MCP configs such as .mcp.json and .codex/config.toml, and .claude/settings*.json. It infers sensitivity and varlock 1.23.0 type names, then runs varlock load --format json-full for the root and every runtime env file, keeping only redacted results in memory. Secrets show up only as keyed fp_ fingerprints, and varlock always runs with telemetry disabled.
Minilab (open source)
SchemaFirst is our own lab, Apache-2.0 and written in TypeScript on Bun, at SkilledDragonCorp/schemafirst-migrator. It validates with dmno-dev/varlock (4,820 stars, MIT, TypeScript, as of October 24, 2026). Run bun --no-env-file src/cli.ts scan path/to/repo for a read-only inventory of your own repo, and add --fail-on-plaintext committed to gate CI.
Run it yourself
SkilledDragonCorp/schemafirst-migrator
Clone, install and run the report with no API keys. The numbers above are what that run writes.
bun install --frozen-lockfile && bun run reportSkilledDragon is not affiliated with or endorsed by varlock / DMNO, Google, Anthropic, GitHub, Docker, Cursor, Microsoft or OpenAI. Numbers are from our own keyless lab run on a synthetic fixture; re-run the report before relying on them.
All labs