Skip to main content

AI Sentry - Unified AI/LLM Security Scanner for Static Code Analysis + Live Model Testing

Project description

aisentry

Tests PyPI version Downloads Python versions License: MIT

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

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

aisentry-1.0.0b9.tar.gz (599.5 kB view details)

Uploaded Source

Built Distribution

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

aisentry-1.0.0b9-py3-none-any.whl (336.7 kB view details)

Uploaded Python 3

File details

Details for the file aisentry-1.0.0b9.tar.gz.

File metadata

  • Download URL: aisentry-1.0.0b9.tar.gz
  • Upload date:
  • Size: 599.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for aisentry-1.0.0b9.tar.gz
Algorithm Hash digest
SHA256 08d19f4896b89a2042a99b4d01cf84b8ed81782d15601a8a48d8d4dee561f507
MD5 67772105cfabe37d4319dc1d229ba22d
BLAKE2b-256 f20e6bd1f2d8910d319103bd52b95b0ae68a8e6dee9d0f11f9f4e995740c52ad

See more details on using hashes here.

File details

Details for the file aisentry-1.0.0b9-py3-none-any.whl.

File metadata

  • Download URL: aisentry-1.0.0b9-py3-none-any.whl
  • Upload date:
  • Size: 336.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for aisentry-1.0.0b9-py3-none-any.whl
Algorithm Hash digest
SHA256 c2d02bb81d82e5b58872f1dfa9f070986d45bdfb91bb345d3b1af0c1410198b4
MD5 fbc1cb1e09b93669099b42348bd8efb2
BLAKE2b-256 c0c42abfbb5035a55f6dbe937a0aebea3fd79523d38308964be51e238f3a1d5a

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