A modern, secure file sharing application with password protection, expiration dates, download limits, and virus scanning capabilities.
- Password Protection: All files are protected with user-defined passwords
- Virus Scanning: Automatic virus scanning using VirusTotal API before upload
- File Encryption: Files are encrypted before storage
- Secure Links: Time-limited, download-limited sharing links
- Authentication: Supabase-based user authentication

Real-time virus scanning integrated into the upload workflow.
- Multiple Formats: Support for documents, images, and archives
- Size Limits: 50MB maximum file size
- Download Tracking: Monitor download counts and limits
- Expiration Control: Set custom expiration times (1 hour to 1 year)
- Responsive Design: Works on desktop and mobile
- Real-time Feedback: Progress indicators and status updates
- Beautiful Animations: Network background and smooth transitions
- User-friendly: Intuitive drag-and-drop interface
- Vue.js 3: Modern reactive framework
- Vite: Fast build tool
- Axios: HTTP client for API calls
- Supabase: Authentication and database
- Flask: Python web framework
- Supabase: Database and storage
- VirusTotal API: Virus scanning service
- Cryptography: File encryption
- Docker: Containerization for consistent development and production environments
- Docker Compose: Multi-container orchestration
- Node.js 16+
- Python 3.7+
- Supabase account
- VirusTotal API key (optional but recommended)
-
Clone the repository
git clone <repository-url> cd secure-file-sharing
-
Setup Backend
cd backend pip install -r requirements.txt -
Configure Environment Variables Create a
.envfile in the backend directory:SUPABASE_URL=<SUPABASE_URL> SUPABASE_KEY=<SUPABASE_KEY> SUPABASE_SERVICE_ROLE_KEY=<SUPABASE_SERVICE_ROLE_KEY> FERNET_KEY=<FERNET_KEY> VIRUSTOTAL_API_KEY=<VIRUSTOTAL_API_KEY> # Optional
-
Setup Frontend
cd frontend npm install -
Start the Application
# Terminal 1 - Backend cd backend python app.py # Terminal 2 - Frontend cd frontend npm run dev
-
Access the Application Open http://localhost:5173 in your browser
The easiest way to run the application is using Docker Compose.
-
Configure Environment Variables Ensure you have
.envfiles in bothbackend/andfrontend/directories as described in the Operations Guide. -
Run with Docker Compose
docker-compose up --build
-
Access the Application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
The application includes automatic virus scanning using VirusTotal API. See OPERATIONS.md for detailed setup instructions.
- Get a free API key from VirusTotal
- Add
VIRUSTOTAL_API_KEY=your_keyto your.envfile - Restart the backend server
-
Login/Signup: Create an account or sign in to access your dashboard.
-
Select File: Drag and drop or click to browse.
-
Configure Settings: Set download limits and expiration.
-
Set Password: Create a secure password.
-
Upload: File is automatically scanned and uploaded.
-
Share: Copy the generated download link.
-
Access Link: Open the shared download link
-
Enter Password: Provide the file password
-
Download: File is decrypted and downloaded. Keep track of limits and expiry.
-
File Upload: File is temporarily saved
-
Hash Calculation: SHA-256 hash is computed
-
VirusTotal Check: Hash is checked against VirusTotal database
-
Upload if New: If not found, file is uploaded for scanning
-
Analysis: 70+ antivirus engines analyze the file
-
Decision: Safe files proceed, threats are blocked
- Encryption: Files are encrypted using Fernet (AES-128)
- Password Hashing: Passwords are hashed with PBKDF2
- Secure Storage: Files stored in Supabase with access controls
- Temporary Scanning: Files are deleted after virus scanning
This application has been thoroughly tested using industry-standard security tools:
- OWASP ZAP: Web application security scanner for identifying vulnerabilities
- Trivy: Comprehensive security scanner for container images, file systems, and git repositories
- SonarQube: Continuous code quality and security inspection platform
- Snyk: Dependency vulnerability scanning and monitoring
- Bandit: Python security linter for identifying common security issues
- Semgrep: Static analysis tool for finding security vulnerabilities and bugs
Detailed security reports and implementation details can be found in SECURITY_REPORT.md.
The project employs a comprehensive GitHub Actions pipeline to ensure security at every stage:
- Secrets Detection: Scans for hardcoded secrets using Gitleaks and Trivy.
- SCA (Software Composition Analysis): Checks dependencies for vulnerabilities using Snyk, Safety (Python), and npm audit (Node.js).
- SAST (Static Application Security Testing): Analyzes code for security flaws using Bandit (Python) and Semgrep.
- Container Security: Scans Docker images for OS-level vulnerabilities using Trivy.
- DAST (Dynamic Application Security Testing): Scans the running application using OWASP ZAP.
The pipeline runs automatically on every push and pull request to the main branch.
POST /api/share- Upload and share a fileGET /api/download/<token>- Get download page infoPOST /api/download/<token>/file- Download file with password
GET /api/dashboard/files- Get user's shared filesDELETE /api/dashboard/files/<id>- Delete shared file

Comprehensive view of your active shares and storage.
For administrators, the application provides a robust management interface to monitor all activity.

Overall system health and user activity monitoring.

Manage registered users and permissions.

Monitor all shared files across the system.
| Variable | Description | Required |
|---|---|---|
SUPABASE_URL |
Supabase project URL | Yes |
SUPABASE_KEY |
Supabase anonymous key | Yes |
SUPABASE_SERVICE_ROLE_KEY |
Supabase service role key | Yes |
FERNET_KEY |
Encryption key | Yes |
VIRUSTOTAL_API_KEY |
VirusTotal API key | Yes |
- Maximum: 50MB per file
- Supported Types: PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, JPG, JPEG, PNG, GIF, SVG, WEBP, TXT, CSV, RTF, ZIP, RAR
secure-file-sharing/
βββ backend/
β βββ app.py # Main Flask application
β βββ config.py # Configuration settings
β βββ requirements.txt # Python dependencies
β βββ routes/ # API route handlers
β βββ utils/ # Utility functions
β βββ encryption.py # File encryption
β βββ virus_scan.py # VirusTotal integration
βββ frontend/
β βββ src/
β β βββ components/ # Vue components
β β βββ router.js # Vue router
β β βββ supabase.js # Supabase client
β βββ package.json # Node dependencies
β βββ vite.config.js # Vite configuration
βββ README.md # This file
# Backend tests
cd backend
python -m pytest
# Frontend tests
cd frontend
npm run test
### Security Verification
The `python/` directory contains custom security verification scripts to ensure the server is hardened against common vulnerabilities.
```bash
# Run comprehensive security checks
python python/comprehensive_security_test.py
# Validate admin route security
python python/validate_admin_fix.py- Set up a Python environment (Python 3.7+)
- Install dependencies:
pip install -r requirements.txt - Configure environment variables
- Run with Gunicorn:
gunicorn app:app
- Build the project:
npm run build - Deploy the
distfolder to your hosting service - Configure environment variables for production
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Check the OPERATIONS.md for virus scanning issues
- Review the troubleshooting section in the setup guide
- DEPLOYMENT.md for installation issues
- ARCHITECTURE.md for technical deep-dives
- API Keys: Never commit API keys to version control
- Rate Limits: Monitor VirusTotal API usage
- File Privacy: Files are encrypted and not accessible without passwords
- Temporary Storage: Files are deleted after virus scanning
- HTTPS: Always use HTTPS in production
Note: This application includes virus scanning capabilities. Ensure you comply with VirusTotal's terms of service and API usage limits.






