From 61531e89d0a9753a54b0cb356cdfcbd1d255b125 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:01:16 +0000 Subject: [PATCH 1/5] Initial plan From fd07a0a15bd3cb3a291cf991e52c846809c7d876 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:07:51 +0000 Subject: [PATCH 2/5] Add comprehensive guides for making repository public - Created MAKE_REPOSITORY_PUBLIC_GUIDE.md with step-by-step instructions - Created SECURITY_CHECKLIST_BEFORE_PUBLIC.md with security checklist - Added security-cleanup.sh script for automated security checks - Updated README.md with links to new guides - Guides are bilingual (Arabic and English) Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com> --- MAKE_REPOSITORY_PUBLIC_GUIDE.md | 591 +++++++++++++++++++++++++++ README.md | 2 + SECURITY_CHECKLIST_BEFORE_PUBLIC.md | 610 ++++++++++++++++++++++++++++ security-cleanup.sh | 224 ++++++++++ 4 files changed, 1427 insertions(+) create mode 100644 MAKE_REPOSITORY_PUBLIC_GUIDE.md create mode 100644 SECURITY_CHECKLIST_BEFORE_PUBLIC.md create mode 100755 security-cleanup.sh diff --git a/MAKE_REPOSITORY_PUBLIC_GUIDE.md b/MAKE_REPOSITORY_PUBLIC_GUIDE.md new file mode 100644 index 0000000..977125e --- /dev/null +++ b/MAKE_REPOSITORY_PUBLIC_GUIDE.md @@ -0,0 +1,591 @@ +# دليل جعل المستودع عام | Guide to Making Repository Public + +
+ +## 🌍 كيفية جعل مستودع GitHub عام + +### نظرة عامة +هذا الدليل يشرح خطوة بخطوة كيفية تحويل مستودع GitHub من خاص إلى عام. + +### ⚠️ ملاحظات هامة قبل البدء + +**قبل جعل المستودع عام، تأكد من:** + +1. ✅ **إزالة جميع البيانات الحساسة**: + - مفاتيح API (API Keys) + - كلمات المرور (Passwords) + - أسرار الخدمات (Service Secrets) + - معلومات الاتصال بقواعد البيانات (Database Credentials) + - مفاتيح SSH الخاصة (Private SSH Keys) + +2. ✅ **مراجعة المحتوى**: + - تأكد من أن جميع الملفات مناسبة للنشر العام + - راجع سجل الـ commits للتأكد من عدم وجود بيانات حساسة في التاريخ + - تحقق من الملفات في مجلد `.github/workflows` + +3. ✅ **استخدام GitHub Secrets**: + - انقل جميع البيانات الحساسة إلى GitHub Secrets + - تأكد من أن المتغيرات البيئية لا تحتوي على قيم حساسة + - استخدم ملفات `.env.example` بدون قيم حقيقية + +### 📋 خطوات جعل المستودع عام + +#### الطريقة 1: عبر واجهة GitHub الويب + +**الخطوة 1: الانتقال إلى إعدادات المستودع** +1. افتح المستودع على GitHub: `https://github.com/wasalstor-web/AI-Agent-Platform` +2. انقر على تبويب **Settings** (الإعدادات) في أعلى الصفحة +3. قم بالتمرير إلى أسفل الصفحة حتى تصل إلى قسم **Danger Zone** (المنطقة الخطرة) + +**الخطوة 2: تغيير الرؤية** +1. ابحث عن خيار **Change repository visibility** (تغيير رؤية المستودع) +2. انقر على زر **Change visibility** (تغيير الرؤية) +3. ستظهر نافذة منبثقة - اختر **Make public** (جعله عام) + +**الخطوة 3: التأكيد** +1. اقرأ التحذيرات بعناية +2. اكتب اسم المستودع للتأكيد: `wasalstor-web/AI-Agent-Platform` +3. انقر على **I understand, make this repository public** (أفهم، اجعل هذا المستودع عام) + +**الخطوة 4: التحقق** +- بعد التأكيد، سيصبح المستودع عام فوراً +- ستظهر علامة **Public** بدلاً من **Private** بجانب اسم المستودع +- سيتمكن أي شخص من رؤية وتنزيل المحتوى + +#### الطريقة 2: عبر GitHub CLI + +إذا كنت تفضل استخدام سطر الأوامر: + +```bash +# تأكد من تثبيت GitHub CLI +gh auth login + +# جعل المستودع عام +gh repo edit wasalstor-web/AI-Agent-Platform --visibility public +``` + +### 🔒 التحقق من الأمان قبل النشر + +#### 1. فحص الملفات الحساسة + +```bash +# فحص ملفات .env +find . -name "*.env" -not -name "*.example" + +# فحص مفاتيح محتملة في الكود +grep -r "api_key\|password\|secret" --exclude-dir=.git --exclude="*.md" + +# فحص سجل Git للبيانات الحساسة +git log --all --full-history --source -- '*secret*' '*password*' '*key*' +``` + +#### 2. استخدام أدوات الفحص الأمني + +```bash +# تثبيت git-secrets +brew install git-secrets # macOS +# أو +sudo apt-get install git-secrets # Linux + +# إعداد git-secrets +git secrets --install +git secrets --register-aws + +# فحص المستودع +git secrets --scan +``` + +#### 3. مراجعة ملف .gitignore + +تأكد من أن `.gitignore` يتضمن: + +```gitignore +# البيانات الحساسة +.env +.env.local +*.pem +*.key +*.secret +secrets/ +credentials/ + +# ملفات النظام +.DS_Store +Thumbs.db + +# المكتبات والتبعيات +node_modules/ +venv/ +__pycache__/ +*.pyc +``` + +### 🔄 ما بعد جعل المستودع عام + +#### 1. تحديث الوثائق +- راجع README.md وتأكد من أنه واضح وكامل +- أضف شارات (badges) للمشروع +- وثق طريقة التثبيت والاستخدام + +#### 2. إعداد GitHub Actions +- تأكد من أن جميع Secrets مضبوطة بشكل صحيح +- راجع workflows وتأكد من أنها تعمل بشكل صحيح +- قم بتشغيل اختبار للتأكد من عدم فشل CI/CD + +#### 3. إضافة ترخيص +إذا لم يكن موجوداً، أضف ملف LICENSE: + +```bash +# مثال: إضافة ترخيص MIT +cat > LICENSE << 'EOF' +MIT License + +Copyright (c) 2025 wasalstor-web + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +EOF +``` + +#### 4. إضافة Code of Conduct + +```bash +# إضافة ميثاق سلوك المساهمين +cat > CODE_OF_CONDUCT.md << 'EOF' +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone... +EOF +``` + +#### 5. إضافة Contributing Guidelines + +```bash +# إضافة دليل المساهمة +cat > CONTRIBUTING.md << 'EOF' +# المساهمة في AI Agent Platform + +نرحب بمساهماتكم! يرجى اتباع الإرشادات التالية... +EOF +``` + +### 📊 المزايا والعيوب + +#### المزايا ✅ +- **الرؤية**: يمكن للمجتمع العثور على مشروعك +- **المساهمات**: يمكن للآخرين المساهمة في المشروع +- **الشفافية**: بناء الثقة مع المستخدمين +- **التعاون**: تسهيل التعاون مع المطورين الآخرين +- **المجاني**: الريبوهات العامة مجانية تماماً على GitHub + +#### العيوب ⚠️ +- **الخصوصية**: أي شخص يمكنه رؤية الكود +- **المنافسة**: قد يستخدم المنافسون الكود +- **المسؤولية**: تحتاج لمراجعة Pull Requests وIssues +- **الأمان**: يجب التأكد من عدم وجود بيانات حساسة + +### 🔐 حماية البيانات الحساسة في المستودع العام + +#### استخدام GitHub Secrets + +1. انتقل إلى Settings > Secrets and variables > Actions +2. انقر على **New repository secret** +3. أضف كل سر على حدة: + - `OPENROUTER_API_KEY` + - `VPS_HOST` + - `VPS_USER` + - `VPS_KEY` + - أي مفاتيح أخرى + +#### مثال على استخدام Secrets في GitHub Actions + +```yaml +name: Deploy +on: [push] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Deploy + env: + API_KEY: ${{ secrets.OPENROUTER_API_KEY }} + VPS_HOST: ${{ secrets.VPS_HOST }} + run: | + echo "Deploying with secret API key..." +``` + +### 📱 التحقق من أن المستودع أصبح عام + +بعد جعل المستودع عام، تحقق من: + +1. **رابط المستودع**: يجب أن يكون متاحاً بدون تسجيل دخول + ``` + https://github.com/wasalstor-web/AI-Agent-Platform + ``` + +2. **الشارة**: يجب أن ترى "Public" بجانب اسم المستودع + +3. **الوصول**: افتح الرابط في وضع التصفح الخفي للتأكد + +4. **البحث**: يجب أن يظهر في نتائج بحث GitHub + +### ❓ الأسئلة الشائعة + +**س: هل يمكنني التراجع وجعل المستودع خاص مرة أخرى؟** +ج: نعم، يمكنك تغيير الرؤية في أي وقت من Settings > Danger Zone + +**س: ماذا يحدث لـ Forks الموجودة إذا جعلت المستودع خاص مرة أخرى؟** +ج: ستبقى Forks العامة موجودة ومستقلة + +**س: هل سيتم حذف تاريخ Commits عند جعل المستودع عام؟** +ج: لا، سيبقى تاريخ Git كاملاً. لذلك تأكد من عدم وجود بيانات حساسة في التاريخ + +**س: كيف أحذف بيانات حساسة من تاريخ Git؟** +ج: استخدم أدوات مثل `git-filter-repo` أو `BFG Repo-Cleaner` + +### 🛠️ أدوات مفيدة + +1. **GitHub Secret Scanning**: يكتشف تلقائياً الأسرار المكشوفة +2. **git-secrets**: يمنع commit البيانات الحساسة +3. **TruffleHog**: يفحص Git history للأسرار +4. **GitGuardian**: خدمة أمنية لمراقبة الأسرار + +### 📞 الدعم + +إذا واجهت أي مشاكل: +- راجع [GitHub Docs - Setting repository visibility](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility) +- افتح Issue في المستودع +- اتصل بدعم GitHub + +--- + +
+ +--- + +
+ +## 🌍 How to Make a GitHub Repository Public + +### Overview +This guide explains step-by-step how to convert a GitHub repository from private to public. + +### ⚠️ Important Notes Before Starting + +**Before making the repository public, ensure:** + +1. ✅ **Remove all sensitive data**: + - API Keys + - Passwords + - Service Secrets + - Database Credentials + - Private SSH Keys + +2. ✅ **Review content**: + - Ensure all files are appropriate for public release + - Review commit history for sensitive data + - Check files in `.github/workflows` directory + +3. ✅ **Use GitHub Secrets**: + - Move all sensitive data to GitHub Secrets + - Ensure environment variables don't contain sensitive values + - Use `.env.example` files without real values + +### 📋 Steps to Make Repository Public + +#### Method 1: Via GitHub Web Interface + +**Step 1: Navigate to Repository Settings** +1. Open the repository on GitHub: `https://github.com/wasalstor-web/AI-Agent-Platform` +2. Click on the **Settings** tab at the top of the page +3. Scroll down to the **Danger Zone** section + +**Step 2: Change Visibility** +1. Look for the **Change repository visibility** option +2. Click the **Change visibility** button +3. A popup will appear - select **Make public** + +**Step 3: Confirm** +1. Read the warnings carefully +2. Type the repository name to confirm: `wasalstor-web/AI-Agent-Platform` +3. Click **I understand, make this repository public** + +**Step 4: Verify** +- After confirmation, the repository becomes public immediately +- The **Public** badge will appear instead of **Private** next to the repository name +- Anyone can view and download the content + +#### Method 2: Via GitHub CLI + +If you prefer using the command line: + +```bash +# Ensure GitHub CLI is installed +gh auth login + +# Make the repository public +gh repo edit wasalstor-web/AI-Agent-Platform --visibility public +``` + +### 🔒 Security Verification Before Publishing + +#### 1. Check for Sensitive Files + +```bash +# Check for .env files +find . -name "*.env" -not -name "*.example" + +# Check for potential keys in code +grep -r "api_key\|password\|secret" --exclude-dir=.git --exclude="*.md" + +# Check Git history for sensitive data +git log --all --full-history --source -- '*secret*' '*password*' '*key*' +``` + +#### 2. Use Security Scanning Tools + +```bash +# Install git-secrets +brew install git-secrets # macOS +# or +sudo apt-get install git-secrets # Linux + +# Setup git-secrets +git secrets --install +git secrets --register-aws + +# Scan repository +git secrets --scan +``` + +#### 3. Review .gitignore File + +Ensure `.gitignore` includes: + +```gitignore +# Sensitive data +.env +.env.local +*.pem +*.key +*.secret +secrets/ +credentials/ + +# System files +.DS_Store +Thumbs.db + +# Libraries and dependencies +node_modules/ +venv/ +__pycache__/ +*.pyc +``` + +### 🔄 After Making Repository Public + +#### 1. Update Documentation +- Review README.md and ensure it's clear and complete +- Add project badges +- Document installation and usage + +#### 2. Setup GitHub Actions +- Ensure all Secrets are properly configured +- Review workflows and ensure they work correctly +- Run a test to ensure CI/CD doesn't fail + +#### 3. Add License +If not present, add a LICENSE file: + +```bash +# Example: Add MIT License +cat > LICENSE << 'EOF' +MIT License + +Copyright (c) 2025 wasalstor-web + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +EOF +``` + +### 📊 Pros and Cons + +#### Pros ✅ +- **Visibility**: Community can find your project +- **Contributions**: Others can contribute to the project +- **Transparency**: Build trust with users +- **Collaboration**: Facilitate collaboration with other developers +- **Free**: Public repositories are completely free on GitHub + +#### Cons ⚠️ +- **Privacy**: Anyone can see the code +- **Competition**: Competitors may use the code +- **Responsibility**: Need to review Pull Requests and Issues +- **Security**: Must ensure no sensitive data exists + +### 🔐 Protecting Sensitive Data in Public Repository + +#### Using GitHub Secrets + +1. Go to Settings > Secrets and variables > Actions +2. Click **New repository secret** +3. Add each secret individually: + - `OPENROUTER_API_KEY` + - `VPS_HOST` + - `VPS_USER` + - `VPS_KEY` + - Any other keys + +#### Example of Using Secrets in GitHub Actions + +```yaml +name: Deploy +on: [push] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Deploy + env: + API_KEY: ${{ secrets.OPENROUTER_API_KEY }} + VPS_HOST: ${{ secrets.VPS_HOST }} + run: | + echo "Deploying with secret API key..." +``` + +### 📱 Verify Repository is Public + +After making the repository public, verify: + +1. **Repository URL**: Should be accessible without login + ``` + https://github.com/wasalstor-web/AI-Agent-Platform + ``` + +2. **Badge**: Should see "Public" next to repository name + +3. **Access**: Open link in incognito mode to verify + +4. **Search**: Should appear in GitHub search results + +### ❓ Frequently Asked Questions + +**Q: Can I revert and make the repository private again?** +A: Yes, you can change visibility anytime from Settings > Danger Zone + +**Q: What happens to existing Forks if I make the repository private again?** +A: Public forks will remain and be independent + +**Q: Will commit history be deleted when making the repository public?** +A: No, Git history remains complete. Ensure no sensitive data in history + +**Q: How do I delete sensitive data from Git history?** +A: Use tools like `git-filter-repo` or `BFG Repo-Cleaner` + +### 🛠️ Useful Tools + +1. **GitHub Secret Scanning**: Automatically detects exposed secrets +2. **git-secrets**: Prevents committing sensitive data +3. **TruffleHog**: Scans Git history for secrets +4. **GitGuardian**: Security service for monitoring secrets + +### 📞 Support + +If you encounter any issues: +- Review [GitHub Docs - Setting repository visibility](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility) +- Open an Issue in the repository +- Contact GitHub Support + +--- + +
+ +## 🎯 Quick Summary | ملخص سريع + +
+ +### للمستخدم العربي: + +لجعل المستودع عام، اتبع هذه الخطوات البسيطة: + +1. **افتح المستودع** على GitHub +2. **انتقل إلى Settings** (الإعدادات) +3. **ابحث عن Danger Zone** في الأسفل +4. **انقر Change visibility** +5. **اختر Make public** +6. **أكد بكتابة اسم المستودع** + +⚠️ **مهم جداً**: تأكد من إزالة جميع البيانات الحساسة قبل جعل المستودع عام! + +
+ +### For English Users: + +To make the repository public, follow these simple steps: + +1. **Open the repository** on GitHub +2. **Go to Settings** +3. **Find Danger Zone** at the bottom +4. **Click Change visibility** +5. **Select Make public** +6. **Confirm by typing repository name** + +⚠️ **Very Important**: Ensure all sensitive data is removed before making the repository public! + +--- + +## 📚 Additional Resources | مصادر إضافية + +- [GitHub Documentation on Repository Visibility](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility) +- [GitHub Secret Scanning](https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning) +- [Managing Secrets in GitHub Actions](https://docs.github.com/en/actions/security-guides/encrypted-secrets) +- [Best Practices for Securing Your Repository](https://docs.github.com/en/code-security/getting-started/securing-your-repository) + +--- + +
+ +**Made with ❤️ for the Community** + +**صُنع بـ ❤️ للمجتمع** + +
diff --git a/README.md b/README.md index fecab52..924b47b 100644 --- a/README.md +++ b/README.md @@ -446,6 +446,8 @@ AI-Agent-Platform © 2025 - 🔧 **دليل إعداد النطاق**: [DOMAIN_SETUP_GUIDE.md](DOMAIN_SETUP_GUIDE.md) - 💬 **دمج OpenWebUI**: [OPENWEBUI_INTEGRATION.md](OPENWEBUI_INTEGRATION.md) - 🤖 **نظام DL+**: [DLPLUS_README.md](DLPLUS_README.md) +- 🔓 **دليل جعل المستودع عام**: [MAKE_REPOSITORY_PUBLIC_GUIDE.md](MAKE_REPOSITORY_PUBLIC_GUIDE.md) +- 🔒 **قائمة التحقق الأمني**: [SECURITY_CHECKLIST_BEFORE_PUBLIC.md](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) --- diff --git a/SECURITY_CHECKLIST_BEFORE_PUBLIC.md b/SECURITY_CHECKLIST_BEFORE_PUBLIC.md new file mode 100644 index 0000000..4a8a154 --- /dev/null +++ b/SECURITY_CHECKLIST_BEFORE_PUBLIC.md @@ -0,0 +1,610 @@ +# 🔒 قائمة التحقق الأمني قبل جعل المستودع عام +# Security Checklist Before Making Repository Public + +
+ +## ⚠️ تحذير مهم جداً + +**تم العثور على ملفات حساسة مُتتبعة في Git!** + +الملفات التالية تحتوي على بيانات حساسة ومُتتبعة حالياً في Git: +- `.env` - يحتوي على مفاتيح API وتوكنات JWT +- `.env.openwebui` - يحتوي على إعدادات OpenWebUI الحساسة + +**يجب إزالة هذه الملفات من تتبع Git قبل جعل المستودع عام!** + +
+ +--- + +## 🚨 Critical Security Issues Found + +**Sensitive files are currently being tracked in Git!** + +The following files contain sensitive data and are currently tracked: +- `.env` - Contains API keys and JWT tokens +- `.env.openwebui` - Contains sensitive OpenWebUI settings + +**These files MUST be removed from Git tracking before making the repository public!** + +--- + +
+ +## 📋 خطوات إزالة الملفات الحساسة من Git + +### الطريقة 1: إزالة من التتبع فقط (الموصى بها للملفات الحالية) + +```bash +# إزالة الملفات من تتبع Git مع الاحتفاظ بها محلياً +git rm --cached .env +git rm --cached .env.openwebui + +# إنشاء commit للإزالة +git commit -m "Remove sensitive .env files from Git tracking" + +# دفع التغييرات +git push +``` + +**ملاحظة**: هذه الطريقة تُزيل الملفات من التتبع المستقبلي فقط، لكن البيانات الحساسة ستبقى في تاريخ Git. + +### الطريقة 2: إزالة من التاريخ الكامل (موصى بها قبل جعل المستودع عام) + +⚠️ **تحذير**: هذه الطريقة تعيد كتابة تاريخ Git وتتطلب force push + +#### باستخدام git filter-repo (الطريقة الموصى بها) + +```bash +# تثبيت git-filter-repo +pip install git-filter-repo + +# إنشاء نسخة احتياطية +git clone --mirror https://github.com/wasalstor-web/AI-Agent-Platform.git backup-repo + +# إزالة الملفات من التاريخ الكامل +git filter-repo --path .env --invert-paths +git filter-repo --path .env.openwebui --invert-paths + +# الدفع (يتطلب force push) +# تحذير: تأكد من أن جميع المتعاونين على علم بهذا التغيير +git push --force --all +git push --force --tags +``` + +#### باستخدام BFG Repo-Cleaner (طريقة بديلة) + +```bash +# تنزيل BFG +wget https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar + +# إنشاء نسخة احتياطية +git clone --mirror https://github.com/wasalstor-web/AI-Agent-Platform.git backup-repo + +# إزالة الملفات +java -jar bfg-1.14.0.jar --delete-files .env +java -jar bfg-1.14.0.jar --delete-files .env.openwebui + +# تنظيف +git reflog expire --expire=now --all +git gc --prune=now --aggressive + +# الدفع (يتطلب force push) +git push --force --all +git push --force --tags +``` + +
+ +--- + +## 📋 Steps to Remove Sensitive Files from Git + +### Method 1: Remove from Tracking Only (Recommended for Current Files) + +```bash +# Remove files from Git tracking while keeping them locally +git rm --cached .env +git rm --cached .env.openwebui + +# Create commit for the removal +git commit -m "Remove sensitive .env files from Git tracking" + +# Push changes +git push +``` + +**Note**: This method only removes files from future tracking, but sensitive data will remain in Git history. + +### Method 2: Remove from Complete History (Recommended Before Making Public) + +⚠️ **Warning**: This method rewrites Git history and requires force push + +#### Using git filter-repo (Recommended Method) + +```bash +# Install git-filter-repo +pip install git-filter-repo + +# Create backup +git clone --mirror https://github.com/wasalstor-web/AI-Agent-Platform.git backup-repo + +# Remove files from complete history +git filter-repo --path .env --invert-paths +git filter-repo --path .env.openwebui --invert-paths + +# Push (requires force push) +# Warning: Ensure all collaborators are aware of this change +git push --force --all +git push --force --tags +``` + +#### Using BFG Repo-Cleaner (Alternative Method) + +```bash +# Download BFG +wget https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar + +# Create backup +git clone --mirror https://github.com/wasalstor-web/AI-Agent-Platform.git backup-repo + +# Remove files +java -jar bfg-1.14.0.jar --delete-files .env +java -jar bfg-1.14.0.jar --delete-files .env.openwebui + +# Clean up +git reflog expire --expire=now --all +git gc --prune=now --aggressive + +# Push (requires force push) +git push --force --all +git push --force --tags +``` + +--- + +
+ +## ✅ قائمة التحقق الكاملة قبل جعل المستودع عام + +### 1. إزالة البيانات الحساسة + +- [ ] إزالة `.env` من تتبع Git +- [ ] إزالة `.env.openwebui` من تتبع Git +- [ ] التحقق من عدم وجود مفاتيح API في الكود +- [ ] التحقق من عدم وجود كلمات مرور في الملفات +- [ ] التحقق من عدم وجود توكنات JWT مكشوفة +- [ ] فحص تاريخ Git للبيانات الحساسة +- [ ] إزالة مفاتيح SSH إن وجدت +- [ ] إزالة معلومات الاتصال بقواعد البيانات + +### 2. تحديث ملفات الأمثلة + +- [ ] التأكد من أن `.env.example` لا يحتوي على قيم حقيقية +- [ ] التأكد من أن `.env.dlplus.example` لا يحتوي على قيم حقيقية +- [ ] التأكد من أن `.env.instant-deploy.example` لا يحتوي على قيم حقيقية +- [ ] إضافة تعليقات توضيحية في ملفات الأمثلة + +### 3. إعداد GitHub Secrets + +- [ ] إضافة `OPENROUTER_API_KEY` إلى GitHub Secrets +- [ ] إضافة `VPS_HOST` إلى GitHub Secrets (إن وجد) +- [ ] إضافة `VPS_USER` إلى GitHub Secrets (إن وجد) +- [ ] إضافة `VPS_KEY` إلى GitHub Secrets (إن وجد) +- [ ] إضافة `FASTAPI_SECRET_KEY` إلى GitHub Secrets +- [ ] إضافة `OPENWEBUI_JWT_TOKEN` إلى GitHub Secrets +- [ ] إضافة `OPENWEBUI_API_KEY` إلى GitHub Secrets + +### 4. تحديث GitHub Actions Workflows + +- [ ] التحقق من أن جميع workflows تستخدم Secrets بدلاً من القيم المباشرة +- [ ] مراجعة `.github/workflows/vps-auto-verify.yml` +- [ ] مراجعة `.github/workflows/deploy-pages.yml` +- [ ] مراجعة `.github/workflows/openweb-pages.yml` +- [ ] اختبار workflows للتأكد من عملها + +### 5. مراجعة .gitignore + +- [x] `.env` موجود في .gitignore +- [x] `.env.local` موجود في .gitignore +- [x] `*.key` موجود في .gitignore +- [x] `*.pem` موجود في .gitignore +- [ ] التحقق من عدم وجود ملفات أخرى يجب إضافتها + +### 6. إضافة ملفات المشروع الأساسية + +- [ ] إضافة ملف LICENSE +- [ ] إضافة ملف CODE_OF_CONDUCT.md +- [ ] إضافة ملف CONTRIBUTING.md +- [ ] إضافة ملف SECURITY.md (سياسة الأمان) +- [ ] تحديث README.md + +### 7. مراجعة الوثائق + +- [x] README.md محدث وواضح +- [ ] إضافة شارات (badges) للمشروع +- [ ] توثيق طريقة التثبيت +- [ ] توثيق طريقة الاستخدام +- [ ] إضافة أمثلة عملية + +### 8. فحص الأمان + +- [ ] تشغيل git-secrets للفحص +- [ ] فحص الكود بحثاً عن vulnerabilities +- [ ] مراجعة dependencies للتأكد من أمانها +- [ ] تفعيل GitHub Secret Scanning +- [ ] تفعيل Dependabot + +### 9. الاختبار + +- [ ] اختبار GitHub Actions workflows +- [ ] التأكد من عمل جميع السكريبتات +- [ ] اختبار التكاملات (OpenWebUI، Render، إلخ) +- [ ] مراجعة الأخطاء المحتملة + +### 10. التحضير للإطلاق + +- [ ] إنشاء نسخة احتياطية من المستودع +- [ ] إخطار المتعاونين (إن وجدوا) +- [ ] تحديد نسخة release (مثل v1.0.0) +- [ ] كتابة CHANGELOG.md + +
+ +--- + +## ✅ Complete Checklist Before Making Repository Public + +### 1. Remove Sensitive Data + +- [ ] Remove `.env` from Git tracking +- [ ] Remove `.env.openwebui` from Git tracking +- [ ] Verify no API keys in code +- [ ] Verify no passwords in files +- [ ] Verify no exposed JWT tokens +- [ ] Scan Git history for sensitive data +- [ ] Remove SSH keys if present +- [ ] Remove database connection information + +### 2. Update Example Files + +- [ ] Ensure `.env.example` contains no real values +- [ ] Ensure `.env.dlplus.example` contains no real values +- [ ] Ensure `.env.instant-deploy.example` contains no real values +- [ ] Add explanatory comments in example files + +### 3. Setup GitHub Secrets + +- [ ] Add `OPENROUTER_API_KEY` to GitHub Secrets +- [ ] Add `VPS_HOST` to GitHub Secrets (if applicable) +- [ ] Add `VPS_USER` to GitHub Secrets (if applicable) +- [ ] Add `VPS_KEY` to GitHub Secrets (if applicable) +- [ ] Add `FASTAPI_SECRET_KEY` to GitHub Secrets +- [ ] Add `OPENWEBUI_JWT_TOKEN` to GitHub Secrets +- [ ] Add `OPENWEBUI_API_KEY` to GitHub Secrets + +### 4. Update GitHub Actions Workflows + +- [ ] Verify all workflows use Secrets instead of direct values +- [ ] Review `.github/workflows/vps-auto-verify.yml` +- [ ] Review `.github/workflows/deploy-pages.yml` +- [ ] Review `.github/workflows/openweb-pages.yml` +- [ ] Test workflows to ensure they work + +### 5. Review .gitignore + +- [x] `.env` is in .gitignore +- [x] `.env.local` is in .gitignore +- [x] `*.key` is in .gitignore +- [x] `*.pem` is in .gitignore +- [ ] Check for other files that should be added + +### 6. Add Essential Project Files + +- [ ] Add LICENSE file +- [ ] Add CODE_OF_CONDUCT.md +- [ ] Add CONTRIBUTING.md +- [ ] Add SECURITY.md (security policy) +- [ ] Update README.md + +### 7. Review Documentation + +- [x] README.md is updated and clear +- [ ] Add project badges +- [ ] Document installation process +- [ ] Document usage instructions +- [ ] Add practical examples + +### 8. Security Scanning + +- [ ] Run git-secrets for scanning +- [ ] Scan code for vulnerabilities +- [ ] Review dependencies for security +- [ ] Enable GitHub Secret Scanning +- [ ] Enable Dependabot + +### 9. Testing + +- [ ] Test GitHub Actions workflows +- [ ] Ensure all scripts work +- [ ] Test integrations (OpenWebUI, Render, etc.) +- [ ] Review potential errors + +### 10. Launch Preparation + +- [ ] Create repository backup +- [ ] Notify collaborators (if any) +- [ ] Define release version (e.g., v1.0.0) +- [ ] Write CHANGELOG.md + +--- + +
+ +## 🔧 أوامر مفيدة للفحص + +### فحص الملفات الحساسة + +```bash +# البحث عن مفاتيح API +grep -r "api_key\|apikey\|api-key" --exclude-dir=.git --exclude-dir=node_modules --exclude="*.md" . + +# البحث عن كلمات المرور +grep -r "password\|passwd\|pwd" --exclude-dir=.git --exclude-dir=node_modules --exclude="*.md" . + +# البحث عن توكنات +grep -r "token\|secret\|jwt" --exclude-dir=.git --exclude-dir=node_modules --exclude="*.md" . + +# البحث عن ملفات .env +find . -name "*.env" -not -name "*.example" -not -path "./.git/*" + +# فحص ما إذا كانت الملفات مُتتبعة في Git +git ls-files | grep -E "\.env|secret|key" +``` + +### فحص تاريخ Git + +```bash +# البحث في تاريخ Git عن كلمات حساسة +git log --all --full-history --source -- '*secret*' '*password*' '*key*' '*.env' + +# عرض محتوى ملف في commit معين +git show :.env + +# البحث في جميع commits +git log -p -S "OPENROUTER_API_KEY" +``` + +### التحقق من .gitignore + +```bash +# التحقق من أن ملف معين سيتم تجاهله +git check-ignore -v .env + +# عرض جميع الملفات المتجاهلة +git status --ignored +``` + +
+ +--- + +## 🔧 Useful Commands for Scanning + +### Scan for Sensitive Files + +```bash +# Search for API keys +grep -r "api_key\|apikey\|api-key" --exclude-dir=.git --exclude-dir=node_modules --exclude="*.md" . + +# Search for passwords +grep -r "password\|passwd\|pwd" --exclude-dir=.git --exclude-dir=node_modules --exclude="*.md" . + +# Search for tokens +grep -r "token\|secret\|jwt" --exclude-dir=.git --exclude-dir=node_modules --exclude="*.md" . + +# Find .env files +find . -name "*.env" -not -name "*.example" -not -path "./.git/*" + +# Check if files are tracked in Git +git ls-files | grep -E "\.env|secret|key" +``` + +### Scan Git History + +```bash +# Search Git history for sensitive words +git log --all --full-history --source -- '*secret*' '*password*' '*key*' '*.env' + +# Show file content in specific commit +git show :.env + +# Search in all commits +git log -p -S "OPENROUTER_API_KEY" +``` + +### Verify .gitignore + +```bash +# Check if a specific file will be ignored +git check-ignore -v .env + +# Show all ignored files +git status --ignored +``` + +--- + +
+ +## 🎯 الخطوات الموصى بها + +### 1. قبل إزالة الملفات الحساسة + +```bash +# إنشاء نسخة احتياطية محلية +cp .env .env.backup.local +cp .env.openwebui .env.openwebui.backup.local + +# حفظ القيم في مكان آمن (مدير كلمات المرور) +# ثم نقلها إلى GitHub Secrets +``` + +### 2. إزالة الملفات من التتبع + +```bash +# إزالة من التتبع +git rm --cached .env +git rm --cached .env.openwebui + +# إنشاء commit +git commit -m "🔒 Remove sensitive .env files from Git tracking + +- Removed .env from version control +- Removed .env.openwebui from version control +- These files are already in .gitignore +- Sensitive data should be stored in GitHub Secrets" + +# دفع التغييرات +git push +``` + +### 3. تنظيف التاريخ (اختياري لكن موصى به) + +```bash +# استخدام git-filter-repo +pip install git-filter-repo +git filter-repo --path .env --invert-paths +git filter-repo --path .env.openwebui --invert-paths + +# أو استخدام BFG +java -jar bfg.jar --delete-files .env +java -jar bfg.jar --delete-files .env.openwebui +git reflog expire --expire=now --all +git gc --prune=now --aggressive +``` + +### 4. إعداد GitHub Secrets + +1. اذهب إلى Settings > Secrets and variables > Actions +2. أضف جميع المفاتيح الموجودة في .env +3. حدّث workflows لاستخدام Secrets + +### 5. جعل المستودع عام + +بعد إكمال جميع الخطوات أعلاه: +1. Settings > Danger Zone > Change visibility +2. Make public +3. تأكيد الإجراء + +
+ +--- + +## 🎯 Recommended Steps + +### 1. Before Removing Sensitive Files + +```bash +# Create local backup +cp .env .env.backup.local +cp .env.openwebui .env.openwebui.backup.local + +# Save values in a secure place (password manager) +# Then move them to GitHub Secrets +``` + +### 2. Remove Files from Tracking + +```bash +# Remove from tracking +git rm --cached .env +git rm --cached .env.openwebui + +# Create commit +git commit -m "🔒 Remove sensitive .env files from Git tracking + +- Removed .env from version control +- Removed .env.openwebui from version control +- These files are already in .gitignore +- Sensitive data should be stored in GitHub Secrets" + +# Push changes +git push +``` + +### 3. Clean History (Optional but Recommended) + +```bash +# Using git-filter-repo +pip install git-filter-repo +git filter-repo --path .env --invert-paths +git filter-repo --path .env.openwebui --invert-paths + +# Or using BFG +java -jar bfg.jar --delete-files .env +java -jar bfg.jar --delete-files .env.openwebui +git reflog expire --expire=now --all +git gc --prune=now --aggressive +``` + +### 4. Setup GitHub Secrets + +1. Go to Settings > Secrets and variables > Actions +2. Add all keys from .env +3. Update workflows to use Secrets + +### 5. Make Repository Public + +After completing all steps above: +1. Settings > Danger Zone > Change visibility +2. Make public +3. Confirm action + +--- + +## ⚠️ Important Warnings | تحذيرات مهمة + +
+ +### عند إزالة الملفات من تاريخ Git: + +1. **Force Push مطلوب**: ستحتاج لعمل force push، وهذا سيؤثر على جميع المتعاونين +2. **النسخ الاحتياطية**: أنشئ نسخة احتياطية كاملة قبل البدء +3. **إعادة Clone**: قد يحتاج المتعاونون لإعادة clone المستودع +4. **Forks**: الـ forks الموجودة قد تحتفظ بالبيانات الحساسة + +### بعد جعل المستودع عام: + +1. **لا يمكن التراجع عن نشر البيانات**: أي بيانات حساسة تم نشرها تعتبر مكشوفة للأبد +2. **تغيير المفاتيح**: غيّر جميع API keys والـ tokens التي كانت موجودة في الملفات +3. **المراقبة**: راقب المستودع لأي نشاط غير عادي +4. **GitHub Secret Scanning**: سيُفعّل تلقائياً وقد يكتشف مفاتيح مكشوفة + +
+ +### When Removing Files from Git History: + +1. **Force Push Required**: You'll need to force push, affecting all collaborators +2. **Backups**: Create a complete backup before starting +3. **Re-clone**: Collaborators may need to re-clone the repository +4. **Forks**: Existing forks may retain sensitive data + +### After Making Repository Public: + +1. **Can't Undo Data Publication**: Any published sensitive data is considered exposed forever +2. **Rotate Keys**: Change all API keys and tokens that were in the files +3. **Monitor**: Watch repository for unusual activity +4. **GitHub Secret Scanning**: Will automatically enable and may detect exposed keys + +--- + +
+ +**🔒 الأمان أولاً | Security First 🔒** + +**لا تتسرع في جعل المستودع عام قبل إكمال جميع خطوات الأمان** + +**Don't rush to make the repository public before completing all security steps** + +
diff --git a/security-cleanup.sh b/security-cleanup.sh new file mode 100755 index 0000000..0e8a173 --- /dev/null +++ b/security-cleanup.sh @@ -0,0 +1,224 @@ +#!/bin/bash +# Security Cleanup Script for Making Repository Public +# نص الأمان لتنظيف المستودع قبل جعله عام + +set -e + +echo "================================================" +echo "🔒 Security Cleanup Script" +echo "نص تنظيف الأمان" +echo "================================================" +echo "" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Function to print colored output +print_status() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +print_success() { + echo -e "${GREEN}[SUCCESS]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +echo "" +print_status "Starting security cleanup process..." +print_status "بدء عملية تنظيف الأمان..." +echo "" + +# Step 1: Backup sensitive files +print_status "Step 1: Creating backups of sensitive files..." +print_status "الخطوة 1: إنشاء نسخ احتياطية من الملفات الحساسة..." + +if [ -f ".env" ]; then + cp .env .env.backup.local + print_success "Backed up .env to .env.backup.local" + print_warning "⚠️ Please save your .env values to a password manager!" + print_warning "⚠️ يرجى حفظ قيم .env في مدير كلمات المرور!" +else + print_warning ".env file not found" +fi + +if [ -f ".env.openwebui" ]; then + cp .env.openwebui .env.openwebui.backup.local + print_success "Backed up .env.openwebui to .env.openwebui.backup.local" +else + print_warning ".env.openwebui file not found" +fi + +echo "" + +# Step 2: Check if files are tracked in Git +print_status "Step 2: Checking if sensitive files are tracked in Git..." +print_status "الخطوة 2: التحقق من الملفات الحساسة المُتتبعة في Git..." + +TRACKED_FILES=$(git ls-files | grep -E "^\.env$|^\.env\.openwebui$" || true) + +if [ -n "$TRACKED_FILES" ]; then + print_error "⚠️ CRITICAL: The following sensitive files are tracked in Git:" + print_error "⚠️ حرج: الملفات الحساسة التالية مُتتبعة في Git:" + echo "$TRACKED_FILES" + echo "" + + read -p "Do you want to remove these files from Git tracking? (y/n): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + print_status "Removing files from Git tracking..." + print_status "إزالة الملفات من تتبع Git..." + + git rm --cached .env 2>/dev/null || true + git rm --cached .env.openwebui 2>/dev/null || true + + print_success "Files removed from Git tracking" + print_success "تم إزالة الملفات من تتبع Git" + + print_status "Creating commit..." + git commit -m "🔒 Remove sensitive .env files from Git tracking + +- Removed .env from version control +- Removed .env.openwebui from version control +- These files are already in .gitignore +- Sensitive data should be stored in GitHub Secrets + +تمت إزالة الملفات الحساسة من التحكم في الإصدار" + + print_success "Commit created successfully" + print_warning "⚠️ Don't forget to push: git push" + print_warning "⚠️ لا تنس الدفع: git push" + else + print_warning "Skipped removing files from Git tracking" + fi +else + print_success "No sensitive files are tracked in Git" + print_success "لا توجد ملفات حساسة مُتتبعة في Git" +fi + +echo "" + +# Step 3: Scan for API keys in code +print_status "Step 3: Scanning for potential API keys in code..." +print_status "الخطوة 3: البحث عن مفاتيح API المحتملة في الكود..." + +API_KEYS=$(grep -r "sk-[a-zA-Z0-9]\{32,\}" --exclude-dir=.git --exclude-dir=node_modules --exclude="*.md" --exclude="*.backup*" --exclude="security-cleanup.sh" . || true) + +if [ -n "$API_KEYS" ]; then + print_error "⚠️ Potential API keys found in code:" + print_error "⚠️ تم العثور على مفاتيح API محتملة في الكود:" + echo "$API_KEYS" + print_warning "Please review and remove these before making repository public!" + print_warning "يرجى المراجعة والإزالة قبل جعل المستودع عام!" +else + print_success "No obvious API keys found in code" + print_success "لم يتم العثور على مفاتيح API واضحة في الكود" +fi + +echo "" + +# Step 4: Check .gitignore +print_status "Step 4: Verifying .gitignore configuration..." +print_status "الخطوة 4: التحقق من إعدادات .gitignore..." + +REQUIRED_IGNORES=(".env" ".env.local" "*.key" "*.pem") +MISSING_IGNORES=() + +for pattern in "${REQUIRED_IGNORES[@]}"; do + if ! grep -q "^${pattern}$" .gitignore; then + MISSING_IGNORES+=("$pattern") + fi +done + +if [ ${#MISSING_IGNORES[@]} -eq 0 ]; then + print_success ".gitignore is properly configured" + print_success ".gitignore مُعد بشكل صحيح" +else + print_warning "The following patterns are missing from .gitignore:" + print_warning "الأنماط التالية مفقودة من .gitignore:" + printf '%s\n' "${MISSING_IGNORES[@]}" +fi + +echo "" + +# Step 5: List GitHub Secrets that need to be configured +print_status "Step 5: GitHub Secrets that should be configured..." +print_status "الخطوة 5: GitHub Secrets التي يجب إعدادها..." + +echo "" +echo "Please add the following secrets in GitHub Settings > Secrets and variables > Actions:" +echo "يرجى إضافة الأسرار التالية في GitHub Settings > Secrets and variables > Actions:" +echo "" +echo " - OPENROUTER_API_KEY" +echo " - FASTAPI_SECRET_KEY" +echo " - OPENWEBUI_JWT_TOKEN" +echo " - OPENWEBUI_API_KEY" +echo " - VPS_HOST (if applicable)" +echo " - VPS_USER (if applicable)" +echo " - VPS_KEY (if applicable)" +echo "" + +# Step 6: Summary +echo "" +print_status "================================================" +print_status "📊 Security Cleanup Summary | ملخص تنظيف الأمان" +print_status "================================================" +echo "" + +if [ -f ".env.backup.local" ]; then + print_success "✓ Backups created in .env.backup.local and .env.openwebui.backup.local" + print_success "✓ تم إنشاء نسخ احتياطية" +fi + +if [ -z "$TRACKED_FILES" ]; then + print_success "✓ No sensitive files tracked in Git" + print_success "✓ لا توجد ملفات حساسة مُتتبعة في Git" +else + print_warning "⚠ Sensitive files need to be removed from Git tracking" + print_warning "⚠ الملفات الحساسة تحتاج للإزالة من تتبع Git" +fi + +if [ -z "$API_KEYS" ]; then + print_success "✓ No obvious API keys found in code" + print_success "✓ لم يتم العثور على مفاتيح API واضحة" +else + print_error "✗ Potential API keys found - review required" + print_error "✗ تم العثور على مفاتيح API محتملة - مراجعة مطلوبة" +fi + +echo "" +print_status "================================================" +print_status "📚 Next Steps | الخطوات التالية" +print_status "================================================" +echo "" +echo "1. Review SECURITY_CHECKLIST_BEFORE_PUBLIC.md" +echo " راجع SECURITY_CHECKLIST_BEFORE_PUBLIC.md" +echo "" +echo "2. Add all secrets to GitHub Secrets" +echo " أضف جميع الأسرار إلى GitHub Secrets" +echo "" +echo "3. (Optional) Clean Git history using git-filter-repo or BFG" +echo " (اختياري) نظف تاريخ Git باستخدام git-filter-repo أو BFG" +echo "" +echo "4. Review MAKE_REPOSITORY_PUBLIC_GUIDE.md for making repo public" +echo " راجع MAKE_REPOSITORY_PUBLIC_GUIDE.md لجعل المستودع عام" +echo "" +echo "5. Test all GitHub Actions workflows" +echo " اختبر جميع سير عمل GitHub Actions" +echo "" +echo "6. Make repository public: Settings > Danger Zone > Change visibility" +echo " اجعل المستودع عام: Settings > Danger Zone > Change visibility" +echo "" +print_success "Security cleanup process completed!" +print_success "اكتملت عملية تنظيف الأمان!" +echo "" From 82e34345d52ebcbd9af995e4387e826504c292e5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:09:33 +0000 Subject: [PATCH 3/5] Add quick reference guide for making repository public - Created QUICK_PUBLIC_GUIDE.md with 5-minute quick start - Updated README.md with link to quick guide - Guide prioritizes Arabic with English summary - Includes all critical steps and security warnings Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com> --- QUICK_PUBLIC_GUIDE.md | 235 ++++++++++++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 236 insertions(+) create mode 100644 QUICK_PUBLIC_GUIDE.md diff --git a/QUICK_PUBLIC_GUIDE.md b/QUICK_PUBLIC_GUIDE.md new file mode 100644 index 0000000..74d5ef9 --- /dev/null +++ b/QUICK_PUBLIC_GUIDE.md @@ -0,0 +1,235 @@ +# 🚀 دليل سريع: جعل المستودع عام +# Quick Guide: Making the Repository Public + +
+ +# ⚡ دليل سريع - خطوات جعل المستودع عام + +
+ +--- + +
+ +## 📝 ملخص تنفيذي + +أنت طلبت جعل مستودع AI-Agent-Platform عام. هذا الدليل السريع يوضح الخطوات الضرورية. + +## ⚠️ تحذير مهم جداً + +**المستودع يحتوي حالياً على ملفات حساسة مُتتبعة في Git:** +- `.env` - يحتوي على مفاتيح API و توكنات JWT +- `.env.openwebui` - يحتوي على إعدادات حساسة + +**يجب إزالتها قبل جعل المستودع عام!** + +--- + +## 🔐 الخطوات الضرورية (5 دقائق) + +### 1️⃣ تشغيل سكريبت الأمان + +```bash +cd AI-Agent-Platform +./security-cleanup.sh +``` + +هذا السكريبت سيقوم بـ: +- إنشاء نسخ احتياطية من الملفات الحساسة +- إزالة الملفات من تتبع Git +- فحص الكود بحثاً عن مفاتيح API +- إعطاءك تقرير أمني كامل + +### 2️⃣ حفظ البيانات الحساسة + +قبل الاستمرار، احفظ هذه القيم من ملف `.env`: +``` +FASTAPI_SECRET_KEY=sk-3720ccd539704717ba9af3453500fe3c +OPENWEBUI_JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... +OPENWEBUI_API_KEY=sk-3720ccd539704717ba9af3453500fe3c +``` + +**احفظها في:** +- مدير كلمات المرور الخاص بك +- أو في GitHub Secrets (الخطوة التالية) + +### 3️⃣ إضافة Secrets في GitHub + +1. اذهب إلى: `https://github.com/wasalstor-web/AI-Agent-Platform/settings/secrets/actions` +2. انقر **New repository secret** +3. أضف هذه الأسرار: + +| الاسم | القيمة | +|------|--------| +| `OPENROUTER_API_KEY` | مفتاح OpenRouter الخاص بك | +| `FASTAPI_SECRET_KEY` | القيمة من .env | +| `OPENWEBUI_JWT_TOKEN` | القيمة من .env | +| `OPENWEBUI_API_KEY` | القيمة من .env | +| `VPS_HOST` | إذا كان لديك VPS | +| `VPS_USER` | إذا كان لديك VPS | +| `VPS_KEY` | إذا كان لديك VPS | + +### 4️⃣ دفع التغييرات + +```bash +git push +``` + +### 5️⃣ جعل المستودع عام + +1. اذهب إلى: `https://github.com/wasalstor-web/AI-Agent-Platform/settings` +2. مرر للأسفل حتى **Danger Zone** +3. انقر **Change repository visibility** +4. اختر **Make public** +5. اكتب اسم المستودع: `wasalstor-web/AI-Agent-Platform` +6. انقر **I understand, make this repository public** + +**✅ تم! المستودع الآن عام** + +--- + +## 📚 وثائق مفصلة + +إذا كنت تريد معلومات أكثر تفصيلاً، راجع: + +### 1. **دليل جعل المستودع عام** 📖 +[MAKE_REPOSITORY_PUBLIC_GUIDE.md](MAKE_REPOSITORY_PUBLIC_GUIDE.md) +- شرح كامل خطوة بخطوة +- طرق متعددة (واجهة الويب، CLI) +- نصائح وأفضل الممارسات + +### 2. **قائمة التحقق الأمني** 🔒 +[SECURITY_CHECKLIST_BEFORE_PUBLIC.md](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) +- قائمة تحقق شاملة +- كيفية إزالة الملفات الحساسة من تاريخ Git +- طرق متقدمة للتنظيف الأمني + +### 3. **سكريبت الأمان** 🛠️ +[security-cleanup.sh](security-cleanup.sh) +- فحص تلقائي للأمان +- إزالة الملفات الحساسة +- تقرير أمني شامل + +--- + +## ❓ أسئلة شائعة + +### س: هل يمكنني التراجع بعد جعل المستودع عام؟ +**ج:** نعم، يمكنك تغييره مرة أخرى إلى خاص في أي وقت من Settings > Danger Zone + +### س: ماذا عن البيانات التي كانت في التاريخ؟ +**ج:** إذا أردت حذفها من التاريخ، استخدم `git-filter-repo` كما هو موضح في SECURITY_CHECKLIST_BEFORE_PUBLIC.md + +### س: هل سيؤثر هذا على GitHub Actions؟ +**ج:** لا، طالما أضفت جميع الأسرار إلى GitHub Secrets، ستعمل Workflows بشكل طبيعي + +### س: متى يجب أن أغير المفاتيح؟ +**ج:** فوراً بعد جعل المستودع عام، غيّر جميع API keys و tokens التي كانت في الملفات + +--- + +## 🎯 ملخص الأوامر + +```bash +# 1. تشغيل فحص الأمان +./security-cleanup.sh + +# 2. إزالة الملفات من Git (إذا لم يفعلها السكريبت) +git rm --cached .env +git rm --cached .env.openwebui +git commit -m "Remove sensitive files from tracking" +git push + +# 3. (اختياري) تنظيف التاريخ +pip install git-filter-repo +git filter-repo --path .env --invert-paths +git filter-repo --path .env.openwebui --invert-paths +git push --force --all + +# 4. التحقق +git status +git ls-files | grep .env +``` + +--- + +## 📞 بحاجة لمساعدة؟ + +إذا واجهت أي مشاكل: + +1. **راجع الوثائق المفصلة** في الملفات أعلاه +2. **افتح Issue** في المستودع +3. **راجع GitHub Docs**: [Setting repository visibility](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility) + +--- + +## ⏱️ الوقت المتوقع + +- **الطريقة السريعة** (بدون تنظيف التاريخ): 5-10 دقائق +- **الطريقة الكاملة** (مع تنظيف التاريخ): 15-20 دقيقة + +--- + +## ✅ جاهز للبدء؟ + +ابدأ بتشغيل سكريبت الأمان: + +```bash +./security-cleanup.sh +``` + +ثم اتبع التعليمات التي سيعرضها السكريبت. + +--- + +
+ +
+ +**🔒 الأمان أولاً | Security First 🔒** + +**لا تتسرع - خذ وقتك لضمان حماية بياناتك** + +**Don't rush - take your time to ensure your data is protected** + +
+ +--- + +
+ +## Quick Steps Summary (English) + +### Prerequisites (5 minutes) + +1. **Run security cleanup**: + ```bash + ./security-cleanup.sh + ``` + +2. **Save sensitive values** from `.env` to GitHub Secrets + +3. **Add Secrets** at Settings > Secrets and variables > Actions: + - OPENROUTER_API_KEY + - FASTAPI_SECRET_KEY + - OPENWEBUI_JWT_TOKEN + - OPENWEBUI_API_KEY + +4. **Push changes**: + ```bash + git push + ``` + +5. **Make repository public**: + - Go to Settings > Danger Zone + - Click "Change repository visibility" + - Select "Make public" + - Confirm by typing repository name + +### Detailed Documentation + +- 📖 [Complete Guide](MAKE_REPOSITORY_PUBLIC_GUIDE.md) +- 🔒 [Security Checklist](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) +- 🛠️ [Security Script](security-cleanup.sh) + +
diff --git a/README.md b/README.md index 924b47b..9364aa7 100644 --- a/README.md +++ b/README.md @@ -446,6 +446,7 @@ AI-Agent-Platform © 2025 - 🔧 **دليل إعداد النطاق**: [DOMAIN_SETUP_GUIDE.md](DOMAIN_SETUP_GUIDE.md) - 💬 **دمج OpenWebUI**: [OPENWEBUI_INTEGRATION.md](OPENWEBUI_INTEGRATION.md) - 🤖 **نظام DL+**: [DLPLUS_README.md](DLPLUS_README.md) +- ⚡ **دليل سريع: جعل المستودع عام**: [QUICK_PUBLIC_GUIDE.md](QUICK_PUBLIC_GUIDE.md) - 🔓 **دليل جعل المستودع عام**: [MAKE_REPOSITORY_PUBLIC_GUIDE.md](MAKE_REPOSITORY_PUBLIC_GUIDE.md) - 🔒 **قائمة التحقق الأمني**: [SECURITY_CHECKLIST_BEFORE_PUBLIC.md](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) From 4a466f5ebe26a528fcfbcf773518f2edcd3145d5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:11:10 +0000 Subject: [PATCH 4/5] Add executive summary for making repository public - Created REPOSITORY_PUBLIC_SUMMARY.md with complete overview - Includes critical security warnings in Arabic - Lists all 4 documentation files created - Provides quick 5-minute action plan - Explains why AI agent cannot make repo public directly Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com> --- REPOSITORY_PUBLIC_SUMMARY.md | 252 +++++++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 REPOSITORY_PUBLIC_SUMMARY.md diff --git a/REPOSITORY_PUBLIC_SUMMARY.md b/REPOSITORY_PUBLIC_SUMMARY.md new file mode 100644 index 0000000..f3edb59 --- /dev/null +++ b/REPOSITORY_PUBLIC_SUMMARY.md @@ -0,0 +1,252 @@ +# 📢 ملخص: طلب جعل المستودع عام +# Summary: Request to Make Repository Public + +--- + +
+ +# 🎯 الملخص التنفيذي + +
+ +
+ +## 📝 الطلب الأصلي + +**الطلب:** جعل مستودع AI-Agent-Platform عام على GitHub + +**الحالة:** ✅ **الوثائق جاهزة** - يتطلب تنفيذ يدوي من صاحب المستودع + +--- + +## ⚠️ تحذير أمني حرج + +**تم اكتشاف ملفات حساسة مُتتبعة في Git:** + +``` +.env ⚠️ يحتوي على مفاتيح API وتوكنات +.env.openwebui ⚠️ يحتوي على إعدادات حساسة +``` + +**هذه الملفات تحتوي على:** +- `FASTAPI_SECRET_KEY=sk-3720ccd539704717ba9af3453500fe3c` +- `OPENWEBUI_JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...` +- `OPENWEBUI_API_KEY=sk-3720ccd539704717ba9af3453500fe3c` + +**🚨 يجب إزالة هذه الملفات قبل جعل المستودع عام!** + +--- + +## 📚 الوثائق المُنشأة + +تم إنشاء 4 ملفات وثائق شاملة لمساعدتك: + +### 1. ⚡ دليل البدء السريع (5 دقائق) +**📄 QUICK_PUBLIC_GUIDE.md** +- خطوات سريعة وواضحة +- باللغة العربية مع ملخص إنجليزي +- الطريقة الأسرع للبدء + +### 2. 📖 الدليل الشامل +**📄 MAKE_REPOSITORY_PUBLIC_GUIDE.md** +- شرح تفصيلي خطوة بخطوة +- طرق متعددة (واجهة الويب، CLI) +- أمثلة عملية وأوامر كاملة +- باللغتين العربية والإنجليزية + +### 3. 🔒 قائمة التحقق الأمني +**📄 SECURITY_CHECKLIST_BEFORE_PUBLIC.md** +- قائمة تحقق شاملة من 10 أقسام +- كيفية إزالة الملفات الحساسة +- تنظيف تاريخ Git +- إعداد GitHub Secrets +- باللغتين العربية والإنجليزية + +### 4. 🛠️ سكريبت الأمان الآلي +**📄 security-cleanup.sh** +- فحص تلقائي للأمان +- إزالة الملفات من Git +- البحث عن مفاتيح API +- تقرير أمني مفصل +- قابل للتشغيل مباشرة + +--- + +## 🚀 خطوات التنفيذ السريعة + +### الخطوة 1: تشغيل فحص الأمان (دقيقة واحدة) + +```bash +cd AI-Agent-Platform +./security-cleanup.sh +``` + +### الخطوة 2: إضافة Secrets في GitHub (3 دقائق) + +اذهب إلى: +``` +https://github.com/wasalstor-web/AI-Agent-Platform/settings/secrets/actions +``` + +أضف هذه الأسرار: +- `OPENROUTER_API_KEY` - مفتاح OpenRouter الخاص بك +- `FASTAPI_SECRET_KEY` - القيمة من .env +- `OPENWEBUI_JWT_TOKEN` - القيمة من .env +- `OPENWEBUI_API_KEY` - القيمة من .env + +### الخطوة 3: دفع التغييرات (30 ثانية) + +```bash +git push +``` + +### الخطوة 4: جعل المستودع عام (دقيقة واحدة) + +1. اذهب إلى: https://github.com/wasalstor-web/AI-Agent-Platform/settings +2. مرر للأسفل إلى **Danger Zone** +3. انقر **Change repository visibility** +4. اختر **Make public** +5. اكتب: `wasalstor-web/AI-Agent-Platform` +6. انقر **I understand, make this repository public** + +**✅ تم! المستودع الآن عام** + +--- + +## 📊 جدول المقارنة + +| الخاصية | قبل | بعد | +|---------|-----|-----| +| الرؤية | 🔒 خاص (Private) | 🌍 عام (Public) | +| الوصول | أصحاب الصلاحيات فقط | الجميع | +| المساهمات | محدودة | مفتوحة للجميع | +| التكلفة | مجاني | مجاني | +| الأمان | بيانات محمية | يجب إزالة البيانات الحساسة | + +--- + +## 🎯 لماذا لا يمكن للـ AI Agent تنفيذ ذلك مباشرة؟ + +**السبب:** تغيير رؤية المستودع (عام/خاص) يتطلب: +1. ✋ صلاحيات إدارية على المستودع +2. ✋ الوصول إلى إعدادات GitHub Repository +3. ✋ مصادقة GitHub كاملة +4. ✋ تأكيد يدوي من صاحب المستودع + +**ما يمكن للـ AI Agent فعله:** +- ✅ إنشاء وثائق شاملة +- ✅ تحليل المخاطر الأمنية +- ✅ إنشاء سكريبتات مساعدة +- ✅ تقديم إرشادات خطوة بخطوة +- ✅ اكتشاف البيانات الحساسة + +--- + +## 📋 قائمة التحقق النهائية + +قبل جعل المستودع عام، تأكد من: + +- [ ] تشغيل `./security-cleanup.sh` +- [ ] إزالة `.env` و `.env.openwebui` من Git tracking +- [ ] حفظ جميع المفاتيح في مكان آمن +- [ ] إضافة جميع Secrets إلى GitHub +- [ ] مراجعة الكود للتأكد من عدم وجود بيانات حساسة +- [ ] اختبار GitHub Actions workflows +- [ ] مراجعة `.gitignore` +- [ ] قراءة MAKE_REPOSITORY_PUBLIC_GUIDE.md +- [ ] (اختياري) تنظيف تاريخ Git باستخدام git-filter-repo + +--- + +## 🔗 روابط سريعة + +### الوثائق +- ⚡ [دليل سريع (5 دقائق)](QUICK_PUBLIC_GUIDE.md) +- 📖 [دليل شامل](MAKE_REPOSITORY_PUBLIC_GUIDE.md) +- 🔒 [قائمة التحقق الأمني](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) + +### إعدادات GitHub +- 🔑 [GitHub Secrets](https://github.com/wasalstor-web/AI-Agent-Platform/settings/secrets/actions) +- ⚙️ [Repository Settings](https://github.com/wasalstor-web/AI-Agent-Platform/settings) +- 🌍 [Change Visibility](https://github.com/wasalstor-web/AI-Agent-Platform/settings#danger-zone) + +### موارد إضافية +- 📚 [GitHub Docs - Repository Visibility](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility) +- 🔐 [GitHub Secret Scanning](https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning) + +--- + +## ⏱️ الوقت المتوقع + +| المهمة | الوقت | +|--------|-------| +| تشغيل فحص الأمان | 1 دقيقة | +| إضافة GitHub Secrets | 3 دقائق | +| دفع التغييرات | 30 ثانية | +| جعل المستودع عام | 1 دقيقة | +| **المجموع** | **⏱️ 5-6 دقائق** | + +*ملاحظة: إذا اخترت تنظيف تاريخ Git، أضف 10-15 دقيقة إضافية* + +--- + +## 💡 نصائح مهمة + +### ✅ افعل +- احفظ جميع المفاتيح في مدير كلمات المرور +- راجع الوثائق بعناية +- اختبر Workflows بعد إضافة Secrets +- أنشئ نسخة احتياطية قبل تنظيف التاريخ + +### ❌ لا تفعل +- لا تتسرع في جعل المستودع عام +- لا تترك مفاتيح API في الكود +- لا تنس تغيير المفاتيح المكشوفة +- لا تتجاهل التحذيرات الأمنية + +--- + +## 📞 بحاجة لمساعدة؟ + +إذا واجهت أي مشاكل: + +1. **راجع الدليل السريع**: [QUICK_PUBLIC_GUIDE.md](QUICK_PUBLIC_GUIDE.md) +2. **راجع الدليل الشامل**: [MAKE_REPOSITORY_PUBLIC_GUIDE.md](MAKE_REPOSITORY_PUBLIC_GUIDE.md) +3. **راجع قائمة التحقق**: [SECURITY_CHECKLIST_BEFORE_PUBLIC.md](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) +4. **افتح Issue** في المستودع +5. **راجع GitHub Docs** + +--- + +## ✨ خلاصة + +**الوضع الحالي:** +- ✅ الوثائق الشاملة جاهزة +- ✅ سكريبت الأمان جاهز +- ⚠️ ملفات حساسة تحتاج للإزالة +- 🔒 المستودع حالياً خاص + +**الوضع المطلوب:** +- 🌍 المستودع عام +- 🔐 جميع البيانات الحساسة في GitHub Secrets +- ✅ GitHub Actions تعمل بشكل صحيح +- 📖 الوثائق محدثة + +**الخطوة التالية:** +ابدأ بتشغيل `./security-cleanup.sh` ثم اتبع الخطوات في QUICK_PUBLIC_GUIDE.md + +--- + +
+ +
+ +**🔒 الأمان أولاً - Don't Rush | Security First 🔒** + +**تم إنشاؤه بواسطة GitHub Copilot** + +**Created by GitHub Copilot** + +**2025-10-24** + +
From 8039e5143270560d2585fb53917f84f3384276c2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:13:35 +0000 Subject: [PATCH 5/5] Add START_HERE guide as entry point for making repo public - Created START_HERE.md as main entry point - Provides clear navigation to all documentation - Includes visual checklist for printing - Shows all critical security warnings upfront - Offers multiple paths (quick/detailed/secure) - All in Arabic with key information highlighted Co-authored-by: wasalstor-web <230709381+wasalstor-web@users.noreply.github.com> --- START_HERE.md | 242 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 START_HERE.md diff --git a/START_HERE.md b/START_HERE.md new file mode 100644 index 0000000..353d7c4 --- /dev/null +++ b/START_HERE.md @@ -0,0 +1,242 @@ +# 🎯 ابدأ من هنا | START HERE + +
+ +# 📢 مرحباً! طلبت جعل المستودع عام + +
+ +--- + +
+ +## ⚠️ تنبيه مهم جداً + +**المستودع يحتوي على ملفات حساسة يجب إزالتها أولاً!** + +لا تجعل المستودع عام قبل قراءة هذا الدليل. + +--- + +## 🚀 ابدأ هنا (اختر مساراً) + +### 🏃 المسار السريع (5 دقائق) +أنا على عجلة، أريد التنفيذ السريع +👉 **اقرأ:** [QUICK_PUBLIC_GUIDE.md](QUICK_PUBLIC_GUIDE.md) + +### 📖 المسار المفصل (15 دقيقة) +أريد فهم كل خطوة بالتفصيل +👉 **اقرأ:** [MAKE_REPOSITORY_PUBLIC_GUIDE.md](MAKE_REPOSITORY_PUBLIC_GUIDE.md) + +### 🔒 المسار الآمن (20 دقيقة) +أريد تنظيفاً كاملاً وآمناً +👉 **اقرأ:** [SECURITY_CHECKLIST_BEFORE_PUBLIC.md](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) + +### 📊 الملخص التنفيذي +أريد نظرة عامة سريعة +👉 **اقرأ:** [REPOSITORY_PUBLIC_SUMMARY.md](REPOSITORY_PUBLIC_SUMMARY.md) + +--- + +## ⚡ الخطوة الأولى (مطلوبة) + +**قبل أي شيء، شغّل سكريبت الأمان:** + +```bash +cd AI-Agent-Platform +./security-cleanup.sh +``` + +هذا السكريبت سيفحص المستودع ويخبرك بما يجب فعله. + +--- + +## 🔐 ملفات حساسة تم اكتشافها + +الملفات التالية **مُتتبعة في Git** وتحتوي على بيانات حساسة: + +| الملف | المحتوى الحساس | الحالة | +|-------|----------------|---------| +| `.env` | مفاتيح API، توكنات JWT | ⚠️ يجب الإزالة | +| `.env.openwebui` | إعدادات حساسة | ⚠️ يجب الإزالة | + +**القيم المكشوفة:** +- `FASTAPI_SECRET_KEY=sk-3720ccd539704717ba9af3453500fe3c` +- `OPENWEBUI_JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...` +- `OPENWEBUI_API_KEY=sk-3720ccd539704717ba9af3453500fe3c` + +**ماذا يعني هذا؟** +إذا جعلت المستودع عام الآن، سيتمكن أي شخص من رؤية هذه المفاتيح! + +--- + +## ✅ قائمة مرجعية سريعة + +اطبع هذه القائمة واتبعها خطوة بخطوة: + +### قبل البدء +- [ ] قرأت هذا الملف كاملاً +- [ ] فهمت المخاطر الأمنية +- [ ] عندي 5-20 دقيقة للعمل + +### خطوات الأمان (مطلوبة) +- [ ] شغّلت `./security-cleanup.sh` +- [ ] حفظت جميع المفاتيح في مدير كلمات المرور +- [ ] أزلت `.env` من Git tracking +- [ ] أزلت `.env.openwebui` من Git tracking +- [ ] دفعت التغييرات: `git push` + +### إعداد GitHub Secrets (مطلوبة) +- [ ] فتحت: Settings > Secrets and variables > Actions +- [ ] أضفت `OPENROUTER_API_KEY` +- [ ] أضفت `FASTAPI_SECRET_KEY` +- [ ] أضفت `OPENWEBUI_JWT_TOKEN` +- [ ] أضفت `OPENWEBUI_API_KEY` +- [ ] (اختياري) أضفت `VPS_HOST`, `VPS_USER`, `VPS_KEY` + +### اختبار (موصى به) +- [ ] اختبرت GitHub Actions workflows +- [ ] تأكدت من عمل جميع Secrets +- [ ] راجعت الكود للتأكد من عدم وجود بيانات حساسة أخرى + +### جعل المستودع عام +- [ ] فتحت: Settings > Danger Zone +- [ ] نقرت "Change repository visibility" +- [ ] اخترت "Make public" +- [ ] كتبت اسم المستودع: `wasalstor-web/AI-Agent-Platform` +- [ ] أكدت الإجراء + +### بعد جعل المستودع عام +- [ ] غيّرت جميع المفاتيح المكشوفة +- [ ] تحققت من أن المستودع عام +- [ ] تحققت من أن Workflows تعمل +- [ ] أنشأت Release (اختياري) + +--- + +## 📚 الوثائق المتوفرة + +| الملف | الوصف | اللغة | الحجم | +|------|-------|-------|-------| +| **QUICK_PUBLIC_GUIDE.md** | دليل سريع (5 دقائق) | عربي + إنجليزي | 6.7 KB | +| **MAKE_REPOSITORY_PUBLIC_GUIDE.md** | دليل شامل مفصل | عربي + إنجليزي | 19 KB | +| **SECURITY_CHECKLIST_BEFORE_PUBLIC.md** | قائمة تحقق أمنية | عربي + إنجليزي | 18 KB | +| **REPOSITORY_PUBLIC_SUMMARY.md** | ملخص تنفيذي | عربي + إنجليزي | 8 KB | +| **security-cleanup.sh** | سكريبت أمان آلي | تعليقات عربية | 8.1 KB | + +**المجموع:** 5 ملفات، 1915+ سطر من الوثائق + +--- + +## 🎓 ماذا ستتعلم من الوثائق؟ + +### في الدليل السريع +- ✅ كيف تزيل الملفات الحساسة (خطوة بخطوة) +- ✅ كيف تضيف Secrets في GitHub +- ✅ كيف تجعل المستودع عام +- ⏱️ الوقت: 5 دقائق + +### في الدليل الشامل +- ✅ كل ما في الدليل السريع، بالإضافة إلى: +- ✅ طرق متعددة (واجهة الويب، GitHub CLI) +- ✅ كيف تنظف تاريخ Git من البيانات الحساسة +- ✅ أفضل الممارسات الأمنية +- ✅ ماذا تفعل بعد جعل المستودع عام +- ⏱️ الوقت: 15 دقيقة + +### في قائمة التحقق الأمنية +- ✅ قائمة شاملة من 10 أقسام +- ✅ أدوات الفحص الأمني +- ✅ كيف تستخدم git-filter-repo و BFG +- ✅ كيف تحمي البيانات الحساسة +- ⏱️ الوقت: 20 دقيقة + +--- + +## 💡 نصائح سريعة + +### ✅ افعل +1. **اقرأ قبل التنفيذ** - خذ 5 دقائق لقراءة الدليل +2. **احفظ المفاتيح** - استخدم مدير كلمات المرور +3. **اختبر قبل النشر** - تأكد من عمل كل شيء +4. **أنشئ نسخة احتياطية** - قبل تنظيف التاريخ + +### ❌ لا تفعل +1. **لا تتسرع** - الأمان أهم من السرعة +2. **لا تتجاهل التحذيرات** - كل تحذير موجود لسبب +3. **لا تنس تغيير المفاتيح** - بعد جعل المستودع عام +4. **لا تحذف الوثائق** - قد تحتاجها لاحقاً + +--- + +## ❓ أسئلة شائعة + +### س: كم من الوقت سيستغرق هذا؟ +**ج:** 5-20 دقيقة حسب المسار الذي تختاره + +### س: هل يمكنني التراجع؟ +**ج:** نعم، يمكنك جعل المستودع خاص مرة أخرى في أي وقت + +### س: ماذا لو جعلت المستودع عام بالخطأ قبل إزالة الملفات؟ +**ج:** اجعله خاص فوراً، غيّر جميع المفاتيح، ثم اتبع الدليل + +### س: هل سيتأثر GitHub Actions؟ +**ج:** لا، إذا أضفت جميع Secrets بشكل صحيح + +### س: هل يمكن للـ AI Agent تنفيذ هذا بدلاً عني؟ +**ج:** لا، تغيير رؤية المستودع يتطلب صلاحيات إدارية يدوية + +--- + +## 🔗 روابط مفيدة + +### الوثائق +- ⚡ [دليل سريع](QUICK_PUBLIC_GUIDE.md) +- �� [دليل شامل](MAKE_REPOSITORY_PUBLIC_GUIDE.md) +- 🔒 [قائمة التحقق الأمنية](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) +- 📊 [الملخص التنفيذي](REPOSITORY_PUBLIC_SUMMARY.md) + +### إعدادات GitHub +- 🔑 [GitHub Secrets](https://github.com/wasalstor-web/AI-Agent-Platform/settings/secrets/actions) +- ⚙️ [Repository Settings](https://github.com/wasalstor-web/AI-Agent-Platform/settings) +- 🌍 [Change Visibility](https://github.com/wasalstor-web/AI-Agent-Platform/settings#danger-zone) + +--- + +## 🎯 الخطوة التالية + +**جاهز للبدء؟** + +1. **شغّل السكريبت:** + ```bash + ./security-cleanup.sh + ``` + +2. **اختر دليلك:** + - سريع؟ → [QUICK_PUBLIC_GUIDE.md](QUICK_PUBLIC_GUIDE.md) + - مفصل؟ → [MAKE_REPOSITORY_PUBLIC_GUIDE.md](MAKE_REPOSITORY_PUBLIC_GUIDE.md) + - آمن؟ → [SECURITY_CHECKLIST_BEFORE_PUBLIC.md](SECURITY_CHECKLIST_BEFORE_PUBLIC.md) + +3. **اتبع التعليمات خطوة بخطوة** + +--- + +
+ +
+ +## 🔒 تذكّر: الأمان أولاً + +**Don't Rush - Take Your Time** + +**لا تتسرع - خذ وقتك** + +--- + +**تم إنشاؤه بواسطة GitHub Copilot** + +**Created by GitHub Copilot** + +📅 2025-10-24 + +