Skip to content
Project Graphide

Project Graphide

Securing the era of “Vibe coding”

Created on 8th February 2026

•

Project Graphide

Project Graphide

Securing the era of “Vibe coding”

The problem Project Graphide solves

The Problem It Solves

Modern vulnerability detection is stuck between two extremes: traditional static analysis tools are too rigid, while Large Language Models (LLMs) are too "forgetful" and computationally expensive.

We identified four critical failures in the current landscape:

The "Context Window" Bottleneck: LLMs have limited memory. Feeding an entire 5,000-line file into a model to find a single bug is wasteful, expensive, and often impossible due to token limits.

Superficial Learning (The "Parrot" Problem): Recent studies show that LLMs often memorize "spurious features" (like variable names or comments) rather than understanding the actual logic. If you rename a variable, the model’s detection accuracy can drop by up to 45%.

Tunnel Vision: Most tools analyze functions in isolation. They fail to see "inter-procedural" bugs—vulnerabilities that start in one function (source) and trigger in another (sink).

The "Criterion Point" Trap: Traditional slicing relies on guessing a single "criterion point" (like a specific line number). This often misses the mark or pulls in huge chunks of irrelevant code, creating noise that confuses the AI.

Our Solution: The "Graphide" Ecosystem

To solve this, we built Graphide, a next-generation code editor that integrates our novel "Code Funnel" pipeline directly into the developer's workflow.

Graphide democratizes advanced security analysis. Instead of requiring complex command-line tools, any user can access our surgical extraction process simply by writing code in the editor.

How the Graphide Pipeline Works:

1. The Static Sieve (Rule-Based Filtering)
At the top of the funnel, we don't waste GPU power on obvious noise. Graphide's Static Layer applies rule-based slicing immediately upon file upload, filtering out non-critical files and safe logic before deep analysis begins.

2. Graph-Based Intelligence (Joern + Q-Model)

Instead of treating code as text, Graphide treats it as a graph. We convert the code into a Code Property Graph (CPG) using Joern.

  • We deployed a specialized Q-Model (fine-tuned on Java/Scala queries) that doesn't look for bugs directly. Instead, it generates CPGQL queries to hunt for "Execution Paths"—specific flows of data from user input to sensitive functions.

3. Precision Slicing (Context-Aware Reduction)
Here is our core innovation: We don't slice by line number; we slice by flow.

Path Extraction: We execute the generated queries to isolate the exact "taint flow".

Interacter Identification: We identify "interacters"—variables that aren't in the path but control it (e.g., loop counters).

Backward Slicing: We trace backwards from the vulnerability to keep only the logic that matters.

Result: A Concise Slice that reduces code volume by up to 90%.

4. The AI Judge (Gemini API Integration)
finally, the ultra-concentrated slice exits the funnel. Because the noise is gone, Graphide sends this pure logic flow to the Gemini API. Unburdened by irrelevant context, Gemini acts as a high-precision "Judge," delivering a VULNERABLE or SAFE verdict with superior accuracy and drastically lower token costs.

Challenges we ran into

Challenges I ran into

1. The Dataset & Query Dilemma: "Garbage In, Garbage Out"

We faced a double-edged sword: not only were existing open-source vulnerability datasets (like BigVul) full of noise and bad labels, but training a model to write complex Code Property Graph queries (CPGQL) was nearly impossible with standard data. We needed a model that understood both security logic and graph database syntax.

How we got over it:
We split the problem into two distinct pipelines:

  • For the Dataset (The "Dual-Script" Strategy):
    We refused to rely on scraped GitHub commits. Instead, we wrote two specialized Python scripts to generate our own synthetic training data.
    Code generation script: Systematically generates vulnerable code patterns and benign

Result: This gave us thousands of "perfect pairs," forcing the AI to learn the semantic difference between safe and unsafe code rather than memorizing random variable names.

  • For the Query Model:
    To train the model that actually finds the bugs (the Query Model), we couldn't just feed it static text. We implemented the iterative feedback loop .

  • Instead of blindly training, we set up a pipeline where a base model generated candidate queries.

  • We validated these queries against a live Joern server to check if they were executable and actually found paths.

  • We only included the successful queries in our final training set. This ensured our model learned to write valid, executable analysis scripts, not just hallucinations.

  • And invalid queries were again passed to model for correcting it.

2. The Compute Power Scavenger Hunt

Training Large Language Models (LLMs) is computationally expensive, and as students, we didn't have access to enterprise-grade H100 clusters. We needed to fine-tune models ranging from 7B to 32B parameters, which requires massive VRAM that standard free tiers (like Google Colab's T4 GPUs) simply can't handle.

How we got over it:
We adopted a "roaming" strategy, migrating our training workflow across multiple platforms to scavenge for free compute credits:

  • Platform Hopping: We initially moved from Colab to Kaggle, and then to other cloud providers, often hitting usage limits or "Out of Memory" (OOM) errors immediately.
  • The Lightning AI Solution: We eventually settled on Lightning AI. To bypass the strict free-tier limits (approx. 22-80 hours/month depending on the promo), we utilized a strategy of rotating through alternate accounts to keep our training runs alive.
    Optimization: We used LoRA (Low-Rank Adaptation) and 4-bit quantization to fit our 32B parameter model into the limited VRAM available on these free cloud instances.

Discussion

Builders also viewed

See more projects on Devfolio