Skip to main content

Scanning Guide

AIR Blackbox scans Python AI agent code for EU AI Act compliance using a combination of regex-based pattern matching and framework detection.

How Scanning Works

The scanner performs three passes on your code:

  1. Framework Detection — Identifies which AI framework you're using (LangChain, CrewAI, AutoGen, OpenAI, or RAG patterns)
  2. Trust Layer Detection — Checks if AIR trust layer components are already present
  3. Article Compliance Checks — Evaluates code against each of the 6 EU AI Act articles

Articles Checked

Article 9: Risk Management

Checks whether your AI system includes risk assessment and classification. The scanner looks for risk scoring functions, tool classification, and ConsentGate patterns.

Article 10: Data Governance

Verifies that data handling includes privacy controls. Looks for DataVault, tokenization, PII detection, and data governance patterns.

Article 11: Technical Documentation

Ensures proper logging and documentation exists. Checks for structured logging, audit callbacks, and documentation generation.

Article 12: Record-Keeping

Validates audit trail implementation. Looks for AuditLedger, HMAC-SHA256 chains, and immutable record-keeping patterns.

Article 14: Human Oversight

Confirms human-in-the-loop mechanisms are present. Checks for approval gates, human review steps, and oversight callbacks.

Article 15: Accuracy & Robustness

Tests for input validation and injection protection. Looks for prompt injection detection, input sanitization, and output validation.

Scan Results

Each finding includes:

  • Article — Which EU AI Act article is affected
  • Severity — CRITICAL, HIGH, MEDIUM, or LOW
  • Finding — Description of the compliance gap
  • Recommendation — Specific action to fix the issue

Supported Frameworks

FrameworkDetectionTrust Layer
LangChainImport patternsair-langchain-trust
CrewAIImport patternsair-crewai-trust
AutoGenImport patternsair-autogen-trust
OpenAI SDKImport patternsDirect integration
RAGRetrieval patternsCustom trust layer

Next Steps