A conversational cybersecurity assistant built with Gradio and the Groq AI API that helps identify and mitigate common security vulnerabilities in websites, applications, or code. This chatbot provides practical guidance on issues like SQL Injection, Cross-Site Scripting (XSS), open ports, and more β making it a useful tool for developers and security enthusiasts.
- π Vulnerability Detection β Identify potential issues like SQLi, XSS, and insecure configurations.
- π‘ Actionable Security Advice β Get clear, step-by-step recommendations for fixing vulnerabilities.
- π§ AI-Powered Assistance β Uses the Groq LLM (e.g.,
llama3-8b-8192) to generate detailed, context-aware security insights. - π¨ Clean Gradio UI β Simple and interactive chat interface for a seamless experience.
- π Developer-Friendly β Easily customizable for new models, features, or vulnerability types.
| Component | Description |
|---|---|
| Python | Core language for the chatbot logic |
| Gradio | User interface for chat interaction |
| Groq API | Provides access to the LLM for generating responses |
| Requests | Handles communication with the API |
git clone https://github.com/HridikDev/Vulnerability_Scanner-Chat-Bot.git
cd Vulnerability_Scanner-Chat-Bot2. Create a Virtual Environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate3. Install Dependencies
pip install gradio requests4. Set Your Groq API Key
You need a Groq API key to access the model. Set it as an environment variable:
Linux/Mac:
export GROQ_API_KEY="your_api_key_here"Windows (PowerShell):
setx GROQ_API_KEY "your_api_key_here"python app.pyOnce it starts, Gradio will give you a local and shareable link:
Running on local URL: http://127.0.0.1:7860/Open it in your browser to start chatting with the AI Vulnerability Scanner Bot π§βπ»
π¬ Example Prompts
Try asking:
βHow can I secure my login form?β
βWhat is SQL injection and how do I prevent it?β
βHow do I fix an XSS vulnerability?β
βCan you scan my website for vulnerabilities?β
βWhat are the most common web application vulnerabilities?β
π§ How It Works
The chatbot sends user queries and chat history to the Groq API.
The AI model processes the input and returns detailed, actionable security advice.
The conversation context is maintained across messages for a smooth, intelligent dialogue.
The Gradio UI handles all user interactions.
This project is licensed under the MIT License β see the LICENSE file for details.
Hridik Dev β Cybersecurity Enthusiast & Developer
πΌ GitHub: @HridikDev
π LinkedIn: Hridik Dev