Skip to main content

Tool for testing AI system prompts against various attack vectors

Project description

🛡️ Compliant LLM

Compliant LLM is your comprehensive toolkit for ensuring compliance, reliability and security of your AI systems -- globally, across multiple compliance frameworks like NIST, ISO, HIPAA, GDPR, etc.

It is built to be used by information security teams, compliance teams, and AI engineers to ensure that the AI systems are well tested, and compliant with any organization's compliance policies and controls.

It supports multiple LLM providers, and can be used to test prompts, agents, MCP servers and GenAI models.

For detailed docs refer to docs

🎯 Key Features

  • 🎯 Security Testing: Test against 8+ attack strategies including prompt injection, jailbreaking, and context manipulation
  • 📊 Compliance Analysis: Ensure your systems meet industry standards and best practices
  • 🤖 Provider Support: Works with multiple LLM providers via LiteLLM
  • 📈 Visual Dashboard: Interactive UI for analyzing test results
  • End to End Testing: Test your AI systems end to end
  • 📄 Detailed Reporting: Comprehensive reports with actionable insights

⚙️ Installation

pip install compliant-llm

Set up OPENAI, ANTHROPIC API keys

touch .env
# write the following in .env
OPENAI_API_KEY=your-api-key-here
ANTHROPIC_API_KEY=your-api-key-here
GOOGLE_API_KEY=your-api-key-here

🚀 Quick Start

  1. Run a basic red-teaming test via cli:
compliant-llm test --prompt "You are a helpful assistant who can only respond ethically" --strategy "prompt_injection,jailbreak"
  1. Or get started from the UI:
compliant-llm dashboard
  1. Or use a configuration file:
compliant-llm test --config_path configs/config.yaml

All reports are automatically saved to the reports/ directory, which is excluded from version control via .gitignore.

  1. View the latest test report in UI:
compliant-llm dashboard

File Structure

  • Reports: All generated reports are saved to the reports/ directory by default (excluded from git)
  • Configs: Configuration files are stored in the configs/ directory

Available Testing Strategies

  • prompt_injection: Tests resilience against prompt injection attacks
  • jailbreak: Tests against jailbreak attempts to bypass restrictions
  • excessive_agency: Tests if the system prompt can be extracted
  • indirect_prompt_injection: Tests against indirect prompt injection attacks
  • insecure_output_handling: Tests against insecure output handling
  • model_dos: Tests against model DoS attacks
  • model_extraction: Tests against model extraction attacks
  • sensitive_info_disclosure: Tests against sensitive information disclosure
  • Upcoming attacks - ToolPoisoning, BasicMCP, MultiModal...

Roadmap

  • Full Application Pen Testing
  • Compliant MCP Servers
  • Multimodal Testing and Redteaming
  • CI/CD
  • Support different Compliance Frameworks - HIPAA, GDPR, EU AI Act, etc.
  • Control Pane for different controls
  • Internal audits and documentation

🤝 Contributors

Developers Contributors
Those who build with compliant-llm. Those who make compliant-llm better.
(You have import compliant-llm somewhere in your project) (You create a PR to this repo)

We welcome contributions from the community! Whether it's bug fixes, feature additions, or documentation improvements, your input is valuable.

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

🔍 Open Analytics

At Compliant LLM, we believe in transparency. We collect minimal, anonymized usage data to improve our product and guide our development efforts.

✅ No personal or company-identifying information

📝 Cite Us

@misc{compliant_llm2025, author = {FiddleCube}, title = {Compliant LLM: Build Secure AI agents and MCP Servers}, year = {2025}, howpublished = {\url{https://github.com/fiddlecube/compliant-llm}}, }

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

compliant_llm-0.1.2.tar.gz (314.1 kB view details)

Uploaded Source

Built Distribution

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

compliant_llm-0.1.2-py3-none-any.whl (349.9 kB view details)

Uploaded Python 3

File details

Details for the file compliant_llm-0.1.2.tar.gz.

File metadata

  • Download URL: compliant_llm-0.1.2.tar.gz
  • Upload date:
  • Size: 314.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for compliant_llm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d6eb27f17f01481ac369303adb262f12351548ebcb1d5f700c190bb21bd919e8
MD5 2bd3bc151e6a69d17ad4ff73c45b7e83
BLAKE2b-256 aac2910c0f80887d5a86432a2de01ad99748b740ccfe6547456db3d8e225154f

See more details on using hashes here.

Provenance

The following attestation bundles were made for compliant_llm-0.1.2.tar.gz:

Publisher: publish-to-pypi.yml on fiddlecube/compliant-llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file compliant_llm-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: compliant_llm-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 349.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for compliant_llm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a49e658561b408d85017637ed8e58ac40582e385160036d7a1b3dfcac9f3e9ba
MD5 07a5b679a109cc959119fe005b7439be
BLAKE2b-256 beb802055f6a56a3672d86f50d3af36bc1073e80d32d9b80856b22685c561ee0

See more details on using hashes here.

Provenance

The following attestation bundles were made for compliant_llm-0.1.2-py3-none-any.whl:

Publisher: publish-to-pypi.yml on fiddlecube/compliant-llm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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