Skip to main content

๐Ÿ›ก๏ธ Autonomous Security Agent that finds AND fixes vulnerabilities in your code.

Project description

๐Ÿ›ก๏ธ Project Sentinel

The Autonomous Security Engineer for Your Codebase

PyPI version Python 3.12+ License: MIT

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.

  1. Install Ollama: ollama.ai/download
  2. Pull the model:
    ollama pull llama3
    
  3. Start Ollama (keep running in background):
    ollama serve
    
  4. Run Sentinel โ€” it auto-detects Ollama!

Option B: Groq (FAST, ONLINE)

Use Groq's cloud for blazing-fast inference.

  1. Get free API key: console.groq.com/keys
  2. 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)
  1. Planner: Analyzes code & vulnerability. Uses RAG to find fix patterns.
  2. Coder: Writes the patch in the target language (Python, C++, JS, etc.).
  3. Verifier: Runs SAST (Bandit or Semgrep) to verify safety.
  4. 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

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

MIT License. See LICENSE for details.


Made with โค๏ธ by the Project Sentinel Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sentinel_sec-0.2.1.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sentinel_sec-0.2.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

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

Hashes for sentinel_sec-0.2.1.tar.gz
Algorithm Hash digest
SHA256 89175cd2ea2f471d3b1b633971aa843e0400d12cc6a371936f372e290f6e7974
MD5 9bb53500eb776f9961b38c658ab9e9f3
BLAKE2b-256 6834d7722594f256d28ed76a134518bd1eaaec13e5969fd343348cc3d214cb17

See more details on using hashes here.

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

Hashes for sentinel_sec-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0107e43b9984ce2914c39cebebaf0f761f446c0c256310e7619c2d7df2ba2c6c
MD5 a3bf5b7afa82670bdeeedad1333517d0
BLAKE2b-256 cde773661f3fd067649ebf60f7dcd4e539b0b1db97c867363f11196905bdb863

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page