Skip to main content

TrustLint

Offline compliance linter for AI agents — scans text against the ComplyEdge rule corpus using Tier 1 regex patterns. No API key required.

Catches EU AI Act, SOX, HIPAA, GDPR, COPPA, and PCI DSS violations before they reach production.

Hosted API vs. Offline Linter

TrustLint runs locally and needs no API key. For runtime policy enforcement and an application-facing evidence trail, use the hosted ComplyEdge Python SDK.

Installation

pip install trustlint

Quick Start

# Check text for compliance violations
trustlint check --text "We expect revenue to increase by 25% next quarter"

# Check a file
trustlint check prompt.txt

# Pipe from stdin
echo "Deploy social credit score for citizens" | trustlint check

# Filter by jurisdiction
trustlint check --text "social credit score" --jurisdiction EU

# Verbose output (citations + remediation)
trustlint check --text "earnings forecast" -v

Commands

trustlint check

Scan text for compliance violations against the loaded rule corpus.

trustlint check --text "your AI prompt here"    # Check a string
trustlint check myfile.py                        # Check a file
trustlint check --text "text" -j EU             # Filter to EU rules only
trustlint check --text "text" -v                 # Verbose: show citations

Exit codes:

  • 0 — No critical/high violations (CI pass)
  • 1 — Critical or high severity violations found (CI fail)
  • 2 — Input error (missing file, no rules loaded)

trustlint rules list

Show all loaded compliance rules with severity and jurisdiction.

trustlint rules list              # All rules
trustlint rules list -j US        # US rules only

trustlint init

Create a .trustlint.yaml configuration file in the current directory.

trustlint init           # Create config
trustlint init --force   # Overwrite existing

Example Output

TrustLint Report
────────────────────────────────────────────────────────────

[CRITICAL] SOX_HYBRID_MATERIAL_DISCLOSURE_001
  Hybrid SOX Material Information Disclosure Prevention
  Jurisdiction: US | Matched: Forward-looking statements requiring analysis

────────────────────────────────────────────────────────────
1 critical/high, 0 medium/low (12 rules evaluated)

How It Works

TrustLint loads YAML rule files from the ComplyEdge rule corpus (rules/regulations/). Each rule contains regex patterns for Tier 1 (fast, deterministic) detection. The engine:

  1. Loads all .yaml rule files from the rules directory
  2. Extracts regex conditions and hybrid_detection.tier1_config.risk_flag_patterns
  3. Matches patterns against the input text
  4. Reports violations with rule ID, severity, jurisdiction, and citation

No API calls are made in offline mode. For deeper Tier 2 LLM analysis, set the COMPLYEDGE_API_KEY environment variable (requires a ComplyEdge account).

CI/CD Integration

GitHub Actions

- name: Compliance check
  run: |
    pip install trustlint
    trustlint check --text "${{ github.event.pull_request.body }}"

Pre-commit hook

#!/bin/sh
trustlint check "$1" || exit 1

Rules Coverage

Jurisdiction Regulations Examples
EU EU AI Act Article 5 Social scoring, subliminal manipulation, biometric categorisation
US SOX, HIPAA, COPPA, TCPA Material disclosure, PHI protection, child data
Global PCI DSS Payment card data detection

Configuration

Create .trustlint.yaml with trustlint init:

# Rules directory (default: auto-detect)
# rules_dir: ./rules/regulations

# Default jurisdiction filter
# jurisdiction: EU

# Severity threshold
# severity_threshold: medium

Development

# Install in development mode
pip install -e packages/trustlint/

# Run tests
python -m pytest tests/unit/trustlint/ -v

License

Apache-2.0 — ComplyEdge

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trustlint-2.0.6.tar.gz (81.2 kB view details)

Uploaded Source

Built Distribution

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

trustlint-2.0.6-py3-none-any.whl (132.5 kB view details)

Uploaded Python 3

File details

Details for the file trustlint-2.0.6.tar.gz.

File metadata

  • Download URL: trustlint-2.0.6.tar.gz
  • Upload date:
  • Size: 81.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for trustlint-2.0.6.tar.gz
Algorithm Hash digest
SHA256 8d4033f663ea254f32628f91349700309a29a79773a683b95a3f85e74987807a
MD5 cde5cf833fa2c5c77fb33385571bc6f6
BLAKE2b-256 f6b84d0995962f1e6a84becece022386a64614e8bd3a9b27cdbfb9da390abb47

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustlint-2.0.6.tar.gz:

Publisher: publish.yml on ComplyEdge/complyedge-platform

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

File details

Details for the file trustlint-2.0.6-py3-none-any.whl.

File metadata

  • Download URL: trustlint-2.0.6-py3-none-any.whl
  • Upload date:
  • Size: 132.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for trustlint-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 01b58a3c84941a9a4b04f07bb8cd323c26a7c26086a6d9217a3d76fb7b57776c
MD5 c3ccd7a29845de544e21848625d76044
BLAKE2b-256 e634855f7f94793cdb9b60056346a6687409c4859c5a0b621b3b354311eed3e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for trustlint-2.0.6-py3-none-any.whl:

Publisher: publish.yml on ComplyEdge/complyedge-platform

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

Release history Release notifications | RSS feed

2.1.0

2 files

2.0.7

2 files

This release

2.0.6 This release

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.0.3

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page