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.
- Language-Specific Detection Rules 🗣️
- Real-Time Vulnerability Detection ⏱️
- Severity Ratings
⚠️ - Remediation Suggestions 🔧
- AI-Powered Security Insights 🤖
- Python 🐍
- JavaScript 🌍
- C/C++ 💻
- 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.
-
Clone the Repository :
git clone https://github.com/yourusername/AI-Powered-Secure-Coding-Practices-Analyzer.git cd AI-Powered-Secure-Coding-Practices-Analyzer
-
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
-
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)
-
Install Dependencies : 📦 Install the required libraries
pip install -r requirements.txt
-
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/.
-
Select a Programming Language 🌟
- Choose between Python, JavaScript, or C/C++ from the dropdown menu on the sidebar.
-
Paste or Write Your Code ✍️
- Paste your source code in the provided code editor, or write your own code snippet.
-
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
- Get AI-powered insights to improve security practices.
- SQL Injection
- Insecure API Calls
- Command Injection
- Cross-Site Scripting (XSS)
- Insecure API Calls
- Eval Injection
- Command Injection
- Buffer Overflow
- Feel free to fork this repository, create an issue, or submit a pull request. All contributions are welcome!
- 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.