Skip to content

onurcandonmezer/ai-governance-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ AI Governance Framework

Enterprise AI governance and compliance toolkit

Python EU AI Act NIST ISO 42001 License CI


Overview

A comprehensive toolkit for establishing and maintaining AI governance within organizations. As AI regulations like the EU AI Act become enforceable, organizations need structured approaches to compliance, risk assessment, and audit readiness.

This framework provides automated risk scoring, compliance checklist generation, model card creation, and audit trail logging β€” aligned with EU AI Act, NIST AI Risk Management Framework, and ISO/IEC 42001 standards.

Key Features

  • Risk Assessment Engine β€” Automated risk scoring based on EU AI Act risk categories (Unacceptable, High, Limited, Minimal) with multi-dimensional analysis
  • Compliance Checker β€” Generate regulatory compliance checklists tailored to your AI system's risk level and applicable regulations
  • Model Card Generator β€” Structured documentation for AI models following industry best practices
  • Audit Trail Logger β€” Immutable logging of governance decisions, assessments, and compliance activities
  • Policy Templates β€” Ready-to-use AI governance policy templates in YAML/Markdown
  • FastAPI Service β€” REST API for integrating governance checks into CI/CD pipelines

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    AI Governance Framework                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   Risk       β”‚  Compliance  β”‚  Model Card   β”‚    Audit      β”‚
β”‚  Assessor    β”‚   Checker    β”‚  Generator    β”‚   Logger      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                     Template Engine (Jinja2)                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              Policy & Checklist Templates (YAML)             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                   Audit Storage (SQLite)                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

# Clone the repository
git clone https://github.com/onurcandonmezer/ai-governance-framework.git
cd ai-governance-framework

# Install dependencies
make install

# Run risk assessment on an AI system
python -m src.risk_assessor --name "Customer Chatbot" --domain "customer_service" --uses-personal-data

# Generate compliance checklist
python -m src.compliance_checker --regulation eu-ai-act --risk-level high

# Generate a model card
python -m src.model_card_generator --config examples/model_config.yaml

# Run the API server
make run

Usage Examples

Risk Assessment

from src.risk_assessor import RiskAssessor

assessor = RiskAssessor()
result = assessor.assess(
    system_name="HR Resume Screener",
    domain="employment",
    uses_personal_data=True,
    uses_biometric_data=False,
    is_safety_critical=False,
    autonomy_level="semi_autonomous",
    affected_population_size="large",
)

print(f"Risk Level: {result.risk_level}")        # HIGH
print(f"Risk Score: {result.risk_score}/100")     # 78/100
print(f"Key Risks: {result.key_risks}")
print(f"Mitigations: {result.recommended_mitigations}")

Compliance Checklist Generation

from src.compliance_checker import ComplianceChecker

checker = ComplianceChecker()
checklist = checker.generate_checklist(
    regulation="eu_ai_act",
    risk_level="high",
    system_type="decision_support",
)

for item in checklist.items:
    print(f"[{'x' if item.completed else ' '}] {item.requirement}")

Audit Logging

from src.audit_logger import AuditLogger

logger = AuditLogger(db_path="governance_audit.db")
logger.log_event(
    event_type="risk_assessment",
    system_name="HR Resume Screener",
    actor="governance_team",
    details={"risk_level": "high", "score": 78},
)

Tech Stack

Python FastAPI Jinja2 SQLite YAML Pydantic

Project Structure

ai-governance-framework/
β”œβ”€β”€ README.md
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ Makefile
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ risk_assessor.py          # Risk scoring engine
β”‚   β”œβ”€β”€ compliance_checker.py      # Checklist generator
β”‚   β”œβ”€β”€ model_card_generator.py    # Model card creator
β”‚   └── audit_logger.py           # Audit trail system
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ policies/                  # AI governance policy templates
β”‚   β”œβ”€β”€ checklists/               # Compliance checklists
β”‚   └── model_cards/              # Model card templates
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ test_risk_assessor.py
β”‚   β”œβ”€β”€ test_compliance_checker.py
β”‚   └── test_audit_logger.py
β”œβ”€β”€ docs/
β”‚   └── architecture.md
β”œβ”€β”€ assets/
└── .github/
    └── workflows/
        └── ci.yml

License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Built with a governance-first mindset by Onurcan DΓΆnmezer

About

Enterprise AI governance and compliance toolkit

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors