How aaarya2117/phishnet-classifier works
PhishNet is a multi-label phishing-email classifier with model training, evaluation, REST/CLI inference, analyst feedback retraining, and optional Microsoft 365 inbox quarantine. The primary workflow is email submission to inference and threat labels/quarantine status; the O365 scanner invokes that API and acts on its result. Training and retraining prepare data, fit BERT, and save model artifacts. Edges reflect the sampled Python calls and README-documented capabilities; unsampled deployment details are omitted.
Main entry points: predict.py Inference API and CLI · retrain.py Feedback retraining · o365_integration.py Inbox scanner · train.py BERT training
Components 15
Model lifecycle
- Dataset preparation
src/preprocess.py - BERT training
src/train.py - Model evaluation
src/evaluate.py - Saved model
Classification
- Inference API and CLI
src/predict.py - Labels and decision
Feedback learning
- Feedback retraining
src/retrain.py - Feedback buffer
Mail security
- Inbox scanner
src/o365_integration.py - Scan audit log
Other components
- Security analyst
- Email sender
- Hugging Face dataset
- Pretrained BERT
- Microsoft Graph
Connections 22
- Dataset preparation → Hugging Face dataset: loads
- BERT training → Dataset preparation: prepares data
- BERT training → Pretrained BERT: loads pretrained model
- BERT training → Saved model: saves model
- Model evaluation → Dataset preparation: prepares data
- Model evaluation → Saved model: loads model
- Model evaluation → Labels and decision: writes metrics
- Security analyst → Inference API and CLI: submits email
- Inference API and CLI → Saved model: loads model
- Inference API and CLI → Labels and decision: returns labels
- Security analyst → Inference API and CLI: submits corrections
- Inference API and CLI → Feedback buffer: appends feedback
- Feedback retraining → Feedback buffer: reads and clears
- Feedback retraining → Dataset preparation: prepares data
- Feedback retraining → BERT training: uses training helpers
- Feedback retraining → Saved model: backs up and saves
- Feedback retraining → Hugging Face dataset: loads original data
- Email sender → Microsoft Graph: delivers email
- Inbox scanner → Microsoft Graph: fetches and moves mail
- Inbox scanner → Inference API and CLI: submits email
- Inbox scanner → Microsoft Graph: marks processed
- Inbox scanner → Scan audit log: appends scan results