Skip to content

adi0900/TrueGaurdian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TrueGuardian - AI-Powered Threat Detection

TrueGuardian Logo

AI Orchestration for Cloud Security

TrueGuardian is an advanced browser extension that provides real-time threat detection and monitoring using AI-powered analysis. It combines cutting-edge security features with an intuitive dashboard to protect your digital life with every click.


🌟 Features

πŸ›‘οΈ Core Security Features

  • AI-Powered Threat Detection: Detects SQLi, XSS, CSRF, RCE, data exfiltration, malware, and more
  • Real-Time Monitoring: Continuous analysis of HTTP/HTTPS requests
  • AWS Bedrock Integration: Claude 3.5 Sonnet for advanced threat analysis
  • Smart Notifications: Browser alerts, badge updates, and on-page warning modals
  • Context Enrichment: Captures tab info, session data, device details, and user identity

πŸ“Š Visualization & Analytics

  • Interactive Dashboard: 4 Chart.js powered visualizations
    • Threats by Domain (Bar Chart)
    • Resource Types (Doughnut Chart)
    • Threats Over Time (Line Chart)
    • Severity Distribution (Bar Chart)
  • Advanced Grouping: Group threats by domain, tab/session, resource type, or severity
  • Real-Time Statistics: Live threat counts, confidence scores, and session tracking

πŸ“€ Export & Integration

  • CSV Export: 16+ columns with full context data
  • JSON Export: Nested structure with grouping and statistics
  • SIEM Integration: Splunk HEC, Datadog Events API support
  • AWS SNS/EventBridge: Cloud-based alerting and workflow automation
  • Webhook Support: Custom integration endpoints

🎨 Modern UI/UX

  • Glassmorphism Design: Beautiful dark theme with backdrop blur effects
  • Responsive Layout: Works on desktop and mobile browsers
  • Interactive Elements: Smooth transitions, hover effects, collapsible groups
  • Multi-Tab Dashboard: Overview, Analysis, Threats, and Settings tabs

πŸš€ Quick Start

Installation

  1. Download the Extension

    git clone https://github.com/adi0900/TrueGaurdian.git
    cd TrueGaurdian/extension
  2. Load in Chrome

    • Open chrome://extensions/
    • Enable "Developer mode"
    • Click "Load unpacked"
    • Select the extension folder
  3. Pin to Toolbar

    • Click the puzzle icon in Chrome
    • Pin TrueGuardian to your toolbar

Enable Advanced Features

For the full dashboard experience with charts and grouping:

cd extension

# Backup current files (optional)
mkdir backups
copy background.js backups\
copy popup.html backups\
copy popup.js backups\

# Activate advanced version
copy background-advanced.js background.js
copy popup-advanced.html popup.html
copy popup-advanced.js popup.js

Then reload the extension from chrome://extensions/


πŸ“– Documentation

Extension Documentation

Website Pages


πŸ—οΈ Architecture

System Architecture Diagram

graph TB
    subgraph "User Browser"
        A[Web Page] --> B[Content Script]
        B --> C[Background Service Worker]
        D[Extension Popup] <--> C
    end

    subgraph "Chrome APIs"
        C --> E[WebRequest API]
        C --> F[Storage API]
        C --> G[Notifications API]
    end

    subgraph "AWS Cloud"
        C --> H[AWS Bedrock]
        H --> I[Claude 3.5 Sonnet]
        C --> J[AWS SNS]
        C --> K[AWS EventBridge]
    end

    subgraph "External Integrations"
        C --> L[Splunk HEC]
        C --> M[Datadog API]
        C --> N[Custom Webhooks]
    end

    subgraph "Data Flow"
        E --> |HTTP/HTTPS Requests| C
        C --> |AI Analysis| I
        I --> |Threat Detection| C
        C --> |Store Threats| F
        C --> |Alert User| G
        C --> |Export Data| O[CSV/JSON]
    end

    style A fill:#e1f5ff
    style C fill:#ffe1e1
    style I fill:#e1ffe1
    style D fill:#fff4e1
Loading

Component Flow

sequenceDiagram
    participant User
    participant WebPage
    participant ContentScript
    participant Background
    participant Bedrock
    participant Storage
    participant Popup

    User->>WebPage: Browse Website
    WebPage->>ContentScript: Page Load
    ContentScript->>Background: Monitor Requests
    Background->>Background: Capture Request Details
    Background->>Bedrock: Analyze with AI
    Bedrock-->>Background: Threat Assessment
    Background->>Storage: Save Threat Data
    Background->>ContentScript: Show Warning Modal
    Background->>User: Browser Notification
    User->>Popup: Open Dashboard
    Popup->>Storage: Fetch Threats
    Storage-->>Popup: Return Data
    Popup->>User: Display Charts & Stats
    User->>Popup: Export Data
    Popup->>User: Download CSV/JSON
Loading

Key Components

Component Function Technology
Content Script Injects into web pages, monitors DOM JavaScript
Background Worker Analyzes requests, AI integration Service Worker
Popup Dashboard Interactive UI with charts HTML/CSS/Chart.js
WebRequest API Intercepts HTTP/HTTPS traffic Chrome API
Storage API Persists threat data locally Chrome Storage
AWS Bedrock AI-powered threat analysis Claude 3.5 Sonnet
Export Engine CSV/JSON data export JavaScript
SIEM Connectors External platform integration REST APIs

πŸ—οΈ Project Structure

TrueGaurdian/
β”œβ”€β”€ extension/                      # Browser Extension
β”‚   β”œβ”€β”€ background.js               # Service worker (basic)
β”‚   β”œβ”€β”€ background-advanced.js      # Enhanced service worker with tagging
β”‚   β”œβ”€β”€ background-enhanced.js      # Service worker with notifications
β”‚   β”œβ”€β”€ popup.html                  # Extension popup (basic)
β”‚   β”œβ”€β”€ popup-advanced.html         # Advanced dashboard with charts
β”‚   β”œβ”€β”€ popup-enhanced.html         # Enhanced popup with filters
β”‚   β”œβ”€β”€ popup.js                    # Popup logic (basic)
β”‚   β”œβ”€β”€ popup-advanced.js           # Advanced dashboard logic
β”‚   β”œβ”€β”€ popup-enhanced.js           # Enhanced popup logic
β”‚   β”œβ”€β”€ content.js                  # Content script (basic)
β”‚   β”œβ”€β”€ content-enhanced.js         # Content script with modals
β”‚   β”œβ”€β”€ manifest.json               # Extension manifest V3
β”‚   β”œβ”€β”€ manifest-enhanced.json      # Enhanced manifest with permissions
β”‚   β”œβ”€β”€ aws-lambda-examples.js      # AWS integration examples
β”‚   β”œβ”€β”€ export-examples/            # Sample export files
β”‚   β”‚   β”œβ”€β”€ threat-export-sample.csv
β”‚   β”‚   └── threat-export-sample.json
β”‚   └── *.md                        # Documentation files
β”‚
β”œβ”€β”€ my-react-app/                   # React Website
β”‚   β”œβ”€β”€ index.html                  # Homepage
β”‚   β”œβ”€β”€ overview.html               # Feature overview
β”‚   β”œβ”€β”€ threats.html                # Threat dashboard demo
β”‚   β”œβ”€β”€ documentation.html          # Documentation page
β”‚   β”œβ”€β”€ installation-guide.html     # Installation guide
β”‚   β”œβ”€β”€ privacy-policy.html         # Privacy policy
β”‚   β”œβ”€β”€ terms-of-service.html       # Terms of service
β”‚   β”œβ”€β”€ support.html                # Support and FAQ
β”‚   β”œβ”€β”€ favicon.png                 # TrueGuardian logo
β”‚   └── src/                        # React source files
β”‚
β”œβ”€β”€ extension.zip                   # Packaged extension for download
└── README.md                       # This file

πŸ”§ Configuration

AWS Bedrock Setup (Optional)

To enable AI-powered threat analysis:

  1. Get AWS Credentials

    • Create an AWS account
    • Enable Bedrock service in us-east-1
    • Request access to Claude 3.5 Sonnet model
    • Create IAM credentials with Bedrock access
  2. Configure Extension Edit background.js or background-advanced.js:

    const AWS_CONFIG = {
      region: 'us-east-1',
      accessKeyId: 'YOUR_ACCESS_KEY',
      secretAccessKey: 'YOUR_SECRET_KEY'
    };
  3. Reload Extension

    • Go to chrome://extensions/
    • Find TrueGuardian
    • Click the reload icon

πŸ“Š Usage

Basic Usage

  1. Open Dashboard

    • Click the TrueGuardian icon in your toolbar
    • View real-time threat statistics
  2. Monitor Threats

    • Browse the web normally
    • TrueGuardian analyzes all requests
    • Receive notifications for detected threats
  3. Export Data

    • Click "Threats" tab
    • Apply filters (severity, type, search)
    • Click "Export CSV" or "Export JSON"

Advanced Features

Grouping Threats:

  • Group by Domain: See which sites have most threats
  • Group by Tab: Track threats per browser tab
  • Group by Type: Categorize by resource type
  • Group by Severity: Prioritize critical threats

Filtering:

  • Filter by severity (Critical, High, Medium, Low)
  • Filter by resource type (API, JavaScript, Image, etc.)
  • Search by domain or threat type

Real-Time Charts:

  • Domain threat distribution
  • Resource type breakdown
  • Timeline of threats (last 24 hours)
  • Severity distribution

🎯 Key Technologies

Component Technology Version
Extension Chrome Manifest V3 3.0.0
AI Model AWS Bedrock Claude 3.5 Sonnet Latest
Charts Chart.js 4.4.0
Frontend React 18
Styling Tailwind CSS Latest
Animations GSAP 3.12.5
Storage Chrome Storage API -
Requests Chrome WebRequest API -

πŸ› οΈ Development

Prerequisites

  • Node.js 16+ (for website development)
  • Chrome/Chromium browser
  • Git

Local Development

Extension Development:

  1. Make changes to extension files
  2. Reload extension from chrome://extensions/
  3. Test in browser

Website Development:

cd my-react-app
npm install
npm run dev

Testing

Manual Testing:

  1. Load extension in developer mode
  2. Visit test websites with known vulnerabilities
  3. Verify threat detection and alerts
  4. Check export functionality

Export Testing:

  • Test CSV export with filters
  • Test JSON export with grouping
  • Verify all context fields are present

πŸ“¦ Deployment

Extension Deployment

Chrome Web Store:

  1. Zip the extension folder
  2. Go to Chrome Developer Dashboard
  3. Upload the zip file
  4. Fill in store listing details
  5. Submit for review

Self-Hosted:

  1. Package: extension.zip (already created)
  2. Share the zip file
  3. Users load as unpacked extension

Website Deployment

GitHub Pages:

# Push to gh-pages branch
git subtree push --prefix my-react-app origin gh-pages

Netlify/Vercel:

  1. Connect GitHub repository
  2. Set build directory: my-react-app
  3. Deploy

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow existing code style
  • Test thoroughly before submitting
  • Update documentation for new features
  • Do not commit sensitive credentials

πŸ‘₯ Team

  • Aditya - Team Lead Developer
  • Nilam - Backend Engineer
  • Indhu - Plugin Specialist
  • Eric Zhang - Cloud Specialist

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ”— Links


πŸ“ž Contact & Support


πŸ™ Acknowledgments

  • AWS Bedrock - AI-powered threat analysis
  • Chart.js - Interactive visualizations
  • Unsplash - Background images
  • Chrome Extension APIs - Request monitoring capabilities
  • React & Tailwind CSS - Website framework

⚠️ Disclaimer

TrueGuardian is provided "as is" without warranty of any kind. While we strive for accurate threat detection, no security tool is 100% effective. Use in combination with other security measures for best protection.

Important:

  • Review Privacy Policy before use
  • Secure your AWS credentials
  • Do not use for malicious purposes
  • Comply with all applicable laws

πŸ“ˆ Roadmap

Upcoming Features

  • Machine learning model training from threat data
  • Browser sync for cross-device protection
  • Mobile app for threat monitoring
  • Advanced reporting with PDF export
  • Integration with more SIEM platforms
  • Custom threat rules engine
  • Multi-language support

In Progress

  • Advanced threat monitoring with network tagging
  • Interactive dashboard with Chart.js
  • CSV/JSON export with full context
  • AWS Bedrock integration
  • Real-time notifications

🌟 Star History

If you find TrueGuardian useful, please ⭐ star this repository!


Made with ❀️ by the TrueGuardian Team

Protecting your digital life, one threat at a time.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •