An end-to-end Machine Learning + MLOps project for detecting phishing websites, built with a production-ready pipeline and deployed on AWS using CI/CD.
This project detects whether a given website is phishing or legitimate using a trained machine learning model.
It includes:
- Full ML pipeline (data β model β prediction)
- Experiment tracking with MLflow
- Cloud storage (AWS S3)
- Containerization (Docker)
- CI/CD automation (GitHub Actions)
- Deployment on AWS EC2
- REST API using FastAPI
Data β Pipeline β MLflow β S3 β Docker β ECR β GitHub Actions β EC2 β FastAPI API
- Python
- Scikit-learn
- Pandas
- NumPy
- FastAPI
- Uvicorn
- MLflow
- DagsHub
- AWS S3
- AWS ECR
- AWS EC2
- Docker
- GitHub Actions
- Self-hosted Runner
networksecurity/
β
βββ components/ # Data ingestion, transformation, training
βββ pipeline/ # Training & prediction pipelines
βββ cloud/ # AWS S3 sync logic
βββ utils/ # Helper utilities
βββ entity/ # Config & artifact entities
βββ exception/ # Custom exception handling
βββ logging/ # Logging module
β
βββ app.py # FastAPI app
βββ main.py # Pipeline runner
βββ requirements.txt
βββ Dockerfile
βββ .github/workflows # CI/CD pipeline
- Modular ML pipeline (production-ready structure)
- Automated training & prediction workflows
- Experiment tracking with MLflow + DagsHub
- Model & artifacts stored in AWS S3
- Dockerized application
- CI/CD pipeline using GitHub Actions
- Auto deployment on EC2
- FastAPI REST endpoints for real-time predictions
GET /
GET /train
POST /predict
docker build -t networksecurity .
docker run -d -p 8080:8080 networksecurity
- Push code to GitHub
- GitHub Actions triggers CI/CD
- Docker image is built
- Image pushed to AWS ECR
- EC2 pulls latest image
- Container runs automatically
The pipeline includes:
- Code checkout
- Build Docker image
- Push to AWS ECR
- Deploy to EC2
- Integrated MLflow with DagsHub
- Tracks:
- Accuracy
- Precision
- Recall
- F1-score
- Enables comparison across multiple runs
- AWS S3 for:
- Model artifacts
- Pipeline outputs
- Versioned storage
http://13.217.93.214:8080/docs
Swagger UI for testing endpoints.
# Clone repo
git clone https://github.com/abhisinghh72/networksecurity.git
# Create virtual environment
python -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Run app
python app.py
- Detect phishing URLs
- Integrate into browser extensions
- Security and fraud detection systems
- Browser extension for real-time URL checking
- Frontend dashboard
- Advanced models (XGBoost, Deep Learning)
- Real-time prediction system
Abhishek Singh