This project is private and confidential. Only authorized personnel with explicit permission from StreetLevelTech1 may access, use, or contribute to this codebase.
See LICENSE for full terms.
NEVER commit to this repo:
- API Keys (Telegram, Groq, CoinGecko, Alpha Vantage, Tavily, Binance, Kraken)
- Database credentials
- Private encryption keys
- Personal information
- Auth tokens or passwords
Create .env file (NEVER commit this):
# .env (add to .gitignore)
TELEGRAM_BOT_TOKEN=your_token_here
GROQ_API_KEY=your_key_here
DATABASE_URL=your_db_url_here
ADMIN_USER_ID=your_id_here
CHANNEL_ID=your_channel_id_hereLoad in code:
from core.config import cfg # Already does this via dotenvEnsure these are in .gitignore:
# Environment
.env
.env.local
.env.*.local
# Secrets
*.key
*.pem
secrets/
config/secrets.yml
# IDE
.vscode/
.idea/
*.swp
*.swo
# Python
__pycache__/
*.pyc
*.pyo
*.egg-info/
dist/
build/
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Database
*.db
*.sqlite
*.sqlite3
Before each commit:
# Check if any secrets are about to be committed
git diff --cached | grep -i "api_key\|token\|password\|secret"Scan history for secrets:
# Using git-secrets (install first)
git secrets --scanIf you've ever committed a secret:
- Immediately revoke it in the respective service
- Generate a new one
- Update your
.envfile - Force push (carefully) or use BFG repo-cleaner to remove from history
- Alert your team
For Telegram Bot Token:
1. Go to https://t.me/BotFather
2. Select your bot
3. /revoke → /newtoken
For Groq API Key:
1. Go to https://console.groq.com/keys
2. Delete the compromised key
3. Create a new one
GitHub Settings → Collaborators & Teams:
- ✅ Only add trusted contributors
- ✅ Use role-based access (Admin/Maintain/Write)
- ✅ Require approval for direct push to main
- ✅ Enable branch protection rules
Branch Protection (Settings → Branches):
- ✅ Require pull request reviews
- ✅ Require status checks to pass
- ✅ Require branches to be up to date
- ✅ Restrict who can push
GitHub → Settings → Audit Log:
- Monitor who accessed the repo
- Track changes to settings
- Detect unauthorized access
- Immediately make it private (if it's public)
- Rotate ALL credentials (API keys, tokens, passwords)
- Review recent commits for suspicious changes
- Check GitHub Activity Log for unusual access
- Notify your team if applicable
- Consider re-creating the repo if severely compromised
Run these commands to see if secrets are in your repo:
# Check current uncommitted changes
git diff | grep -i "api_key\|token\|password\|secret"
# Check last 100 commits
git log -p -100 | grep -i "api_key\|token\|password\|secret" | head -20
# Check all branches
git log --all -p | grep -i "TELEGRAM_BOT_TOKEN\|GROQ_API_KEY" | head -20If you find secrets:
- Stop and fix immediately
- Regenerate the credentials
- Use git-filter-branch or BFG to remove from history
- Force push (be careful!)
- Never paste
.envcontents into GitHub - Use Render's Environment Variables UI:
- Settings → Environment → Add Variable
- Add each secret separately
- Do NOT commit
render.yamlwith secrets - Use GitHub Secrets for CI/CD (if applicable)
- Create
.envlocally (NOT in repo) - Load it at startup (already done via
core.config) - Test that it loads correctly before pushing
- Never share
.envfile with anyone
Before each deployment or major change:
- No secrets in recent commits?
-
.gitignorehas all sensitive paths? -
.envfile is in.gitignore? - Only authorized collaborators have access?
- GitHub branch protection enabled?
- All credentials rotated in last 90 days?
- Audit log reviewed for suspicious activity?
- Environment variables set on production server?
- GitHub: Keeping your account and data secure
- OWASP: Secrets Management Cheat Sheet
- git-secrets
- BFG Repo-Cleaner
Last Updated: June 19, 2026
Status: Active — Review this document regularly