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