We take the security of HasiiMusicBot seriously. We appreciate your efforts to responsibly disclose any security vulnerabilities you find.
If you discover a security vulnerability within this project, please report it immediately and privately. Please DO NOT open a public GitHub issue.
To report a vulnerability, please contact the project maintainer directly on Telegram:
Telegram User: @Hasindu_Lakshan
In your report, please include:
- Vulnerability Description: A clear and detailed explanation of the security issue
- Reproduction Steps: Detailed steps to reproduce the vulnerability (including necessary configuration, code snippets, or logs)
- Version Information: The version of the project you are using (commit hash, release tag, or branch name)
- Impact Assessment: Your assessment of the potential impact and severity
- Suggested Fix: (Optional) Any recommendations for fixing the vulnerability
- Disclosure Timeline: Your preferred timeline for public disclosure (if applicable)
- Initial Response: We will acknowledge your message within 48 hours
- Status Updates: Regular updates on the investigation and fix progress
- Resolution: We aim to provide a fix or mitigation within 7-14 days for critical vulnerabilities
- Credit: Security researchers will be credited in the release notes (unless anonymity is requested)
To ensure you have the latest security patches and features, we strongly recommend running the latest stable release of HasiiMusicBot.
Security updates will generally be provided for the following versions:
| Version | Supported | Security Updates | Notes |
|---|---|---|---|
Latest Stable Release (HEAD of main branch) |
β | β Yes | Fully supported with active security patches |
| Previous Releases (< 30 days old) | π Limited | Critical security fixes only | |
| Older Releases (> 30 days) | β | β No | Upgrade required |
| Development/Beta Branches | β No | Use at your own risk |
As HasiiMusicBot is a self-hosted Telegram bot, users are responsible for implementing critical security practices:
- Never Expose Secrets: Never commit your Telegram Bot Token, API ID, API Hash, MongoDB URI, Session Strings, or any other sensitive credentials to version control
- Use Environment Variables: Store all credentials in
.envfiles (never commit these to git) - Rotate Credentials: Regularly rotate bot tokens and session strings, especially if you suspect compromise
- Session String Security: Pyrogram session strings have the same access as your Telegram account - protect them carefully
- MongoDB Security: Use strong passwords and enable MongoDB authentication; restrict network access
- Cookie Files: If using YouTube cookies for age-restricted content, ensure they're stored securely and not committed to git
- Trusted Environments Only: Run the bot only on secure, trusted systems with restricted access
- Firewall Configuration: Configure firewalls to allow only necessary inbound/outbound connections
- User Permissions: Run the bot with minimal required system permissions (avoid root/administrator)
- Log Security: Protect log files from unauthorized access as they may contain sensitive information
- VPS/Server Hardening: Keep your hosting environment patched and secure
- Regular Updates: Keep all Python packages updated to patch known vulnerabilities
pip install -U -r requirements.txt
- Dependency Auditing: Periodically check for vulnerable dependencies
pip install safety safety check -r requirements.txt
- System Dependencies: Keep FFmpeg, Deno, and system packages updated
- Python Version: Use supported Python versions (3.10+) with active security updates
- Owner ID Protection: Set
OWNER_IDto your Telegram user ID only; never share owner privileges - Sudo User Management: Carefully manage sudo users - they have elevated bot permissions
- Blacklist Feature: Use the blacklist feature to block abusive users or chats
- Authorization System: Use the
/authcommand to grant playback permissions selectively - Admin Verification: Ensure the bot verifies admin status before executing privileged commands
- Regular Log Reviews: Monitor
log.txtfor suspicious activities or unauthorized access attempts - Database Backups: Regularly backup your MongoDB database
- Incident Response Plan: Have a plan for responding to security incidents:
- Revoke compromised credentials immediately
- Review logs for unauthorized access
- Assess data exposure
- Notify affected users if necessary
- Update credentials and redeploy
- Rate Limiting: Be aware of Telegram's rate limits to prevent abuse
- β Don't: Commit
.envfiles or session files to GitHub - β Don't: Share screenshots containing bot tokens or API credentials
- β Don't: Use the same bot token across multiple deployments
- β Don't: Run the bot with root privileges
- β Don't: Expose MongoDB to the public internet without authentication
- β Don't: Ignore dependency update warnings
- β Don't: Share your Pyrogram session strings (they provide full account access)
| Date | Type | Severity | Status | Description |
|---|---|---|---|---|
| No security incidents reported | - | - | - | - |
We follow responsible disclosure practices. Security researchers who report vulnerabilities responsibly will be:
- Acknowledged publicly (unless they prefer to remain anonymous)
- Credited in release notes and security advisories
- Given reasonable time to verify fixes before public disclosure
This software is provided "as is" under the GNU General Public License v3.0 (GPL-3.0). While we strive to maintain security, users are responsible for their own deployments and should follow best practices outlined above.
Last Updated: August 22, 2026
Contact: @Hasindu_Lakshan on Telegram