Skip to content

Simon2812/ai-secure-coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

391 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AI Secure Coding Advisor

AI-powered vulnerability detection & automated secure code fixing


πŸ“Œ Overview

The AI Secure Coding Advisor is an intelligent system that:

  • Detects vulnerabilities in source code
  • Explains why code is insecure
  • Suggests secure fixes automatically

It combines:

  • Static analysis
  • Large Language Models (LLMs)
  • Real-world datasets

The system provides context-aware security insights and targets vulnerabilities such as injections, hardcoded secrets, and weak cryptography.


🧠 Problem

Modern development suffers from:

  • Late vulnerability detection
  • Static tools without context
  • High false-positive rates

This makes real threats difficult to identify and fix efficiently.


🎯 Objectives

  • Build a static analyzer + LLM layer
  • Train models on real datasets
  • Provide a CLI tool
  • Develop an IDE plugin

πŸ— Architecture

πŸ”Ή System Architecture (Entity Diagram)

🧩 Components

Data Sources

  • NIST datasets
  • OWASP Benchmark
  • Open-source repositories

Analyzer Layer

  • AST-based static analysis
  • Rule-based detection
  • LLM reasoning

Backend

  • Python REST API

Interfaces

  • CLI tool
  • VS Code extension

πŸ–₯️ Application Screenshots

Settings Screen

Problem Highlight

Learn More

Autofix

AI Chat


πŸ”„ Typical User Flow

πŸ§ͺ Run Analysis

  • Open CLI or IDE plugin
  • Select code/project
  • Start analysis
  • Receive vulnerability report

πŸ›  Apply Fix

  • Select vulnerability
  • View details (type, CWE, severity)
  • Review suggested fix
  • Apply manually or use auto-fix

πŸ‘€ User Stories

  • Developer receives real-time warnings
  • Student understands why code is insecure
  • Junior developer gets auto-fix suggestions
  • Security analyst sees risk scores
  • Team lead manages findings as To-Do or Ignore

βš™οΈ Technologies

  • Backend: Python (Flask)
  • Static Analysis: AST + rule-based analysis
  • AI Layer: LLM integration
  • IDE Plugin: VS Code (TypeScript)
  • Data Sources: NIST, OWASP, GitHub

πŸš€ Future Work

  • Full IDE integration
  • Better LLM fine-tuning
  • Real-time scanning
  • Expanded CWE coverage

πŸ‘¨β€πŸ’» Authors

  • Simon Pakhtusov
  • Denis Rozhansky

Computer Science Students (Bar-Ilan University)


⭐ Why This Project

Unlike traditional tools, this system:

  • βœ… Understands context
  • βœ… Provides real fixes
  • βœ… Reduces false positives
  • βœ… Is designed for AI training and real usage

About

AI-powered secure coding pipeline for vulnerability detection and automated code fix generation. The project combines static analysis, custom security datasets, and fine-tuned LLMs to identify CWEs and suggest minimal secure code fixes across multiple programming languages.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors