This document describes how to safely make this VPN service project public while protecting sensitive information using GitHub Secrets.
The following sensitive information should be stored as GitHub Secrets:
-
API Keys and Tokens
- Supabase URL and API keys
- Telegram Bot Token
- Any other third-party service credentials
-
Authentication Credentials
- VPN panel admin credentials (XUI_USERNAME, XUI_PASSWORD)
- Database access credentials
- SSH keys for deployment
-
Environment-specific Configuration
- Production server information
- Domain names and certificates
- Navigate to your GitHub repository
- Go to Settings > Secrets and variables > Actions
- Click on "New repository secret"
- Add the following secrets (adjust as needed for your setup):
Secret Name | Description |
---|---|
SUPABASE_URL |
Your Supabase project URL |
SUPABASE_KEY |
Your Supabase anon/public key |
SUPABASE_SERVICE_ROLE_KEY |
Your Supabase service role key |
TELEGRAM_BOT_TOKEN |
Your Telegram bot token |
XUI_USERNAME |
Username for the VPN admin panel |
XUI_PASSWORD |
Password for the VPN admin panel |
SSH_PRIVATE_KEY |
Private SSH key for deployment |
SSH_KNOWN_HOSTS |
SSH known hosts for secure deployment |
TIMEZONE |
Server timezone (e.g., Europe/Moscow) |
Ensure your .env.example
file exists but doesn't contain actual values:
# Telegram Bot Settings
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
# 3x-ui Panel Settings
XUI_USERNAME=admin
XUI_PASSWORD=admin123
# Supabase Settings
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# Additional settings...
Our CI/CD workflow has been updated to use GitHub Secrets instead of hardcoded values. The workflow:
- Deploys the application using secrets
- Injects environment variables from GitHub Secrets
- Runs tests to ensure everything is working
- Never commit sensitive information to the repository, even temporarily
- Regularly rotate credentials and update GitHub Secrets
- Use environment-specific secrets for staging and production
- Set up branch protection rules to enforce code reviews
- Enable vulnerability alerts for the repository
The deployment process now uses GitHub Secrets for all sensitive information:
- The workflow pulls secrets from GitHub and creates the
.env
file during deployment - Docker Compose uses these environment variables via variable substitution
- Container services access their required secrets via environment variables
For local development:
- Copy
.env.example
to.env
- Add your development credentials to
.env
- Ensure
.env
is in.gitignore
to prevent accidental commits
If you discover a security vulnerability within this project, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.