This guide walks you through installing SentinelAI, running your first security scan, and understanding the results.
- Python 3.11 or later
- pip or uv package manager
- Git (for source installation)
pip install sentinelaigit clone https://github.com/threatvec/SentinelAI.git
cd SentinelAI
pip install -e ".[dev]"# LLM Firewall support
pip install sentinelai[firewall]
# Agent monitoring support
pip install sentinelai[monitor]
# All features
pip install sentinelai[all]Run a scan against a target directory:
sentinelai scan ./my-projectWith specific options:
sentinelai scan ./my-project \
--severity high \
--scanners code,secrets \
--format json \
--output report.jsonfrom sentinelai import SentinelEngine
engine = SentinelEngine()
results = engine.scan("./my-project")
print(f"Found {results.total_findings} issues")
for finding in results.findings:
print(f" [{finding.severity.value}] {finding.rule_id}: {finding.message}")Each finding contains the following information:
| Field | Description |
|---|---|
rule_id |
Unique identifier (e.g., SAI-SQL-001) |
severity |
critical, high, medium, low, or info |
file_path |
Path to the affected file |
line_number |
Line where the issue was found |
message |
Human-readable description of the vulnerability |
category |
Vulnerability category (e.g., sql_injection) |
confidence |
Detection confidence: high, medium, or low |
cwe_id |
Associated CWE identifier, if applicable |
- Critical -- Exploitable vulnerabilities that pose an immediate risk (e.g., hardcoded production credentials, RCE vectors).
- High -- Serious vulnerabilities that should be fixed before deployment (e.g., SQL injection, command injection).
- Medium -- Issues that should be addressed but may require specific conditions to exploit (e.g., XSS, insecure defaults).
- Low -- Minor issues or code quality concerns with limited security impact.
- Info -- Informational findings, best-practice recommendations, or items that need manual review.
[!!!] CRITICAL SAI-SEC-003
src/config.py:42
Hardcoded AWS credentials detected (AKIAIOSFODNN7...)
[!! ] HIGH SAI-SQL-001
src/db/users.py:18
SQL query built with string concatenation using user input
[! ] MEDIUM SAI-XSS-002
src/views/comments.py:31
User input rendered in HTML template without escaping
Create a sentinelai.yaml file in your project root for persistent configuration:
severity_threshold: medium
scanners:
- code
- secrets
- dependencies
exclude:
- "tests/**"
- "**/*.min.js"
- "node_modules/**"See the Configuration Reference for all available options.
- Configuration Reference -- Customize SentinelAI for your project.
- Scanner Documentation -- Learn about available scanners and rules.
- LLM Firewall -- Protect your LLM-powered applications.
- Agent Monitor -- Monitor autonomous AI agents.
- API Reference -- Full API documentation.