Skip to main content

AI Governance-as-Code CLI — discover, classify, and govern AI systems

Project description

aigov

AI Governance-as-Code CLI — discover, classify, and govern AI systems across your infrastructure.


tl;dr

aigov scans your codebase, CI pipeline, and cloud infrastructure to automatically discover every AI system in use, classify each one against the EU AI Act, and flag the compliance gaps your team needs to close. It works like trivy for CVEs — but for AI governance risk. Built for engineering teams who must achieve EU AI Act compliance before the August 2026 enforcement deadline.


What problem are we solving?

The EU AI Act's full enforcement deadline is 2 August 2026. Every organisation deploying AI in or selling into the EU must maintain a documented inventory of its AI systems — yet most engineering teams have no idea how many AI integrations actually live in their codebases. Studies show 80%+ of knowledge workers use AI tools without formal approval, creating pervasive "shadow AI" that nobody has inventoried or risk-assessed. No open-source tool existed to automatically discover and inventory AI usage the way trivy or grype handle CVEs. aigov fills that gap — run one command, get a full AI inventory with EU AI Act risk classifications.


What does aigov do?

aigov runs a four-stage pipeline: discover AI systems from imports, API keys, MCP configs, and cloud resources; classify each finding against the EU AI Act risk tiers; gap-analyze what compliance controls are missing; and generate draft documentation and conformity declarations. The full pipeline runs in a single command:

aigov scan . --classify --gaps --docs

Quick Start

pip install aigov
aigov scan . --classify

Example output:

                        AI Systems Found (6)
┌──────────────────────────────────────────────────────────────────────┐
│  #  Name                   Type         Provider     Risk            │
├──────────────────────────────────────────────────────────────────────┤
│  1  openai (gpt-4o)        api_service  OpenAI       ⚠  limited     │
│  2  anthropic (claude-3)   api_service  Anthropic    ⚠  limited     │
│  3  rekognition             model        AWS          🔴 high_risk   │
│  4  filesystem              mcp_server   —            ✓  minimal     │
│  5  langchain               agent        LangChain    ⚠  limited     │
│  6  deepseek                api_service  DeepSeek     ⚠  limited     │
└──────────────────────────────────────────────────────────────────────┘

Found 6 AI systems · 1 high-risk · 3 limited-risk · 2 minimal-risk

Export to JSON or Markdown for compliance evidence:

aigov scan . --output json --out-file inventory.json
aigov scan . --output markdown --out-file AIINVENTORY.md

Scanners

Scanner What it finds
code.python_imports AI/ML library imports in Python source — OpenAI, Anthropic, LangChain, HuggingFace, DeepSeek, and 20+ others mapped to provider and jurisdiction
code.api_keys Hardcoded AI service API keys in source, config, and env files — values are never stored, only redacted previews
config.mcp_servers MCP server configs from Claude Desktop, Cursor, Windsurf, VS Code, and project-level .mcp.json files
cloud.aws AWS Bedrock foundation models, SageMaker endpoints, Comprehend, Rekognition, and Lex resources (pip install aigov[aws])
infra.docker Detects AI base images, model files, and ML frameworks in Dockerfiles and docker-compose
infra.terraform Discovers AI service provisioning in Terraform/OpenTofu across AWS, Azure, and GCP
infra.kubernetes Finds GPU workloads, AI containers, and ML platform CRDs in Kubernetes manifests

All findings include origin_jurisdiction (ISO 3166-1) for geography-based policy filtering.


Classification Frameworks

Framework Articles covered Status
EU AI Act Article 5 (prohibited practices), Annex III (high-risk categories), Article 50 (transparency obligations) Available
Colorado AI Act (SB 205) High-risk AI system obligations for Colorado residents Roadmap
NIST AI RMF Govern, Map, Measure, Manage functions Roadmap

CI/CD Integration

Add aigov to your workflow to block deployments if prohibited AI systems are detected:

steps:
  - uses: actions/checkout@v4
  - uses: abhaykshir/aigov@v1
    with:
      scan-paths: "."
      classify: "true"
      fail-on: "prohibited,high_risk"

The action fails the step on any finding at or above the configured risk level. See action.yml for all inputs and outputs.


Architecture

flowchart LR
    CLI["CLI\naigov scan"] --> Engine["Scan Engine"]
    Engine --> S1["code.python_imports"]
    Engine --> S2["code.api_keys"]
    Engine --> S3["config.mcp_servers"]
    Engine --> S4["cloud.aws"]
    S1 & S2 & S3 & S4 --> Records["AISystemRecord[]"]
    Records --> Classifier["Classifier\n(EU AI Act)"]
    Classifier --> Gaps["Gap Analyzer"]
    Gaps --> Docs["Docs Generator"]
    Docs --> Out1["JSON / Markdown"]
    Docs --> Out2["Conformity Declarations"]

Security

See SECURITY.md for the full policy.

  • No secrets stored — API keys detected but never recorded; only type, location, and a 4-char redacted preview are kept
  • Read-only — never modifies source files, cloud resources, or system configurations
  • Local processing — no telemetry, no external API calls, no data leaves your machine
  • Minimal dependencies — small, auditable dependency tree from trusted sources with pinned versions

Roadmap

Phase Status Description
1 — Discovery ✅ Done Python imports, API keys, MCP server scanners
2 — Risk Classification ✅ Done EU AI Act Article 5, Annex III, Article 50
3 — Gap Analysis ✅ Done Compliance gap analyzer — missing controls per finding
4 — Documentation Generator ✅ Done Draft conformity declarations and DPIA stubs
5 — Cloud Scanners ✅ Done AWS Bedrock, SageMaker, Comprehend, Rekognition, Lex
6 — CI/CD Integration ✅ Done GitHub Actions reusable action and aigov-check CLI
7 — Additional Frameworks 📋 Planned Colorado AI Act SB 205, NIST AI RMF
8 — More Scanners 📋 Planned JS/TS imports, Terraform AI resources, Docker image scanning
9 — Dashboard 📋 Planned Web UI for inventory visualization and compliance tracking

Contributing

Contributions are welcome — especially new scanners, classification rules, and framework mappings. See CONTRIBUTING.md to get started.


Governance

This project is maintained by Abhay K. See GOVERNANCE.md for the decision process and regulatory accuracy policy.


License

Apache 2.0 — see LICENSE.

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

aigov-0.1.0.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

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

aigov-0.1.0-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aigov-0.1.0.tar.gz
Algorithm Hash digest
SHA256 37ac1e28ad9059f9d616e1379b3a2ed559b6618c5aed2f38647c275a14afa994
MD5 9eb441d9ae982568bb405b8f60cf0d9c
BLAKE2b-256 e5ebe43168fa66dcbc59457d5998a15418003905208d880a3c7740f1fe30cb18

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on abhaykshir/aigov

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

File details

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

File metadata

  • Download URL: aigov-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 56.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aigov-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95046736307654301d48934596564150a7d056db8b113f8ed05c75aca2934482
MD5 3f1d7f08698cb9e2dadc4119e6c3f9c0
BLAKE2b-256 2d8620c3a652ab4871ce2f936c80c31f78911f2db0d05e39eb87c38eefdbc0e4

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on abhaykshir/aigov

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