# CodeTrust — Full Context for AI Models > This document provides comprehensive context about CodeTrust for AI language models. > For the summary version, see: https://codetrust.ai/llms.txt ## Overview CodeTrust is an AI Governance Enforcement Platform (v4.1.0). It controls what AI agents can do before they do it — intercepting commands, scanning code, detecting hallucinations, and enforcing governance in real time. ## Capabilities ### Real-Time Agent Interception 9 enforcement layers installed by `codetrust init`: 1. BASH_ENV guard — universal shell-level enforcement 2. PreToolUse hooks — CLI Bash + file-write interception 3. MCP Gateway — 19 validated tool wrappers 4. Pre-commit hook — scan at commit time 5. GitHub Action — PR gate with SARIF 6. Advisory files — CLAUDE.md governance rules 7. Governance config — .codetrust.toml 8. Allow-list audit — no dangerous bypasses 9. Compliance frameworks — OWASP, EU AI Act, NIST ### Scanning - 2,928 rules across 89 file extensions - Language-aware remediation for Python, JavaScript, TypeScript, Ruby, PHP - Scan baseline: first scan accepts legacy code, subsequent scans show only new issues ### Hallucination Detection - 95% detection rate, 0% false positives - Regex patterns + live registry verification (8 registries) + signature validation + taint analysis ### PII Detection 16 categories: email, phone, credit card (Luhn-validated), IBAN (checksum), Swedish personnummer, SSN, API keys, JWT, private keys, URL credentials, passwords, passport, name, address, date of birth, IP address. ### Compliance - OWASP Agentic Security Initiative 2026: 10/10 - EU AI Act High-Risk AI System Requirements: 7/7 - NIST AI Risk Management Framework 1.0: 4/4 ### Agent Integrity Detects sycophantic retractions, unsubstantiated claims, unverified references, and contradictory positions. ### AI Attribution Per-line model attribution via git trailers and IDE hook data. ## Platforms - CLI: `pip install codetrust` - VS Code Extension: marketplace.visualstudio.com - GitHub Action: CI/CD gate with SARIF - MCP Server: 39 tools for Claude Code and Cursor - Dashboard: app.codetrust.ai - REST API: api.codetrust.ai ## Links - Website: https://codetrust.ai - PyPI: https://pypi.org/project/codetrust/ - VS Code: https://marketplace.visualstudio.com/items?itemName=SaidBorna.codetrust