Network security phishing classifier
Classifies phishing websites from URL features with MongoDB ETL, drift checks, MLflow tracking and AWS deployment.
What it does
Phishing website data is converted from CSV to JSON and loaded into MongoDB Atlas, then ingested, schema-validated and checked for drift with a two-sample KS test. A KNN imputer prepares the features, six classifiers are compared with GridSearchCV and the best is logged to MLflow on DagsHub, with artifacts and models synced to S3. A FastAPI app offers /train and batch /predict on uploaded CSVs; GitHub Actions pushes the image to Amazon ECR and a self-hosted runner on EC2 runs it.
What was built
- 01
ETL script converts the phishing CSV to JSON records and inserts them into a MongoDB Atlas collection.
- 02
Validation checks column count against schema.yaml and writes a per-column KS-test drift report.
- 03
KNNImputer pipeline feeds Random Forest, Decision Tree, Gradient Boosting, Logistic Regression and AdaBoost grid searches.
- 04
Best model's F1, precision and recall are logged to MLflow on DagsHub; artifacts and models sync to S3.
- 05
GitHub Actions builds and pushes to Amazon ECR, then a self-hosted EC2 runner pulls and runs the container.
The pipeline, layer by layer
Five layers, one pipeline.
L1ETL
- Phishing CSV
- MongoDB Atlas
L2Validation
- Schema check
- KS drift report
L3Training
- KNN imputer
- Model selection and tuning
- MLflow on DagsHub
L4Artifacts
- S3 sync
L5Delivery
- FastAPI app
- GitHub Actions to ECR
- EC2 self-hosted runner