Skip to content

exiv703/ShieldEye-NeuralScan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ ShieldEye NeuralScan

AI-Powered Source Code Security Analyzer

Static analysis โ€ข AI-driven insights โ€ข Local-first privacy

License: MIT Python GTK Transformers Docker

Features โ€ข Quick Start โ€ข Screenshots โ€ข Documentation โ€ข Contributing


ShieldEye NeuralScan Dashboard


๐ŸŽฏ What is ShieldEye NeuralScan?

ShieldEye NeuralScan is a comprehensive security code analyzer that combines traditional static analysis with cutting-edge AI technology. It provides:

  • ๐Ÿ” Advanced static analysis with 50+ security patterns for common vulnerabilities
  • ๐Ÿค– AI-powered code review using local transformer models (StarCoder2, Mixtral)
  • ๐Ÿณ Container security scanning via optional Trivy integration
  • ๐Ÿ“Š Real-time threat scoring with risk categorization and compliance mapping
  • ๐Ÿ–ฅ๏ธ Modern GTK4 desktop interface with intuitive navigation and dark theme
  • ๐Ÿ”’ 100% local-first architecture โ€“ all analysis happens on your machine

Whether you're a security researcher, developer, or DevSecOps engineer, ShieldEye NeuralScan delivers actionable insights into your code's security posture.


โœจ Key Features

๐Ÿ” Advanced Scanning

  • Static Analysis Engine: 50+ regex-based patterns detecting SQL injection, command injection, XSS, path traversal, and more
  • AI Code Review: Local transformer models provide contextual security explanations
  • Multi-Level Policies: Quick, Standard, and Deep scan modes with configurable severity thresholds
  • Context-Aware Detection: Adjusts risk scores based on surrounding code patterns and usage context

๐Ÿ“ฆ Security Checks

  • Command execution risks (subprocess, os.system, eval)
  • SQL injection and NoSQL injection patterns
  • Dynamic code execution (exec, compile)
  • Unsafe deserialization (pickle, yaml.unsafe_load)
  • Weak cryptography (MD5, SHA1, DES, ECB mode)
  • Hardcoded secrets, API keys, and credentials
  • Path traversal and directory manipulation
  • Network exfiltration and data leakage patterns

๐Ÿค– AI Integration

  • Local Inference: Hugging Face Transformers with no external API calls
  • Multiple Models: StarCoder2-3B, StarCoder2-7B, Mixtral-8x7B support
  • Memory Optimization: 8-bit quantization for efficient GPU/CPU usage
  • Graceful Fallback: Heuristic explanations when AI is unavailable
  • Timeout Protection: Resource limits prevent runaway inference

๐Ÿ” Compliance & Reporting

  • Standards Mapping: CWE, OWASP Top 10, SANS Top 25
  • Compliance Tags: PCI-DSS, NIST, GDPR, HIPAA annotations
  • Multi-Format Export: JSON, Markdown, and HTML reports
  • Confidence Scoring: Each finding includes confidence and severity metrics
  • Trivy Integration: Optional container and dependency vulnerability scanning

๐Ÿ–ผ๏ธ Screenshots

Dashboard Results
Dashboard Results
Security posture overview and threat activity Detailed findings with severity levels
Scan Configuration Settings
Scan Settings
File selection and scan detail level options AI model and scanner configuration

๐Ÿ—๏ธ Architecture

ShieldEye NeuralScan uses a modular desktop architecture for performance and maintainability:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     GTK4 Desktop Interface                    โ”‚
โ”‚                    (Python 3 + PyGObject)                     โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚Dashboard โ”‚   Scan   โ”‚ Results  โ”‚ Settings โ”‚  About   โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Security Scanner Engine                    โ”‚
โ”‚              (Static Analysis + AI Integration)               โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”‚
โ”‚   โ”‚   Heuristic  โ”‚  AI Analyzer โ”‚  Trivy Integration   โ”‚     โ”‚
โ”‚   โ”‚   Patterns   โ”‚ (Transformers)โ”‚   (Docker/Optional)  โ”‚     โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                              โ–ผ
                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                  โ”‚   Local File System   โ”‚
                  โ”‚  data/scan_history    โ”‚
                  โ”‚  data/config.json     โ”‚
                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Tech Stack

Component Technology Purpose
GUI GTK 4.0, PyGObject Native desktop interface
AI Engine Hugging Face Transformers Code analysis and explanations
Static Analysis Python regex, AST parsing Pattern-based vulnerability detection
Container Scanning Trivy (optional) Dependency and image vulnerability scanning
Data Visualization Matplotlib Threat activity charts
Storage JSON files Scan history and configuration

๐Ÿš€ Quick Start

Prerequisites

Requirement Version Notes
Python 3.10+ With pip and venv
GTK 4.0+ Desktop environment required
Git Latest For cloning repository
Docker Latest Optional, for Trivy integration

1. Clone and Configure

git clone https://github.com/exiv703/ShieldEye-NeuralScan.git
cd ShieldEye-NeuralScan

# Create environment file (optional)
cp .env.example .env

# Edit .env to customize AI model, window size, etc.

2. Install Dependencies

# Make run script executable
chmod +x run.sh

# Install all dependencies (creates venv, installs packages)
./run.sh --mode install

3. Launch the Application

# Interactive launcher with menu
./run.sh

# Or run directly
./run.sh run

4. (Optional) Enable AI Features

AI models download automatically on first scan. For GPU acceleration:

# Check CUDA availability
python -c "import torch; print(torch.cuda.is_available())"

# If True, AI will use GPU automatically
# If False, CPU inference will be used (slower but functional)

5. (Optional) Enable Trivy Container Scanning

# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Start Docker service
sudo systemctl start docker
sudo systemctl enable docker

# Enable Trivy in Settings or .env
USE_TRIVY=true

๐ŸŽฎ Using run.sh

The run.sh script provides an interactive menu for common tasks:

./run.sh

Available options:

  • Run โ€“ Launch the application
  • Install โ€“ Set up virtual environment and dependencies
  • Update โ€“ Pull latest changes and update dependencies
  • Clean โ€“ Remove virtual environment and cached files
  • Test โ€“ Run test suite
  • Help โ€“ Display usage information

โš™๏ธ Configuration

Environment Variables

Copy .env.example to .env and customize:

# Application Settings
APP_NAME=ShieldEye NeuralScan
APP_VERSION=1.0.0
APP_ENV=development

# AI Model Configuration
AI_MODEL=bigcode/starcoder2-3b
# Alternatives: bigcode/starcoder2-7b, mistralai/Mixtral-8x7B-Instruct-v0.1

# Scanner Settings
USE_TRIVY=false
SAVE_HISTORY=true
DEFAULT_DETAIL_LEVEL=standard

# UI Settings
WINDOW_WIDTH=1400
WINDOW_HEIGHT=900
THEME=dark

Full Requirements

See requirements.txt for Python dependencies and requirements-dev.txt for development tools.


๐Ÿ“– Documentation

  • User Guide: Comprehensive usage instructions and best practices
  • API Reference: Docstrings in backend/scanner.py for programmatic usage
  • Security Patterns: Full list of detection rules in scanner source code
  • Test Files: Example vulnerable code in tests/ directory

๐Ÿ› ๏ธ Development

Local Setup (without Docker)

# Clone repository
git clone https://github.com/exiv703/ShieldEye-NeuralScan.git
cd ShieldEye-NeuralScan

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt

# Run application
python gui/main.py

Development Tools

# Format code
black backend/ gui/ utils/
isort backend/ gui/ utils/

# Lint code
pylint backend/scanner.py gui/ utils/

# Run tests
python -m pytest tests/

Project Structure

ShieldEye-NeuralScan/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ scanner.py          # Core security scanner engine
โ”œโ”€โ”€ gui/
โ”‚   โ”œโ”€โ”€ views/
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard.py    # Overview and metrics
โ”‚   โ”‚   โ”œโ”€โ”€ scan.py         # File selection and scanning
โ”‚   โ”‚   โ”œโ”€โ”€ results.py      # Findings display
โ”‚   โ”‚   โ””โ”€โ”€ settings.py     # Configuration panel
โ”‚   โ”œโ”€โ”€ main.py             # Application entry point
โ”‚   โ”œโ”€โ”€ window.py           # Main window and navigation
โ”‚   โ””โ”€โ”€ style.css           # GTK CSS theming
โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ file_handler.py     # Scan history persistence
โ”œโ”€โ”€ tests/                  # Vulnerable test files
โ”œโ”€โ”€ data/                   # Scan history and config
โ”œโ”€โ”€ assets/                 # Screenshots and branding
โ”œโ”€โ”€ .env.example            # Environment template
โ”œโ”€โ”€ config.default.json     # Default configuration
โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ””โ”€โ”€ run.sh                  # Interactive launcher

Design Principles:

  • Clean separation of GUI and business logic
  • Modular view system with independent components
  • Comprehensive error handling and logging
  • Production-ready configuration management
  • Privacy-first architecture with local-only processing

๐Ÿค Contributing

Contributions are welcome! Here's how to get started:

  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

Guidelines:

  • Follow PEP 8 style guidelines
  • Add tests for new security patterns
  • Update documentation for new features
  • Ensure all tests pass before submitting

๐Ÿ“ License

This project is licensed under the MIT License โ€“ see the LICENSE file for details.


๐Ÿ™ Acknowledgments


โญ If you find ShieldEye NeuralScan useful, please consider giving it a star! โญ

Star on GitHub


Built with โค๏ธ for the security community

ShieldEye NeuralScan โ€“ Securing code with AI, one scan at a time ๐Ÿ›ก๏ธ

About

๐Ÿ›ก๏ธ Lightweight desktop code scanner โ€” heuristics + local AI (StarCoder2โ€‘3B), optional Trivy. Localโ€‘first, MIT.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors