Skip to main content

Scan AI systems for EU/UK/NIST AI regulation compliance

Project description

AI Regulation Compliance Scanner

Open-source CLI to evaluate AI systems against EU AI Act, UK AI principles, and NIST AI RMF.

v1.0 Scope

Implemented

  • Multi-regulation rule evaluation via YAML rule packs (eu-ai-act, uk-ai, nist-rmf)
  • Structured system profile input (--input JSON/YAML)
  • Compliance statuses per requirement: pass, partial, fail, not_applicable
  • Gap scoring and recommendation generation
  • Report outputs:
    • text
    • json (canonical machine-readable schema)
    • html
    • pdf
  • CI quality gates:
    • pytest -q
    • ruff check .
    • mypy scanner
    • python -m build

Out of Scope

  • Automatic legal interpretation beyond rule-based checks
  • Fairlearn/AIF360 and SHAP/LIME runtime integrations

Install

pip install ai-regulation-scanner

For local development:

pip install -e '.[dev]'

Quick Start

# Evaluate all supported regulations from a structured profile
ai-scan --input ./profile.yaml --regulation eu-ai-act,uk-ai,nist-rmf --format json --output ./report.json

# Render HTML report
ai-scan --input ./profile.yaml --regulation eu-ai-act,uk-ai --format html --output ./report.html

# Render PDF report
ai-scan --input ./profile.yaml --regulation eu-ai-act,uk-ai,nist-rmf --format pdf --output ./report.pdf

Input Model (--input)

Supported extensions: .json, .yaml, .yml.

metadata:
  system_name: "Example AI System"
  owner: "AI Governance"
description: "Clinical triage assistant"
use_case: "medical diagnosis support"
domain: "healthcare"
controls:
  risk_management_system: true
  data_governance: true
  technical_documentation: true
  human_oversight: false
evidence:
  - id: "ev-1"
    description: "Risk management plan and risk register"
    tags: ["risk management"]
  - "model card and technical documentation"

CLI Contract

  • --regulation: comma-separated values from eu-ai-act,uk-ai,nist-rmf
  • --format: text|json|html|pdf
  • --output: optional for text/json/html, required for pdf

Exit Codes

  • 0: Minimal/limited risk category
  • 1: High-risk category
  • 2: Prohibited category
  • 3: Validation/runtime error (input/args/output)

Canonical JSON Report Shape

Top-level keys:

  • metadata
  • generated_at
  • risk_assessment
  • regulations
  • summary_scores
  • findings
  • recommendations
  • evidence_gaps

Release & Publishing

  • GitHub Actions CI workflow enforces quality gates on PR/main.
  • GitHub Actions Release workflow runs on v* tags.
  • PyPI publish uses Trusted Publishing (id-token: write).
  • Setup guide: docs/pypi-trusted-publishing.md

License

Apache 2.0 - See LICENSE

Disclaimer

This tool provides compliance guidance only and does not constitute legal advice. Always consult qualified legal counsel for regulatory decisions.

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

ai_regulation_scanner-1.0.0.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

ai_regulation_scanner-1.0.0-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file ai_regulation_scanner-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for ai_regulation_scanner-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4539f222e2080a1499c00eade4fad012a9dfb688d3dbded82952670c6034d6ac
MD5 08f05b4a8f24ad806c06c3e43f77a526
BLAKE2b-256 cb4d866921f34fbffd26be0b763aa4754e9ec7fcca98bc021f08663a27e80517

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_regulation_scanner-1.0.0.tar.gz:

Publisher: release.yml on ogulcanaydogan/AI-Regulation-Compliance-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 ai_regulation_scanner-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_regulation_scanner-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8344f85262b63f73286ff6421b7bc2375ef0a2a5684c7fb519915ffe1635ec6d
MD5 ca70fb526e2ac2201f1776c53d947f19
BLAKE2b-256 a91ecc698d5fe0fdcfb28dcff91d1fe1a6a6dd77146df678b93eb20b208a7b2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_regulation_scanner-1.0.0-py3-none-any.whl:

Publisher: release.yml on ogulcanaydogan/AI-Regulation-Compliance-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