๐ก๏ธ Autonomous Security Agent that finds AND fixes vulnerabilities in your code.
Project description
๐ก๏ธ Project Sentinel
The Autonomous Security Engineer for Your Codebase
Sentinel is an AI-powered security agent that doesn't just find vulnerabilities in your code โ it fixes them automatically.
Powered by Llama 3 (via Groq/Ollama) and Neuro-Symbolic verification (Bandit/Semgrep).
๐ Quick Start
Install
pip install sentinel-sec
Setup (Choose One)
Option A: Ollama (FREE, OFFLINE) โญ Recommended
Run AI completely on your machine โ no API keys, no internet needed.
- Install Ollama: ollama.ai/download
- Pull the model:
ollama pull llama3
- Start Ollama (keep running in background):
ollama serve - Run Sentinel โ it auto-detects Ollama!
Option B: Groq (FAST, ONLINE)
Use Groq's cloud for blazing-fast inference.
- Get free API key: console.groq.com/keys
- Set it (key starts with
gsk_):# Windows $env:GROQ_API_KEY="gsk_your_key_here"
# Linux/Mac export GROQ_API_KEY="gsk_your_key_here"
โก Multi-Language Support (v0.2.1)
Sentinel now supports auto-fixing vulnerabilities in:
| Language | Supported Files | Verification Tool |
|---|---|---|
| Python | .py |
Bandit (SAST) |
| JavaScript | .js |
Semgrep |
| TypeScript | .ts |
Semgrep |
| Java | .java |
Semgrep |
| C++ | .cpp, .c |
Semgrep |
| Go | .go |
Semgrep |
| SQL | .sql |
Semgrep |
Usage is identical:
sentinel fix src/main.cpp
sentinel apply services/auth.js
๐ How It Works
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ PLANNER โโโโโโถโ CODER โโโโโโถโ TEST โโโโโโถโ REFLECTOR โ
โ Analyze โ โ Generate โ โ Verify โ โ Critique โ
โ the CVE โ โ the patch โ โ the fix โ โ if failed โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ-โ
(Loop until fixed)
- Planner: Analyzes code & vulnerability. Uses RAG to find fix patterns.
- Coder: Writes the patch in the target language (Python, C++, JS, etc.).
- Verifier: Runs SAST (Bandit or Semgrep) to verify safety.
- Reflector: If SAST fails, providing feedback for self-correction.
๐ป Usage Examples
Python (SQL Injection)
sentinel apply auth.py
JavaScript (XSS)
sentinel apply frontend/input.js
C++ (Buffer Overflow)
sentinel fix src/buffer_test.cpp
๐ ๏ธ CLI Commands
| Command | Description |
|---|---|
sentinel setup |
Interactive setup guide |
sentinel fix <file> |
Analyze and show fix (preview only) |
sentinel apply <file> |
Analyze, fix, and write to the file |
sentinel ui |
Launch the web dashboard |
sentinel version |
Show version info |
๐ฆ Installation Options
From PyPI (Recommended)
pip install sentinel-sec
From GitHub (Development)
git clone https://github.com/VaibhavBhagat665/sentinel-sec.git
cd sentinel-sec
pip install -e .
๐ค Contributing
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
MIT License. See LICENSE for details.
Made with โค๏ธ by the Project Sentinel Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sentinel_sec-0.2.1.tar.gz.
File metadata
- Download URL: sentinel_sec-0.2.1.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89175cd2ea2f471d3b1b633971aa843e0400d12cc6a371936f372e290f6e7974
|
|
| MD5 |
9bb53500eb776f9961b38c658ab9e9f3
|
|
| BLAKE2b-256 |
6834d7722594f256d28ed76a134518bd1eaaec13e5969fd343348cc3d214cb17
|
File details
Details for the file sentinel_sec-0.2.1-py3-none-any.whl.
File metadata
- Download URL: sentinel_sec-0.2.1-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0107e43b9984ce2914c39cebebaf0f761f446c0c256310e7619c2d7df2ba2c6c
|
|
| MD5 |
a3bf5b7afa82670bdeeedad1333517d0
|
|
| BLAKE2b-256 |
cde773661f3fd067649ebf60f7dcd4e539b0b1db97c867363f11196905bdb863
|