.env is ignored by git; no environment or key files in the repository
.env is ignored by git. The repository (and the new files that git will add) has no environment files .env, .env.local, .env.production and similar, except the templates .env.example, .env.sample, .env.template without values; and no private key files id_rsa, id_ed25519, .p12, .pfx, .jks, .keystore.
Why. A .env file is where secrets lie in plain text; one git add -A command sends them to history.
How to fix. Add the lines .env, .env.* and !.env.example to .gitignore. Remove a file that got into git from the index and revoke its secrets.
Run. From the project root: shtuk run std-owasp-secrets env. A finding is a file, a line and the kind of secret; the value is not printed. In enforce mode the exit code is 1, in observe and warn it is 0. Settings: /norms/standards/owasp-secrets.md.
The enforcer is the env check of the std-owasp-secrets package.
/norms/rules/std-owasp-secrets/SCR-R03.md.Source text