The Discord Audio Archive Bot handles sensitive data including Discord tokens, email credentials, and voice recordings. We take security seriously and are committed to protecting users and their data.
Version | Supported |
---|---|
0.1.x | β |
If you discover a security vulnerability, please follow responsible disclosure:
- Email: Send details to the project maintainers via GitHub Issues (mark as security vulnerability)
- Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact assessment
- Suggested fix (if known)
- Timeline: Allow 90 days for response and fix before public disclosure
- Questions about configuration
- Feature requests
- Non-security bugs
- Issues requiring physical access to the host machine
- Environment Variable Isolation: All credentials stored in
.env
files - Input Validation: Discord user IDs and email addresses validated
- Error Sanitization: No credentials exposed in logs or error messages
- File Path Restrictions: Audio files saved to controlled directories only
- SMTP Security: TLS/SSL encryption for email communications
- Administrator Commands: Recording controls require Discord admin permissions
- Token Scope: Bot tokens should have minimal required permissions
- Email Authentication: App passwords recommended over regular passwords
- Never commit
.env
files or credentials - Use virtual environments for dependency isolation
- Regularly update dependencies:
pip install -r requirements.txt --upgrade
- Review logs for suspicious activity
- Monitor Discord API usage and rate limits
- Bot Permissions: Grant only necessary Discord permissions:
- Connect (to join voice channels)
- Speak (for voice activity)
- Use Voice Activity (for recording)
- Read Message History (for commands)
- Email Security: Use Gmail App Passwords, not regular passwords
- System Security: Run bot in isolated environment or container
- Network Security: Restrict outbound connections if possible
- Only invite the bot to servers you trust
- Understand that voice communications will be recorded
- Verify bot permissions before granting access
- Report suspicious bot behavior immediately
Before deploying:
- All credentials stored in
.env
file -
.env
file added to.gitignore
- Bot has minimal Discord permissions
- Email uses App Password authentication
- FFmpeg installed from trusted source
- Log files secured and rotated
- Network access restricted if possible
- Regular dependency updates scheduled
If you suspect a security incident:
-
Immediate Actions:
- Disable the bot (
Ctrl+C
or process termination) - Rotate Discord bot token
- Change email passwords
- Review recent logs for suspicious activity
- Disable the bot (
-
Assessment:
- Determine scope of potential breach
- Check for unauthorized recordings
- Verify email account security
- Review Discord server audit logs
-
Recovery:
- Apply security updates
- Reconfigure with new credentials
- Monitor for continued suspicious activity
- Document incident for future prevention
# Create bot with minimal permissions
# In Discord Developer Portal:
# - Scopes: bot
# - Bot Permissions: Connect, Speak, Use Voice Activity
# - Never share bot token publicly
# Gmail App Password Setup:
# 1. Enable 2FA on Gmail account
# 2. Generate App Password at myaccount.google.com/apppasswords
# 3. Use App Password in EMAIL_PASSWORD, not regular password
# Secure .env configuration
DISCORD_TOKEN=your_bot_token_here # Never share
TARGET_USER_ID=123456789012345678 # Specific user only
EMAIL_ADDRESS=your_secure_email@gmail.com # Dedicated email recommended
EMAIL_PASSWORD=your_app_password_here # App password only
RECIPIENT_EMAIL=recordings@yourdomain.com # Secure recipient
- Discord Bot Security Best Practices
- Gmail App Passwords Setup
- OWASP Application Security
- Python Security Guidelines
When reporting issues, use these labels:
security
- General security concernsvulnerability
- Potential security vulnerabilitiescredentials
- Credential-related issuesprivacy
- Privacy and data protection issues
For security-related questions (non-vulnerabilities):
- Open a GitHub Discussion
- Tag with
security
label - Follow the issue template
Remember: This bot records voice communications. Ensure proper consent and compliance with local laws regarding recording and data retention.
This security policy is reviewed quarterly and updated as needed. Last updated: [Current Date]