data/config.json- Contains Pi-hole passwords and URLs.env- Contains environment-specific secretsdocker-compose.local.yml- Contains local development settingsdebug-logs/*.json- May contain system information and credentialsbackups/*- May contain sensitive Pi-hole data
# Configuration files with credentials
/data/config.json
/data/instance_id.txt
/data/*.log
/debug-logs/*.json
/debug-logs/*.log
# Local development files
docker-compose.local.yml
build-local.sh
# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# Backup files
/backups/*Before committing code, ensure:
- No hardcoded credentials: Search for passwords, API keys, or tokens
- No hardcoded URLs: Replace specific IPs/domains with examples
- No sensitive logs: Remove debug logs containing system information
- No local configs: Only commit
.exampletemplate files
# Check for potential credential leaks
grep -r -i "password\|secret\|key\|token" --exclude-dir=node_modules --exclude="*.md" .
# Check for hardcoded IPs (adjust range as needed)
grep -r "192\.168\|10\.0\|172\.16" --exclude-dir=node_modules --exclude="*.md" .
# Check git status for untracked sensitive files
git status- Copy
data/config.json.exampletodata/config.json - Copy
.env.exampleto.env - Copy
docker-compose.ymland customize as needed - Fill in your actual credentials in these copied files
- Copy
docker-compose.local.yml.exampletodocker-compose.local.yml - Customize for your local environment
- Never commit the non-example versions
- Data volumes are properly isolated
- SSH keys are stored in named volumes, not bind mounts
- Backup directory has appropriate permissions
- Sensitive values should come from
.envfiles - Never hardcode secrets in docker-compose files
- Use Docker secrets for production deployments
- Pi-hole admin passwords are only stored in
config.json - No permanent session tokens are stored
- Session cookies are temporary and not logged
- Container-to-container communication only
- No unnecessary port exposures
- DNS configuration is environment-specific
- β Removed hardcoded credentials from all files
- β Updated .gitignore to protect sensitive files
- β Created template files with placeholder values
- β Removed development and temporary files
- β Cleaned up log files containing credentials
- β Updated documentation with example values only
- Review all template files before production use
- Set up proper backup encryption for sensitive data
- Consider implementing credential rotation
- Regular security audits of dependencies
- Monitor logs for credential exposure
Run this command to verify no sensitive data is being tracked:
git log -p | grep -E "(password|secret|192\.168|toto@)" || echo "β
No obvious secrets found in git history"