- Always use environment variables for secrets (passwords, API keys, JWT secrets)
- Never commit
.envfiles or files containing actual secrets - Use
.env.exampleto document required environment variables with placeholder values - Generate secure passwords using:
python -c "import secrets; print(secrets.token_urlsafe(16))" - Generate JWT secrets using:
openssl rand -hex 32 - Rotate secrets regularly in production environments
- Never hardcode passwords, API keys, or secrets in source code
- Never commit actual credentials to git
- Never share
.envfiles or credentials in pull requests or issues - Never use weak/default passwords in production
# Database (optional - uses postgres superuser by default)
DATABASE_URL=postgresql+psycopg2://postgres@localhost:5432/ids_idps_db
# JWT Secret (REQUIRED)
JWT_SECRET=<generate using: openssl rand -hex 32>
# User Passwords (optional - auto-generated if not set)
ADMIN_PASSWORD=<generate using: python -c "import secrets; print(secrets.token_urlsafe(16))">
ANALYST_PASSWORD=<generate using: python -c "import secrets; print(secrets.token_urlsafe(16))">- Copy
backend/.env.exampletobackend/.env - Generate secure secrets and update
.envfile - The
.envfile is automatically ignored by git (see.gitignore)
This repository is configured to be GitGuardian-compliant:
- β All hardcoded secrets have been removed from source code
- β Passwords are read from environment variables or auto-generated
- β
.envfiles are properly ignored in.gitignore - β
Example files (
.env.example) use placeholder values only
- β
backend/.env.example- Contains only placeholder values - β
backend/setup.py- Uses environment variables or generates secure passwords - β All application code - No hardcoded secrets
- β
backend/.env- Actual secrets (DO NOT COMMIT) - β
**/*credentials*.txt- Credential files - β
**/*secrets*.env- Secret environment files
Before committing, ensure:
- No hardcoded passwords in source code
- No
.envfiles added to git staging - All secrets use environment variables or secure generation
- Run:
git statusto verify no credential files are staged
If you discover a security vulnerability:
- DO NOT create a public issue
- Contact the maintainers privately
- Wait for the issue to be resolved before public disclosure