Skip to main content

Scan your project for AI framework usage and check EU AI Act / GDPR compliance

Project description

EU AI Act Scanner

PyPI version npm version License: MIT Python 3.9+

Scan your codebase for AI framework usage and check EU AI Act + GDPR compliance in seconds.

Zero dependencies. Works offline. Detects 26 AI frameworks including OpenAI, Anthropic, LangChain, HuggingFace, and more.

Quick Start

pip install eu-ai-act-scanner
eu-ai-act-scanner scan ./my-project

Or with npx (no install):

npx eu-ai-act-scanner scan ./my-project

What It Does

  1. Scans your project for AI framework usage (imports, dependencies, model references)
  2. Maps each framework to its EU AI Act risk level and obligations
  3. Checks your compliance documentation against requirements
  4. Reports what's missing with actionable fix instructions

Example Output

EU AI Act Scanner v0.1.0
Scan your project for AI framework usage and EU AI Act / GDPR compliance

Scanning: ./my-ai-app

Scan Results
  Files scanned: 47
  AI files found: 3

  Detected Frameworks:
    openai (2 files)
    langchain (1 file)

  Risk Assessment:
    [HIGH] openai: Art. 51-53 (GPAI obligations)
           Document OpenAI model usage, register as GPAI deployer...
    [MEDIUM] langchain: Art. 50 (transparency), Art. 6 + Annex III
           Audit your LangChain pipeline for chained AI models...

  Compliance: 1/3 (33.3%) for limited-risk

    PASS transparency
    FAIL user_disclosure
         Clearly inform users that AI is involved in the system
         Art. 52(1) - Natural persons must be notified of AI interaction
           - Add an 'AI Disclosure' section to your README.md
           - Include: which AI models are used, what they do, what data they process
    FAIL content_marking
         Mark AI-generated content so users can distinguish it from human content
         Art. 52(3) - AI-generated text/image/audio/video must be labeled
           - Add metadata or visible label to AI-generated outputs

Supported Frameworks (26)

Provider Frameworks Risk Level
GPAI Providers OpenAI, Anthropic, Gemini, Mistral, Cohere, DeepSeek, Vertex AI, AWS Bedrock, Azure OpenAI, ZhipuAI, Qwen, Moonshot High
Orchestration LangChain, LlamaIndex, LiteLLM, CrewAI, AutoGen, Semantic Kernel, Haystack, DSPy, Groq, Replicate, Ollama Medium
ML Infrastructure HuggingFace, TensorFlow, PyTorch Low (use-case dependent)

Usage

Basic Scan

# Scan current directory
eu-ai-act-scanner scan

# Scan a specific project
eu-ai-act-scanner scan ./path/to/project

# Scan with explicit risk category
eu-ai-act-scanner scan ./project --risk high

GDPR Scan

# Include GDPR compliance check
eu-ai-act-scanner scan ./project --gdpr

JSON Output

# Full report as JSON (for CI/CD integration)
eu-ai-act-scanner scan ./project --json

Python API

from eu_ai_act_scanner import EUAIActScanner, GDPRScanner

# EU AI Act scan
scanner = EUAIActScanner("./my-project")
results = scanner.scan()
print(f"Found: {list(results['detected_models'].keys())}")

# Compliance check
compliance = scanner.check_compliance("limited")
print(f"Score: {compliance['compliance_score']}")

# GDPR scan
gdpr = GDPRScanner("./my-project")
gdpr_results = gdpr.scan()
print(f"Personal data: {gdpr_results['processing_summary']['processes_personal_data']}")

CI/CD Integration

Add to your GitHub Actions workflow:

- name: EU AI Act Compliance Check
  run: |
    pip install eu-ai-act-scanner
    eu-ai-act-scanner scan . --json > compliance-report.json

How Risk Levels Work

The EU AI Act classifies AI systems into 4 risk categories:

  • Unacceptable: Banned (social scoring, mass biometric surveillance)
  • High: Strict requirements (recruitment, credit scoring, medical devices)
  • Limited: Transparency obligations (chatbots, content generation)
  • Minimal: No specific obligations (spam filters, games)

This scanner detects which frameworks you use and maps them to their default risk level. Your actual risk category depends on your specific use case — the scanner suggests a starting point.

Contributing

Issues and PRs welcome at github.com/ark-forge/eu-ai-act-scanner.

License

MIT

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

eu_ai_act_scanner-0.1.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

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

eu_ai_act_scanner-0.1.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file eu_ai_act_scanner-0.1.0.tar.gz.

File metadata

  • Download URL: eu_ai_act_scanner-0.1.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eu_ai_act_scanner-0.1.0.tar.gz
Algorithm Hash digest
SHA256 92128388032ff640c88a49a3f7540593c2b663ccf0a1a746b4e5dc73425ed52c
MD5 8b6805e175ace435e629fe7f2d770d0f
BLAKE2b-256 ac1a9509560b9a425788096b91210530e64c0a35a8f9a32e9801b1e087f02ed9

See more details on using hashes here.

Provenance

The following attestation bundles were made for eu_ai_act_scanner-0.1.0.tar.gz:

Publisher: publish-pypi.yml on ark-forge/eu-ai-act-scanner

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

File details

Details for the file eu_ai_act_scanner-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for eu_ai_act_scanner-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d282846eafdd3ac89b6338157c1f7f53b382269fe6f77f1d485c0aa84aff578d
MD5 c045fc7a68a788647d2186878be17057
BLAKE2b-256 29c2db5c800a971624a2182802d64e4cd7c04d5bd82c75f2aefa4d3728c9946a

See more details on using hashes here.

Provenance

The following attestation bundles were made for eu_ai_act_scanner-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on ark-forge/eu-ai-act-scanner

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