TrustyAI Garak: LLM Red Teaming for Eval-Hub
Automated vulnerability scanning and red teaming for Large Language Models using Garak. This package provides a FrameworkAdapter for the eval-hub evaluation platform, enabling garak scans to run as Kubernetes Jobs or via Kubeflow Pipelines.
What It Does
- 🔍 Vulnerability Assessment: Red-team LLMs for prompt injection, jailbreaks, toxicity, bias and other vulnerabilities
- 📋 Compliance: OWASP LLM Top 10, AVID taxonomy benchmarks
- 🎯 Intents-based Testing: Policy taxonomy + SDG + TAPIntent for targeted risk assessment (KFP mode)
- ☁️ Cloud-Native: Runs on OpenShift AI / Kubernetes as eval-hub jobs
- 📊 Detailed Reports: JSONL, HTML, and AVID-format reports with MLflow integration
Execution Modes
| Mode | How Garak Runs | Intents Support | Use Case |
|---|---|---|---|
| Simple | Directly in the eval-hub K8s Job pod | No | Standard scans |
| KFP | K8s Job submits to Kubeflow Pipelines, polls status | Yes | Intents/SDG workflows |
Installation
# Core (eval-hub adapter with KFP support)
pip install llama-stack-provider-trustyai-garak
# With SDG support (for intents workflows)
pip install "llama-stack-provider-trustyai-garak[sdg]"
# Development
pip install "llama-stack-provider-trustyai-garak[dev]"
Container Image
# Build the eval-hub adapter image
docker build -f Containerfile -t trustyai-garak:dev .
The container runs as:
# Simple mode (garak in same pod)
CMD ["python", "-m", "llama_stack_provider_trustyai_garak.evalhub"]
# KFP mode (garak in a separate KFP pod)
CMD ["python", "-m", "llama_stack_provider_trustyai_garak.evalhub.kfp_adapter"]
Benchmark Profiles
Predefined scan profiles available via benchmark_id:
| Profile | Description |
|---|---|
quick |
Single DAN probe for fast testing |
owasp_llm_top10 |
OWASP Top 10 for LLM Applications |
avid |
AVID taxonomy — all vulnerabilities |
avid_security |
AVID — security vulnerabilities |
avid_ethics |
AVID — ethical concerns |
avid_performance |
AVID — performance issues |
quality |
Violence, profanity, toxicity, hate speech |
cwe |
Common Weakness Enumeration |
intents |
Intents-based risk assessment (KFP mode only) |
Job Spec Configuration
The adapter reads a JobSpec from a mounted ConfigMap:
{
"id": "scan-001",
"provider_id": "garak",
"benchmark_id": "quick",
"model": {
"url": "https://my-model-endpoint.example.com/v1",
"name": "my-model"
},
"parameters": {
"probes": "dan.Dan_11_0",
"execution_mode": "simple"
}
}
Parameters
Key parameters in the job spec:
| Parameter | Description | Default |
|---|---|---|
probes |
Comma-separated probe names | Profile default |
probe_tags |
Tag-based probe filtering | — |
execution_mode |
simple or kfp |
simple |
timeout_seconds |
Scan timeout | Profile default |
eval_threshold |
Vulnerability threshold (0.0–1.0) | 0.5 |
model_type |
Garak generator type | openai.OpenAICompatible |
garak_config |
Full garak config dict (deep-merged onto profile) | — |
Results
The adapter reports EvaluationResult per probe with:
attack_success_rate: Percentage of successful attacksvulnerable_responses: Count of vulnerable responsestotal_attempts: Total probe attempts
Overall metrics include TBSA (Tier-Based Security Aggregate) when available.
Development
make test # Run all tests
make coverage # With coverage report
make lint # ruff check
make format # ruff format
Support & Documentation
Metadata
Release files for llama-stack-provider-trustyai-garak 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_stack_provider_trustyai_garak-0.5.1.tar.gz | 119.8 kB | With provenance | Details for llama_stack_provider_trustyai_garak-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_stack_provider_trustyai_garak-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for llama_stack_provider_trustyai_garak-0.5.1-py3-none-any.whl |
Total release size: 205.6 kB
Release files / llama_stack_provider_trustyai_garak-0.5.1.tar.gz
| Download URL | llama_stack_provider_trustyai_garak-0.5.1.tar.gz |
|---|---|
| Size | 119.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3746940fd894f80d6079943be93e5e1721f24f50792660865da0b86cfa70779
|
|
BLAKE2b-256 checksum How to use checksums |
84cf763cee61d348638563fc27c4c2d5bc936efc99e9aa4a95a5948a2ce63e92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.
Transparency logRelease files / llama_stack_provider_trustyai_garak-0.5.1-py3-none-any.whl
| Download URL | llama_stack_provider_trustyai_garak-0.5.1-py3-none-any.whl |
|---|---|
| Size | 85.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fab571f08d69aceaf1060cae8729e51bdf066dc2ef9802e3a6f4e9adea27b15
|
|
BLAKE2b-256 checksum How to use checksums |
b343b9c993e9a467d323a39d8abc01c0620be601893988e39ee3066717d64910
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.
Transparency logSecurity for llama-stack-provider-trustyai-garak 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for llama_stack_provider_trustyai_garak-0.5.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.