- Never commit real
.envfiles. - Keep only
.env.exampletemplates in git. - Generate strong secrets before production use:
JWT_SECRET_KEYat least 32 characters.BIOMETRIC_INGEST_API_KEYat least 16 characters.
- In production (
APP_ENV=production), backend startup now rejects weak default secrets/passwords.
- Ensure repository is private if it contains internal business logic.
- Enable branch protection on
main(required PR + status checks). - Enable GitHub Dependabot alerts and secret scanning.
- Add repository secrets (for CI/CD), never plaintext in workflow files.
- Backend container runs as non-root user.
- Frontend is served by Nginx with API reverse proxy.
- Do not expose backend port publicly unless required by your deployment topology.
- Use HTTPS termination in production (reverse proxy/load balancer).
- Verify
git statushas no real credentials. - Confirm no local DB dumps or key files are staged.
- Keep only template values in
.env.examplefiles. - Rotate any secret that may have been previously committed.