Your AI-Powered Shield Against Digital Threats
NetShield (formerly CodeGuardians) is a comprehensive cybersecurity command center designed to protect users from modern digital threats. It unifies detection engines for AI-generated deepfakes, phishing attacks, malicious URLs, and unsafe commands into a single platform.
Goal: Detect AI-generated images, deepfakes, and synthetic media.
- Technology: Hugging Face-hosted inference integrated through
gradio_client - How it works:
- Sends uploaded image input to the configured AI detection endpoint.
- Returns prediction label with confidence score.
Goal: Analyze emails and messages to detect social engineering and phishing attempts.
- Technology: Hybrid approach (ML + Rules + URL Analysis)
- Features:
- ML Model: TF-IDF vectorization with a saved scikit-learn phishing classifier.
- Rule-Based Engine: Detects urgency and social-engineering keywords.
- URL Scanner: Extracts links and validates each URL with ML + Google Safe Browsing.
Goal: Verify if a website link is safe before clicking.
- Technology: Hybrid service (Custom URL ML Model + Google Safe Browsing API)
- Features:
- Machine Learning Analysis: Lexical/structural URL feature-based detection.
- Real-time Verification: Cross-checks links with Google Safe Browsing.
- Combined Verdict: Returns a final risk status for user action.
Goal: Help users avoid risky shell commands.
- Technology: Static analysis and pattern matching
- How it works:
- Detects destructive and suspicious shell patterns.
- Flags escalation/network/obfuscation risk patterns.
Goal: Generate strong passwords and check breach exposure.
- Technology: Cryptographically secure RNG + HaveIBeenPwned API
- Features:
- Generator: Configurable high-entropy password generation.
- Strength Meter: Real-time complexity feedback.
- Breach Check: k-Anonymity password leak lookup.
Goal: Real-time support while browsing.
- Technology: Chrome Extension Manifest V3 (JavaScript/HTML/CSS)
- Features:
- Password-field detection support.
- Popup utilities for phishing and password-related actions.
graph TD
User([User/Source]) --> WebUI[Frontend Static Pages]
User --> BrowserExt[Chrome Extension MV3]
WebUI --> API[Flask Backend]
BrowserExt --> API
API --> URLModel[URL ML Model - scikit-learn]
API --> PhishModel[Phishing Text Model - scikit-learn + TF-IDF]
API --> SafeBrowsing[Google Safe Browsing API]
API --> AIDetect[Hugging Face Inference via gradio_client]
WebUI --> PwnedAPI[HaveIBeenPwned Password API]
- HTML5 Pages: Multi-page interface in
frontend/pages. - Vanilla JavaScript: Feature logic in
frontend/js. - CSS3: Shared styles in
frontend/css/style.csswith static assets infrontend/assets.
- Manifest V3: Defined in
extension/manifest.json. - Modules:
background/,content/,popup/, andutils/.
- Flask (Python 3): App entry and routing in
backend/app.py. - Services: Modular detection/safety services in
backend/services. - Server & Deployment:
gunicorn,Procfile, andvercel.json. - Config: Environment loading through
python-dotenv.
- Stored Models:
.pklfiles inbackend/modelloaded viajoblib. - Training Utilities: Model/data scripts in
backend/utils. - Libraries: scikit-learn, pandas, Pillow.
- Image AI Integration: Hugging Face endpoint client via
gradio_client.
- Google Safe Browsing API
- HaveIBeenPwned API (k-Anonymity range endpoint)
- Python 3.8 or higher
git clone https://github.com/athrvas017/Code_Guardians.git
cd Code_Guardianspython -m venv venv# Windows (PowerShell)
.\venv\Scripts\Activate.ps1
# Windows (Command Prompt)
.\venv\Scripts\activate.bat
# Linux/macOS
source venv/bin/activatepip install -r backend/requirements.txtCreate a .env file in the project root (or use .env.example) and set:
GOOGLE_API_KEYHF_API_URLHF_API_TOKEN(if required by your HF endpoint)SECRET_KEY(optional)
cd backend
python app.pyThe app runs on http://127.0.0.1:5000 by default.
| Route | Feature |
|---|---|
/ |
Home / Dashboard |
/ai-detection |
AI Image Detection |
/phishing |
Phishing Detector |
/url-safety |
URL Safety Checker |
/password |
Password Toolkit |
/awareness |
Cyber Awareness Guide |
/command-analysis |
Dangerous Command Analysis |
Code_Guardians/
|-- backend/
| |-- app.py
| |-- requirements.txt
| |-- model/ # Trained .pkl models/vectorizers
| |-- services/ # Detection and safety services
| |-- templates/ # Flask templates
| `-- utils/ # Training and feature utilities
|-- frontend/
| |-- pages/ # Static HTML pages
| |-- js/ # Frontend scripts
| |-- css/
| `-- assets/
|-- extension/
| |-- manifest.json
| |-- background/
| |-- content/
| |-- popup/
| `-- utils/
`-- README.md
- Partially Implemented: Database layer integration, password manager module.
- Future Enhancements: Advanced password manager, improved URL model, improved AI image model.