Skip to content

Nuvai is where AI meets precision. A refined scanner built to secure the future of AI-generated code.

License

Notifications You must be signed in to change notification settings

tinkerlev/Nuvai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

README.md

πŸ” Welcome to Nuvai – AI-Powered Secure Code Scanner

CI Status

Where AI meets precision, with the rigor of real-world penetration testing.

Nuvai is an advanced static code analysis engine designed for both technical and non-technical users. It scans source code in multiple programming languages to detect vulnerabilities β€” especially in AI-generated, No-Code, and Low-Code environments.


🧠 What is Nuvai?

Nuvai automatically detects security flaws in your code using intelligent pattern recognition, code heuristics, and content-based detection.

It’s built with:

  • πŸ” Deep code inspection logic
  • πŸ”’ ISO/IEC 27001-aligned architecture
  • 🧠 AI awareness and resilience against generated code patterns
  • πŸ“„ Professional-grade reporting

πŸš€ Features

  • βœ… Multi-language scanning: Python, JavaScript, HTML, JSX, TypeScript, PHP, C++
  • ⚠️ Detects vulnerabilities: Code injection, XSS, SSRF, insecure deserialization, hardcoded secrets, weak crypto, and more
  • πŸ“ Flexible reports: JSON, TXT, HTML, and PDF
  • 🧠 AI-Aware: Scans AI-generated or low-code scripts for critical flaws
  • πŸ’¬ Guided remediation tips for every issue
  • 🌐 User-friendly Web UI built in React
  • πŸ–₯️ Works via CLI, GUI, or API

βœ… Continuous Integration (CI)

Every change is automatically tested with GitHub Actions:

  • πŸ§ͺ Backend tests with pytest
  • βš›οΈ Frontend tests with vitest and React Testing Library

You can view test results directly on each pull request.

πŸ—‚οΈ Folder Structure

Nuvai/
β”œβ”€β”€ assets/                        # Static images and branding assets
β”œβ”€β”€ backend/                       # Flask backend for the API
β”‚   β”œβ”€β”€ utils.py                   # Low-level helpers (e.g. extractors)
β”‚   β”œβ”€β”€ update_init.py             # Auto-generation for missing __init__.py files
β”‚   β”œβ”€β”€ scanner_controller.py      # Scan orchestration logic
β”‚   └── tests/                     # Backend tests
β”‚       β”œβ”€β”€ test_scan.py           # Valid file scan test
β”‚       └── test_scan_empty_file.py # Empty, unsupported, insecure file tests
β”œβ”€β”€ config/                        # (Planned) Centralized configuration
β”œβ”€β”€ examples/                      # Sample vulnerable code snippets
β”œβ”€β”€ frontend/                      # React-based frontend
β”‚   β”œβ”€β”€ src/                       # Source code directory
β”‚   β”‚   β”œβ”€β”€ App.jsx                # Main App component
β”‚   β”‚   β”œβ”€β”€ index.css              # Global styles
β”‚   β”‚   β”œβ”€β”€ main.jsx               # Entry point for React DOM rendering
β”‚   β”‚   β”œβ”€β”€ api/                   # API client logic
β”‚   β”‚   β”‚   β”œβ”€β”€ client.js          # Axios instance with defaults
β”‚   β”‚   β”‚   └── scan.js            # Scan API call definition
β”‚   β”‚   β”œβ”€β”€ components/            # Reusable React components
β”‚   β”‚   β”‚   └── FileUpload.jsx     # File upload handler UI
β”‚   β”‚   └── pages/                 # React page-level components
β”‚   β”‚       β”œβ”€β”€ Home.jsx           # Home page view
β”‚   β”‚       └── ScanResult.jsx     # Scan results renderer
β”‚   └── __tests__/                 # Frontend test suite (Vitest)
β”‚       └── App.test.jsx           # UI-level test for App component
β”œβ”€β”€ src/                           # Core scanner engine
β”‚   └── nuvai/                     # Language-specific scanners and utils
β”‚       β”œβ”€β”€ scanner.py             # Main scan dispatcher
β”‚       β”œβ”€β”€ scanner_controller.py  # Scan flow orchestrator
β”‚       β”œβ”€β”€ cpp_scanner.py         # C++ analysis rules
β”‚       β”œβ”€β”€ html_scanner.py        # HTML analysis rules
β”‚       β”œβ”€β”€ javascript_scanner.py  # JS analysis rules
β”‚       β”œβ”€β”€ jsx_scanner.py         # JSX rules
β”‚       β”œβ”€β”€ php_scanner.py         # PHP rules
β”‚       β”œβ”€β”€ python_scanner.py      # Python security checks
β”‚       β”œβ”€β”€ typescript_scanner.py  # TypeScript rules
β”‚       β”œβ”€β”€ utils.py               # Regex, entropy check, etc.
β”‚       β”œβ”€β”€ report_saver.py        # Formats output as PDF/HTML/TXT
β”‚       β”œβ”€β”€ config.py              # Severity and rule settings
β”‚       └── logger.py              # Audit trail and log manager
β”œβ”€β”€ run.py                         # CLI interface
β”œβ”€β”€ server.py                      # Entry point for Flask API
β”œβ”€β”€ install.sh                     # Installer script (cross-platform)
β”œβ”€β”€ requirements.txt               # Python dependencies
β”œβ”€β”€ docker-compose.yml             # Docker orchestration
β”œβ”€β”€ Dockerfile                     # Backend Docker config
β”œβ”€β”€ README.md
β”œβ”€β”€ SECURITY.md                    # Security best practices
β”œβ”€β”€ CONTRIBUTING.md                # Contribution guide
└── .gitignore                     # Git exclusions

πŸ› οΈ Getting Started

Linux / WSL / Kali (recommended):

chmod +x install.sh
./install.sh

Windows:

  1. Install WSL or use Git Bash
  2. Run:
python3 -m venv .venv
source .venv/bin/activate
pip install flask flask-cors

macOS:

brew install python3
python3 -m venv .venv
source .venv/bin/activate
pip install flask flask-cors

Web UI Setup

cd frontend
npm install && npm run dev

πŸ§ͺ How to Run a Scan

CLI Mode:

python3 run.py examples/vulnerable_app.py

Scan a full folder:

python3 run.py /path/to/codebase

Web Mode:

source .venv/bin/activate
cd backend && python3 server.py

Then visit: http://localhost:5173


πŸ“„ Report Formats

  • .json β€” for APIs and automation
  • .html β€” for browsers and documentation
  • .pdf β€” for audits and clients
  • .txt β€” for logs and fast review

Reports saved to: ~/security_reports/


πŸ”’ Built with Security in Mind (ISO/IEC 27001)

  • βœ” Input validation + output encoding
  • βœ” Temporary files are deleted after scan
  • βœ” No user secrets or logs exposed
  • βœ” Modular logging for audit readiness
  • βœ” Supports offline and privacy-respecting usage

πŸ“ Roadmap

  • Static engine with 7+ language scanners
  • Advanced PDF/HTML/JSON export
  • React frontend
  • OAuth2 Login support (frontend/backend)
  • Docker build + CI pipeline
  • Plugin SDK for adding new rules
  • Support SARIF/OWASP ZAP exports

🀝 Contribute

See CONTRIBUTING.md for full instructions. You can:

  • Write rules and scanners
  • Improve documentation or UI
  • Report bugs and ideas

πŸ‘¨β€πŸ’» Created by

Eliran Loai Deeb
GitHub: @tinkerlev
LinkedIn: linkedin.com/in/loai-deeb

Want to support or collaborate? See SPONSORSHIP.md


Built with ❀️ for builders, red teamers, and ethical coders.

Stay secure. Stay smart. πŸ›‘οΈ

About

Nuvai is where AI meets precision. A refined scanner built to secure the future of AI-generated code.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published