-
NEVER commit
.envfiles to version control- The
.envfile contains sensitive credentials - It is already listed in
.gitignoreto prevent accidental commits - Use
.env.exampleas a template
- The
-
Setup your local environment
# Copy the example file cp .env.example .env # Edit .env with your credentials # The file will be ignored by git
-
Use Gmail App Passwords
- DO NOT use your regular Gmail password
- Create an App Password: https://support.google.com/accounts/answer/185833
- Store the App Password in your
.envfile
-
Use GitHub Secrets for credentials
- Never hardcode credentials in workflow files
- Use encrypted secrets: Settings → Secrets and variables → Actions
-
Required secrets:
SMTP_HOST- Your SMTP server (e.g., smtp.gmail.com)SMTP_USER- Your email addressSMTP_PASS- Gmail App Password (NOT regular password)NOTIFICATION_EMAIL- Email for notifications
The following files/patterns are excluded from version control:
.env- Contains SMTP credentials*.db- SQLite database files (too large, contains processed data)*.log- Log files may contain sensitive information__pycache__/- Python cache files
If you accidentally commit secrets:
- Immediately rotate/change the exposed credentials
- Remove from git history:
git filter-branch --force --index-filter \ "git rm --cached --ignore-unmatch .env" \ --prune-empty --tag-name-filter cat -- --all - Force push to remote (requires coordination with team):
git push origin --force --all
- SQLite database files are excluded from git (too large, binary format)
- Database is recreated on each environment from raw data
- No sensitive/personal data is stored in the database
- All data comes from public CAISO reports
If you discover a security vulnerability, please report it by:
- Creating a private security advisory in GitHub
- NOT creating a public issue
- Emailing the maintainer directly
Before committing:
- No credentials in code or config files
-
.envfile not staged for commit - No API keys or tokens in files
- Secrets use environment variables or GitHub Secrets
- Database files not committed
- Log files cleaned/excluded