- HIVE_ACTIVE_KEY - Can transfer funds, execute trades
- HIVE_POSTING_KEY - Can post content, vote
- HIVE_OWNER_KEY - Full account control (NEVER use in bots)
- BLURT keys - Same risk as HIVE
- STEEM keys - Same risk as HIVE
- DISCORD_TOKEN - Full bot control
- GOOGLE_API_KEY - Gemini AI access
- Discord webhook URLs - Can spam your channels
- Blockchain keys: Stolen funds, account takeover, irreversible transactions
- API keys: Unauthorized usage, banned accounts, data breaches
- Webhook URLs: Channel spam, reputation damage
All sensitive values go in .env file:
# β
CORRECT - In .env file (ignored by git)
HIVE_ACTIVE_KEY=5JxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxK
DISCORD_TOKEN=MTxxxxxxxxxxxxxxxxxxxx.yyyyyy.zzzzzzzzzzzzzzzzzzzz
GOOGLE_API_KEY=AIzaSyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxPublic repository includes template with placeholders:
# β
CORRECT - In .env.example (safe to commit)
HIVE_ACTIVE_KEY=your_hive_active_key
DISCORD_TOKEN=your_discord_bot_token
GOOGLE_API_KEY=your_gemini_api_keyVerify .env is excluded:
# Check .gitignore includes:
.env
*.env
!.env.exampleAlways check what you're committing:
git diff # Review changes
git status # Verify no .env files staged
git log -1 --stat # Check last commit1. Immediate Action (DO THIS FIRST)
# Change ALL compromised keys IMMEDIATELY
# For HIVE: Use Hive Keychain or hive.blog to generate new keys
# For Discord: Reset bot token in Discord Developer Portal
# For Gemini: Revoke and create new API key2. Git History Cleanup (Do this even if you force-pushed)
# WARNING: This rewrites git history - coordinate with team
git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch .env" \
--prune-empty --tag-name-filter cat -- --all
# Force push (ONLY after changing keys)
git push origin --force --all3. Verify Cleanup
# Search entire git history for leaked keys
git log --all --full-history --source -- .env4. Post-Incident
- Monitor accounts for unauthorized activity
- Check blockchain transaction history
- Review API usage logs
- Update documentation
- β
Use
.envfor all secrets - β
Use
.env.examplewith placeholders - β Test with fake/placeholder credentials first
- β Use dry run modes before live trading
- β
Never log sensitive values (
console.log(key)β)
- β Generate keys on secure, offline device when possible
- β Use HIVE Keychain or official wallet tools
- β Store backups in encrypted password manager (1Password, Bitwarden)
- β Never email/message keys in plaintext
- β Never screenshot keys
- β Never share Owner Keys with bots
Use least-privilege principle:
| Key Type | Use For | Risk Level |
|---|---|---|
| Owner Key | Account recovery ONLY | π΄ CRITICAL - Never use in bots |
| Active Key | Transfers, trading | π HIGH - Use for trading bots only |
| Posting Key | Content, voting | π‘ MEDIUM - Use for content bots |
| Memo Key | Encrypted messages | π’ LOW - Rarely needed |
- β Start with small test amounts
- β
Enable dry run mode initially (
DRY_RUN=true) - β Set max position limits to prevent over-trading
- β Use stop-loss limits to prevent catastrophic losses
- β Monitor transactions via blockchain explorers
- β Keep separate trading account from main holdings
Before deploying any bot:
- All keys stored in
.envfile -
.envin.gitignore -
.env.exampleuses placeholders only - Tested with fake credentials first
- Dry run mode works correctly
- Stop-loss and position limits configured
- Discord webhooks tested
- API rate limits understood
- Emergency stop procedure documented
- Team members know NOT to commit keys
When reviewing pull requests:
-
Search for sensitive patterns:
# Search for potential keys git diff | grep -i "key\|token\|secret\|password" # Search for HIVE keys (start with 5) git diff | grep "5[HJK][1-9A-HJ-NP-Za-km-z]\{49\}" # Search for Discord tokens git diff | grep "MTxxxxxxxxxxxxxxxxxx"
-
Verify no hardcoded credentials:
- Check for
=followed by long alphanumeric strings - Look for base64-encoded values
- Verify environment variables are used
- Check for
-
Reject PRs immediately if:
- Any
.envfile (except.env.example) - Any hardcoded keys or tokens
- Any files with
secretorprivatein name
- Any
- Hive Keychain: Browser extension for secure key management
- HiveAuth: Secure authentication without exposing keys
- HIVE.blog: Web wallet with key management
- 1Password / Bitwarden: Password managers for key storage
- git-secrets: Tool to prevent committing secrets
- truffleHog: Scans git repos for secrets
- GitHub Secret Scanning: Automatic detection (enable in repo settings)
If you discover a security issue:
- DO NOT discuss in public channels
- DO notify team leads immediately via secure channel
- DO follow incident response procedures
- DO document lessons learned (after resolution)
- v1.0 (2026-01-09): Initial security guidelines
- Key management best practices
- Emergency response procedures
- Code review guidelines
- Team communication protocols
Remember: Security is everyone's responsibility. When in doubt, ask before committing!
The Van Kush Family's funds and reputation depend on proper security practices.