MIT License β’ Code of Conduct β’ Contributing Guidelines β’ Security Policy
ScamShield is a real-time AI/ML platform that audits job descriptions, checks URLs, verifies company registrations, and analyzes recruiter contact channels to calculate a comprehensive Trust Score (0-100%) before applicants submit their data.
ScamShield evaluates job postings using a 7-Stage Horizontal Verification Pipeline:
[Ingested] β [NLP Text] β [URL Scan] β [Company Check] β [Recruiter Check] β [Trust Score] β [Decision]
The system verifies credibility across 5 Trust Pillars:
- NLP Text Analysis (Brain):
- Evaluates semantics using a machine learning text classifier.
- Audits vocabulary density and clickbait signals (e.g. excessive exclamation marks).
- Analyzes lexical complexity via the Flesch Reading Ease index to detect convoluted machine-generated templates.
- URL Phishing Scan (Link):
- Inspects embedded links for secure SSL protocols (
https://protocols vs insecurehttp://). - Audits domains against suspicious free hosting providers (e.g., Blogspot, WordPress, Wix) and url shorteners (e.g., bit.ly).
- Inspects embedded links for secure SSL protocols (
- Company Check (Magnifying Glass):
- Validates description completeness (checks if company profiles are missing or too short).
- Audits company names against official corporate registry structures (identifying standard suffixes like Ltd, Inc, LLP, Pvt).
- Recruiter Behavior Check (Shield):
- Scans for personal contact details (embedded personal emails and phone numbers in the description text).
- Audits email domains, distinguishing between public free email providers (e.g.
@gmail.com,@yahoo.com) and validated corporate domains. - Cross-references job locations against historical regional fraud ratios.
- Flags pressure tactics and urgency terms (e.g., "URGENT", "IMMEDIATE").
- Trust Score Engine (Metric/Dial):
- Integrates machine learning probabilities and heuristic risk metrics to compute a credibility rating (0 to 100%).
- 80% - 100%: High Trust (Verified Safe / Approved)
- 50% - 79%: Neutral Risk (Verification Advised)
- Below 50%: Low Trust (Scam Vulnerability Alert / Application Blocked)
The core prediction models have been upgraded to maximize prediction accuracy and minimize false-positive warning triggers:
- Text Classifier: Upgraded from
CountVectorizertoTfidfVectorizer(with 10,000 max features) and trained anSGDClassifier(loss='log_loss')on balanced training sets usingSMOTE. This filters vocabulary noise, raising the individual text F1-score from 76.52% to 80.97%. - Tabular Classifier: Replaced the linear model with a tree-based
RandomForestClassifier(100 estimators) which naturally models non-linear correlations (like location threat ratios, character lengths, and Flesch scores) without scaling bias. This boosted the individual tabular F1-score from 16.54% to 56.32%. - Ensemble Soft Voting: Combined model outputs using a weighted soft-voting model (
0.5 * Text Risk + 0.5 * Tabular Risk) combined with a heuristic check penalty. This produces:- Ensemble Accuracy: 98.11% (was 93.74%)
- Ensemble F1 Score: 84.93% (was 62.31%)
- Ensemble Precision: 89.86% (was 51.71% β reducing false alarm flags by 90%)
- Ensemble Recall: 80.52% (was 78.35%)
The interface is built using Vanilla CSS for clean separation of concerns and features:
- Horizontal Pipeline Tracker: Connects processing nodes with glowing neon tracks, animating step-by-step during live scans.
- Trust Pillars Grid: Sleek, hover-responsive cards representing the 4 checks (NLP, URL, Company, Recruiter) with color-coded status badges (
Passedin green,Warningin amber,Failedin red). - Theme Toggle Switch: Sun/Moon switch in the header that toggles between:
- Obsidian Dark Theme: A dark obsidian slate background (
#080a14) with amethyst purple accents and glowing elements. - Alabaster Light Theme: A soft slate-cream background (
#f8fafc) with deep indigo highlights and clean card shadows.
- Obsidian Dark Theme: A dark obsidian slate background (
- Developer telemetry fine print: A small section at the bottom displaying raw machine learning model flags and location ratios for validation.
Install the required packages:
pip install flask pandas numpy scikit-learn imbalanced-learn joblib textstat beautifulsoup4 nltkTrain and serialize the TF-IDF vectorizers and Random Forest classifiers on the balanced dataset:
python train_model.pyThis script will output the accuracy metrics and save the binary files into the models/ directory:
tfidf_vectorizer.pklclf_log.pkl(text classifier)clf_num.pkl(tabular classifier)numeric_features.pkl
Launch the Flask development server:
python app.pyOpen your web browser and navigate to http://127.0.0.1:5000 to access the dashboard.
Paste a job listing link (e.g. from LinkedIn or Indeed) into the Smart URL Scan tab. The scraping crawler will auto-fetch the job title, company name, location, and description, pre-populate the input fields, switch to the manual tab, and automatically trigger the ML threat analysis.
