Skip to content

vedant44-cyber/turbo-broccoli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฅฆ Turbo Broccoli

Hybrid SAST + DAST Security Scanner for Modern Web Applications

"If I were an attacker, how would I break this app?"
Turbo Broccoli tells you the answer before you ship.


Turbo Broccoli


Overview

Turbo Broccoli is a pre-deployment security guardrail designed for developers, students, and early-stage startups who need to catch critical vulnerabilities before they go live. It combines Static Application Security Testing (SAST) with Dynamic Application Security Testing (DAST) to provide comprehensive security coverage.

The Problem

Teams often ship fast and break rules. Common mistakes include:

  • Committing .env files or API keys to version control
  • Misconfiguring JWTs (using none algorithm or weak secrets)
  • Leaving CORS wide open (*)
  • Exposing admin routes without proper protection
  • Missing .gitignore coverage for sensitive files

Turbo Broccoli acts as a last-mile security checkpoint that catches these issues, explains how to exploit them, and offers AI-powered fix suggestions.


Features

Static Analysis (SAST)

Feature Description
Regex-based Rules Pattern matching for secrets, misconfigurations, and vulnerabilities
AST-based Analysis Deep code understanding using TypeScript-ESTree parser
Multi-pattern Detection AWS keys, JWT tokens, API secrets, hardcoded credentials

Dynamic Analysis (DAST)

Feature Description
Live Endpoint Testing Verifies vulnerabilities against running applications
Security Headers Check Validates presence of critical HTTP security headers
Git Exposure Detection Checks for exposed .git directories
Admin Route Verification Tests for unprotected administrative endpoints

Additional Features

  • AI-Powered Fix Suggestions โ€” Get intelligent remediation code using Google Gemini
  • Security Score Dashboard โ€” Visual representation of your security posture
  • Severity Classification โ€” Issues ranked as CRITICAL, HIGH, MEDIUM, or LOW
  • Cyberpunk UI โ€” Premium developer-friendly interface with modern aesthetics

Architecture

turbo-broccoli/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/                   
โ”‚   โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ fix/            
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ scan-dynamic/  
โ”‚   โ”‚   โ”œโ”€โ”€ components/        
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx           
โ”‚   โ”œโ”€โ”€ scanner/
โ”‚   โ”‚   โ”œโ”€โ”€ Scanner.ts         
โ”‚   โ”‚   โ””โ”€โ”€ DynamicScanner.ts  
โ”‚   โ”œโ”€โ”€ rules/
โ”‚   โ”‚   โ”œโ”€โ”€ ast/               
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dangerousEval.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ sqlInjection.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ unsafeObjectAccess.ts
โ”‚   โ”‚   โ”œโ”€โ”€ dynamic/           
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ gitExposure.ts
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ securityHeaders.ts
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ verifyAdminRoute.ts
โ”‚   โ”‚   โ”œโ”€โ”€ exposedSecrets.ts
โ”‚   โ”‚   โ”œโ”€โ”€ jwtMisconfiguration.ts
โ”‚   โ”‚   โ”œโ”€โ”€ brokenCors.ts
โ”‚   โ”‚   โ”œโ”€โ”€ adminRoutes.ts
โ”‚   โ”‚   โ””โ”€โ”€ gitignoreValidation.ts
โ”‚   โ”œโ”€โ”€ ast/                   
โ”‚   โ”œโ”€โ”€ services/              
โ”‚   โ””โ”€โ”€ types.ts               
โ””โ”€โ”€ public/                    

Tech Stack

Category Technologies
Frontend Next.js 16, React 19, TailwindCSS 4, Lucide Icons
Backend Node.js, Next.js API Routes
Analysis TypeScript-ESTree, Acorn AST Parser, Regex
AI Integration Google Generative AI (Gemini)
HTTP Client Axios
Authentication jsonwebtoken (for JWT analysis)

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Google AI API key for fix suggestions

1. Installation

git clone https://github.com/vedant44-cyber/turbo-broccoli.git
cd turbo-broccoli
npm install

2. Configuration

Create a .env file from the example:

cp .env.example .env

Add your Google AI API key

GEMINI_API_KEY=your_api_key_here

3. Run the Dashboard

npm run dev

Open http://localhost:3000 in your browser.


Usage

Static Scan (SAST)

  1. Open Dashboard โ€” Navigate to http://localhost:3000
  2. Upload Files โ€” Drag and drop your project folder or select files
  3. Run Scan โ€” Click the "INITIATE SCAN" button
  4. Review Results โ€” Vulnerabilities are displayed with severity, code snippets, and fix suggestions

Dynamic Scan (DAST)

  1. Enter Target URL โ€” Input your running application's public URL
    • For local apps, use ngrok to expose your app
  2. Run Dynamic Scan โ€” The scanner will test live endpoints
  3. Review Findings โ€” Dynamic vulnerabilities appear alongside static findings

Security Rules

Static Rules (Regex + AST)

Rule ID Name Severity Description
exposed-secrets Exposed Secrets CRITICAL Detects AWS keys, API tokens, database URLs
jwt-misconfiguration JWT Misconfiguration CRITICAL Finds weak signing, none algorithm usage
broken-cors Broken CORS HIGH Identifies overly permissive CORS policies
admin-routes Admin Routes MEDIUM Flags unprotected admin endpoints
gitignore-validation Gitignore Validation HIGH Checks for missing .gitignore entries
dangerous-eval Dangerous Eval CRITICAL AST detection of eval() and Function()
sql-injection SQL Injection CRITICAL AST detection of injectable queries
unsafe-object-access Unsafe Object Access HIGH AST detection of bracket notation with user input

Dynamic Rules

Rule ID Name Description
security-headers Security Headers Checks for missing CSP, X-Frame-Options, etc.
git-exposure Git Exposure Detects exposed .git directories
verify-admin-route Admin Route Verification Tests if admin endpoints are accessible

Scripts

Command Description
npm run dev Start development server
npm run build Build for production
npm run start Start production server
npm run lint Run ESLint

License

This project is open source and available under the MIT License.


Made with ๐Ÿ’š for developers who care about security

Releases

No releases published

Packages

 
 
 

Contributors

โšก