aisentry
A unified command-line tool for AI/LLM security scanning. Static code analysis for OWASP LLM Top 10 vulnerabilities.
Website: aisentry.co | Docs: aisentry.co/docs
Benchmarks
Evaluated against a comprehensive OWASP LLM Top 10 testbed with 73 ground-truth vulnerabilities.
| Metric | aisentry | Semgrep | Bandit |
|---|---|---|---|
| Precision | 75.4% | 83.3% | 58.3% |
| Recall | 63.0% | 6.8% | 38.4% |
| F1 Score | 68.7% | 12.7% | 46.3% |
LLM-Specific Coverage (patterns generic tools miss):
| Category | aisentry | Semgrep | Bandit |
|---|---|---|---|
| LLM01: Prompt Injection | 72.7% | 0% | 15.4% |
| LLM04: Model DoS | 80.0% | 0% | 0% |
| LLM06: Sensitive Info | 62.5% | 0% | 0% |
| LLM10: Model Theft | 44.4% | 0% | 0% |
See docs/tool_comparison.md for detailed comparison and llm-sec-eval for methodology.
Features
- Static Code Analysis: OWASP LLM Top 10 + SQL injection detection
- Security Posture Audit: 61 controls across 10 categories with maturity scoring
- Remote Scanning: GitHub, GitLab, Bitbucket URLs
- Multiple Outputs: Text, JSON, HTML (interactive), SARIF (CI/CD)
- False Positive Reduction: ML-trained heuristics (88% accuracy)
Installation
pip install aisentry
# With ML-based false positive reduction
pip install aisentry[ml]
# With all cloud providers
pip install aisentry[cloud]
Quick Start
# Scan local project
aisentry scan ./my_project
# Scan GitHub repository
aisentry scan https://github.com/langchain-ai/langchain
# Generate HTML report
aisentry scan ./my_project -o html -f report.html
# Security posture audit
aisentry audit ./my_project
Live Model Testing
For runtime testing of LLM models (prompt injection, jailbreaks), we recommend Garak by NVIDIA. aisentry focuses on static code analysis - finding vulnerabilities before deployment.
Documentation
| Topic | Link |
|---|---|
| CLI Reference | docs/cli.md |
| Configuration | docs/configuration.md |
| Architecture | docs/architecture.md |
| CI/CD Integration | docs/integration.md |
| Tool Comparison | docs/tool_comparison.md |
GitHub Actions
- run: pip install aisentry
- run: aisentry scan . -o sarif -f results.sarif
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
See docs/integration.md for GitLab, Azure DevOps, and pre-commit examples.
Development
git clone https://github.com/deosha/aisentry.git
cd aisentry
pip install -e ".[dev]"
pytest tests/ -v
License
MIT License - see LICENSE for details.
Links
- Website: aisentry.co
- GitHub: github.com/deosha/aisentry
- PyPI: pypi.org/project/aisentry
- Issues: Report bugs
Release files for aisentry 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aisentry-1.0.0.tar.gz | 750.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aisentry-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.2 MB
Release files / aisentry-1.0.0.tar.gz
| Download URL | aisentry-1.0.0.tar.gz |
|---|---|
| Size | 750.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d31395289e5c2b3fae7c7222a8a57f2453b86ba0727194a8051c4b6fc6d7abd
|
|
BLAKE2b-256 checksum How to use checksums |
de4129c068592b6fb184c375f8b253be1cc02884bc93f9014cd0ec9dcde6d678
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|
Release files / aisentry-1.0.0-py3-none-any.whl
| Download URL | aisentry-1.0.0-py3-none-any.whl |
|---|---|
| Size | 486.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce644c7715bb3f1599348a2dfebe113c153bdc827b19f261f6db52ba41ea232e
|
|
BLAKE2b-256 checksum How to use checksums |
6abe2e998568d76b733aeb53a0c1d1d70caa2768fc9f8957e21f6b2e7a7e4315
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|