Skip to content

Security: hsh34811-hash/Telegram-bot-hosting-Python-

Security

SECURITY.md

🔒 Security Policy | سياسة الأمان

🇬🇧 English Version

Protecting Your Sensitive Information

This project requires sensitive information like bot tokens and API keys. NEVER commit these to version control.

What to Protect

NEVER commit these:

  • Bot tokens (from @BotFather)
  • API keys (VirusTotal, Gemini, etc.)
  • Telegram user IDs
  • Phone numbers
  • Personal information
  • .env files with real credentials

Safe to commit:

  • .env.example (template with placeholder values)
  • Code with placeholder values like YOUR_BOT_TOKEN_HERE
  • Documentation
  • Configuration templates

How to Protect Your Credentials

  1. Use Environment Variables

    # Copy the example file
    cp .env.example .env
    
    # Edit .env with your real values
    # This file is in .gitignore and won't be committed
  2. Check Before Committing

    # Always review changes before committing
    git diff
    
    # Make sure no sensitive data is included
    git status
  3. Use .gitignore

    • The .gitignore file already includes common sensitive files
    • Add any additional sensitive files you create

If You Accidentally Commit Sensitive Data

  1. Immediately revoke/regenerate:

    • Bot token: Use @BotFather to revoke and get a new one
    • API keys: Regenerate them in their respective services
  2. Remove from Git history:

    # This is complex - contact the developer for help
    # Or delete the repository and create a new one
  3. Never reuse compromised credentials

Reporting Security Issues

If you find a security vulnerability:

  1. DO NOT open a public issue
  2. Contact the developer privately:
  3. Provide details about the vulnerability
  4. Wait for a response before disclosing publicly

🇸🇦 النسخة العربية

حماية معلوماتك الحساسة

يتطلب هذا المشروع معلومات حساسة مثل توكنات البوت ومفاتيح API. لا ترفع أبداً هذه المعلومات على GitHub.

ما يجب حمايته

لا ترفع أبداً:

  • توكنات البوت (من @BotFather)
  • مفاتيح API (VirusTotal، Gemini، إلخ)
  • معرفات المستخدمين في تيليجرام
  • أرقام الهواتف
  • المعلومات الشخصية
  • ملفات .env التي تحتوي على بيانات حقيقية

آمن للرفع:

  • .env.example (قالب بقيم وهمية)
  • الكود مع قيم وهمية مثل YOUR_BOT_TOKEN_HERE
  • التوثيق
  • قوالب الإعدادات

كيفية حماية بياناتك

  1. استخدم متغيرات البيئة

    # انسخ الملف النموذجي
    cp .env.example .env
    
    # عدل .env بقيمك الحقيقية
    # هذا الملف في .gitignore ولن يتم رفعه
  2. تحقق قبل الرفع

    # راجع التغييرات دائماً قبل الرفع
    git diff
    
    # تأكد من عدم وجود بيانات حساسة
    git status
  3. استخدم .gitignore

    • ملف .gitignore يتضمن بالفعل الملفات الحساسة الشائعة
    • أضف أي ملفات حساسة إضافية تنشئها

إذا رفعت بيانات حساسة بالخطأ

  1. ألغِ/أعد إنشاء فوراً:

    • توكن البوت: استخدم @BotFather لإلغائه والحصول على واحد جديد
    • مفاتيح API: أعد إنشاءها في خدماتها
  2. احذف من سجل Git:

    # هذا معقد - تواصل مع المطور للمساعدة
    # أو احذف المستودع وأنشئ واحداً جديداً
  3. لا تعد استخدام البيانات المخترقة أبداً

الإبلاغ عن مشاكل الأمان

إذا وجدت ثغرة أمنية:

  1. لا تفتح مشكلة عامة
  2. تواصل مع المطور بشكل خاص:
  3. قدم تفاصيل عن الثغرة
  4. انتظر الرد قبل الإفصاح علناً

🛡️ Best Practices | أفضل الممارسات

For Developers | للمطورين

  1. Never hardcode credentials | لا تضع البيانات مباشرة في الكود
  2. Use environment variables | استخدم متغيرات البيئة
  3. Review commits before pushing | راجع التغييرات قبل الرفع
  4. Keep .gitignore updated | حدّث .gitignore باستمرار
  5. Rotate credentials regularly | غيّر البيانات بانتظام
  6. Use strong, unique passwords | استخدم كلمات مرور قوية وفريدة
  7. Enable 2FA on all accounts | فعّل المصادقة الثنائية

For Users | للمستخدمين

  1. Never share your bot token | لا تشارك توكن البوت
  2. Keep your admin ID private | احتفظ بمعرفك الإداري خاصاً
  3. Don't run untrusted code | لا تشغل كود غير موثوق
  4. Review uploaded scripts | راجع السكربتات المرفوعة
  5. Use the bot responsibly | استخدم البوت بمسؤولية
  6. Report suspicious activity | أبلغ عن أي نشاط مشبوه

📞 Contact | التواصل

For security concerns: للمخاوف الأمنية:

There aren’t any published security advisories