Skip to content

About

10/10-11/2025

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🔒 TuringVault - CipherHacks '25 Best Design

Identify Security Risks in AI-Assisted GitHub Repositories.

Why?

A recent paper from Stanford University, by Neil Perry et al., found that AI-assisted coding is causing a dramatic increase in the quantity and severity of security risks in code. Many of these software engineers who "vibecode" don't fully understand the possible security implications of their code, and those who do are often unable to accurately and efficiently evaluate the vulnerabilities in their code. Existing tools, such as GitGuardian and CodeRabbit, are not adapting their analysis techniques to the rapidly changing landscape of AI-generated code, which exposes a higher number of vulnerabilities to users and malicious hackers. Our solution addresses this problem by using a structured evaluation method on dozens of common vulnerabilities to offer engineers specific recommendations.

Features

  • 🔍 Evaluates the likelihood that each file in a GitHub repository could contain a vulnerability.
  • Isolates these files to limit the GPT context, allowing for targeted analysis with lower costs and lag time.
  • 🤖 Secure AI-powered analysis using GPT-5 Reasoning.
  • 🎯 Identifies common vulnerabilities (SQL injection, XSS, hardcoded secrets, etc.)
  • 💻 Modern React frontend with FastAPI backend.
  • 🚀 Targeted recommendations, code snippets, explanations, and the cybersecurity standards the code is violating.

Architecture

  • Frontend: React + Vite + CSS (runs on port 5173)
  • Backend: FastAPI + Python (runs on port 8000)
  • APIs: GitHub API, OpenAI API

🚀 Setup Instructions

Get started with TuringVault in 3 simple steps.

Prerequisites

  • Python 3.8+
  • Node.js 18+
  • GitHub Personal Access Token
  • OpenAI API Key

1. Token Setup

GitHub Token
  1. Visit GitHub Settings → Tokens
  2. Click "Generate new token (classic)"
  3. Name: Security Analyzer
  4. Scope: Select public_repo (or repo for private repos)
  5. Click "Generate token" and copy the token
OpenAI API Key
  1. Visit OpenAI API Keys
  2. Create and copy a new API key

Quick Start with Helper Scripts

Terminal 1:

./start-backend.sh

Terminal 2:

./start-frontend.sh

Usage

  1. Open http://localhost:5173 in your browser
  2. Enter a GitHub repository URL (e.g., https://github.com/hudsonmp/turingvault)
  3. Click "Analyze Repository"
  4. Click "Analyze Files with GPT-5" for AI-powered security insights

Troubleshooting

Issue Solution
Failed to analyze repository Verify GitHub token in backend/.env
Error analyzing files Check OpenAI API key and account credits
Port already in use Stop other processes on ports 8000 or 5173

For detailed documentation, see QUICKSTART.md

How It Works

  1. Frontend sends repository URL to FastAPI backend
  2. Backend calls GitHub API to fetch the entire git tree
  3. Filtering happens server-side based on security keywords (auth, api, db, etc.)
  4. Backend fetches content of filtered files from GitHub
  5. GPT-5 Analysis each file is sent to OpenAI for security vulnerability detection
  6. Results are returned to the frontend and displayed in a user-friendly format

Security Keywords

The analyzer looks for files containing these keywords:

  • Authentication: auth, login, password, token, jwt
  • API: api, route, endpoint
  • Database: query, database, db, sql
  • Configuration: .env, secret, config
  • User Input: upload, file, input, validation

Future Enhancements

  • Integration with OpenAI's Agentic SDK (Swarm)
  • Multi-agent analysis (different agents for different vulnerability types)
  • Export reports as PDF
  • Batch analysis of multiple repositories
  • GitHub webhooks for automated scanning
  • Integration with CI/CD pipelines

Technologies Used

  • Backend: FastAPI, httpx, python-dotenv, OpenAI SDK
  • Frontend: React, Vite
  • APIs: GitHub REST API v3, OpenAI Chat Completions API

License

MIT

About

10/10-11/2025

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages