fleetlint Policy for a fleet of repositories
v0.3
Getting started

repo/no-tracked-env

No .env files are tracked

Severityerror
Tiersall
Stacksany
Scopeeach
Kindexpr
Sourcelibrary v0.0.0-20261011205826-ecb4e9b3ffd4
Selected byfleetlint-minimal@0.1.0

Requirement

Environment files that may hold credentials are never committed; templates with placeholder values (.env.example, .sample, .template, .dist) and encrypted files (.sops, .enc, .age, .gpg, .asc) are fine.

Why

A tracked .env is the most common way credentials leak into history.

Check

For each item in:

tracked().filter(f, f.matches('(^|/)\\.env(\\.[^/]*)?$')
                 && !f.matches('\\.(example|sample|template|dist|sops|enc|age|gpg|asc)$'))
false

Fix

git rm –cached the .env file, add .env* to .gitignore, rotate any secret it contained.

Agent instruction: Untrack the .env file, add .env and .env.* (but not .env.example) to .gitignore, and tell the user which secrets must be rotated.

See: https://fleetlint.org/baseline/#security


Generated by fleetlint docs from catalog v0.0.0-20261011205826-ecb4e9b3ffd4.