Skip to content

The AI-Powered Secure Coding Practices Analyzer is a tool designed to help developers identify and resolve common vulnerabilities in their source code. By leveraging language-specific detection rules, the tool scans code for high-priority security issues such as SQL Injection, Cross-Site Scripting (XSS), Command Injection, and Insecure API Usage.

Notifications You must be signed in to change notification settings

GauravGhandat-23/AI-Powered-Secure-Coding-Practices-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ 🔍 AI-Powered Secure Coding Practices Analyzer 🔍 🛡️

image

Overview 📜

AI-Powered Secure Coding Practices Analyzer

This tool analyzes your source code in real-time for common vulnerabilities and enforces secure coding practices. It provides security analysis for popular programming languages such as Python, JavaScript, and C/C++. It identifies common vulnerabilities like SQL Injection, XSS, Command Injection, and Insecure API Usage, offering recommendations and remediation steps to ensure secure code.Powered by Groq AI, this tool enhances secure coding practices by detecting vulnerabilities and offering AI-generated security insights.

Features ⚡

  • Language-Specific Detection Rules 🗣️
  • Real-Time Vulnerability Detection ⏱️
  • Severity Ratings ⚠️
  • Remediation Suggestions 🔧
  • AI-Powered Security Insights 🤖

Supported Languages 🌐

  • Python 🐍
  • JavaScript 🌍
  • C/C++ 💻

🤖 AI-Powered Insights

  • The application utilizes Groq AI to provide additional insights into code security. The AI reviews the code and suggests improvements, ensuring best security practices are followed.

🔧 Technologies Used

Python Streamlit AI Regex

Installation 🚀

  1. Clone the Repository :

    git clone https://github.com/yourusername/AI-Powered-Secure-Coding-Practices-Analyzer.git
    cd AI-Powered-Secure-Coding-Practices-Analyzer
    
  2. Set Up a Virtual Environment : 🔧 Create and activate a virtual environment

    python -m venv venv
    source venv/bin/activate  # On macOS/Linux
    venv\Scripts\activate    # On Windows
    
  3. Replace Groq api key in the client = Groq(api_key="Groq api key") line with your actual Groq API key. You can get your API key by signing up on Groq's platform.

    API_KEY = "your_api_key_here"
    client = Groq(api_key=API_KEY)
    
  4. Install Dependencies : 📦 Install the required libraries

    pip install -r requirements.txt
    
  5. Run the Application : 🚀 Once the dependencies are installed, run the Streamlit app

    streamlit run app.py
    

The app will start running on http://localhost:8501/.

📊 Usage 🧑‍💻

  1. Select a Programming Language 🌟

    • Choose between Python, JavaScript, or C/C++ from the dropdown menu on the sidebar.
  2. Paste or Write Your Code ✍️

    • Paste your source code in the provided code editor, or write your own code snippet.
  3. Analyze the Code 🔍

    • The tool will automatically analyze the code and display any detected vulnerabilities along with:
  • Type of vulnerability
    • Severity (Low, Medium, High)
    • Examples of the detected issue
    • Suggested Remediation
  1. Get AI-powered insights to improve security practices.

🛡️ Security Vulnerabilities Detected

🔴 Python

  • SQL Injection
  • Insecure API Calls
  • Command Injection

python test_page-0001

python test 1_page-0001

🟠 JavaScript

  • Cross-Site Scripting (XSS)
  • Insecure API Calls
  • Eval Injection

javascript test_page-0001

javascript test 1_page-0001

🔵 C/C++

  • Command Injection
  • Buffer Overflow

C C++ test_page-0001

C C++ test 1_page-0001

Contributing 🤝

  • Feel free to fork this repository, create an issue, or submit a pull request. All contributions are welcome!

Credits 🙏

  • Streamlit - for building real-time web apps with ease.
  • Regular Expressions (Regex) - for vulnerability pattern matching.
  • Python, JavaScript, C/C++ - supported programming languages for analysis.

Connect with Me 🌐

About

The AI-Powered Secure Coding Practices Analyzer is a tool designed to help developers identify and resolve common vulnerabilities in their source code. By leveraging language-specific detection rules, the tool scans code for high-priority security issues such as SQL Injection, Cross-Site Scripting (XSS), Command Injection, and Insecure API Usage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages