Skip to main content

aibom-scanner

Scan codebases for AI SDK usage. Map compliance risks to NIST AI RMF, ISO 42001, and EU AI Act.

PyPI License Python CI Zero Dependencies


Quick Start

pip install aibom-scanner

aibom-scanner scan --path /path/to/your/repo

aibom-scanner output

What It Finds

aibom-scanner detects AI SDKs in your codebase and generates an AI Bill of Materials (AIBOM) with compliance risk findings mapped to three frameworks.

70 detection patterns OpenAI, Anthropic, Google AI, AWS Bedrock, Cohere, Mistral, Groq, HuggingFace, and 21 more
Languages Python, JS/TS, Go, Java, Rust, Ruby, Swift, C#/.NET — imports, API calls, and dependency manifests
10 Chinese AI providers 3 BIS Entity-Listed (Zhipu, iFlytek, SenseTime = CRITICAL), 7 data sovereignty flagged
Agentic AI detection CrewAI, AutoGen, LangGraph, Semantic Kernel, MCP
34 risk rules 8 categories with evidence-qualified severity adjustment
48 compliance controls NIST AI RMF (23), ISO 42001 (15), EU AI Act (10)
Secrets detection Hardcoded API keys, Vault, AWS Secrets Manager, dotenv
Dev tool detection Cursor, GitHub Copilot, Claude Code, Aider, TabNine
Coverage accounting Every scan reports what it read — and what it could not
Zero dependencies Pure Python stdlib. Nothing to install but Python.

Coverage: what the scan actually read

An AI Bill of Materials that silently omits what it could not parse is not incomplete, it is wrong. Every scan reports its own denominator:

Scanned 86 of 173 source files (49.7%) — 86 test/fixture files excluded, 98.9% of source attempted

Two ratios, because either one alone misleads:

Field Meaning
coverage_pct files_scanned / source_files_seen — the honest headline. Every source file in the tree is in the denominator.
readable_coverage_pct files_scanned / (source_files_seen - skipped_by_path) — isolates scanner capability from the tests and fixtures deliberately excluded.

Quoting only the second would report ~99% for a scan that read half a repo.

Every unread source file is attributed to exactly one reason:

  • skipped_by_path — intentional exclusion (tests, fixtures, examples, vendor).
  • unscanned_by_extension — this scanner version cannot parse the language.

Languages the scanner cannot read are reported, never treated as clean. When any turn up, a warning is printed to stderr, the table output shows an INCOMPLETE COVERAGE block, and SARIF carries a toolExecutionNotification so the run reads as partial rather than silently green. Currently unreadable: .php, .scala, .clj, .ex, .exs, .dart, .cpp, .c, .h, .hpp, .m, .mm, .pl, .lua, .r, .jl, .ps1, .kts.

Observed vs inferred findings

Every finding carries an evidence_basis:

  • observed — backed by something in the scanned source (a detection, a provider).
  • inferred — a governance checklist item. Nothing in the source backs it.

Inferred findings reflect absence of evidence, not evidence of absence. Table output separates them into their own section, --severity-threshold ignores them, and SARIF does not emit them as code-scanning alerts — a governance checklist item is not a defect at a code location.

Output Formats

# Table output (default in terminal)
aibom-scanner scan --path . --format table

# JSON (default when piped) — includes coverage and evidence_basis
aibom-scanner scan --path . --format json > aibom.json

# SARIF for GitHub Code Scanning — observed findings only, coverage in run properties
aibom-scanner scan --path . --format sarif > results.sarif

# Fail CI on high/critical OBSERVED findings (exit 1)
aibom-scanner scan --path . --severity-threshold high

# Fail CI when the scanner could not read some languages (exit 3)
aibom-scanner scan --path . --fail-on-incomplete-coverage
Exit code Meaning
0 Scan completed, no gate tripped
1 Observed findings at or above --severity-threshold
2 Bad arguments, unreadable path, or interrupted
3 --fail-on-incomplete-coverage set and languages were unreadable

If both gates trip, 1 wins — an observed finding is more actionable than a coverage gap.

The coverage warning always goes to stderr, so piping --format json or --format sarif to a file yields clean, valid output.

GitHub Action

Add AI compliance scanning to every PR:

# .github/workflows/aibom-scan.yml
name: AIBOM Scan
on: [push, pull_request]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: saasvista/aibom-scanner@v1
        with:
          severity-threshold: high

AI Providers Detected

Category Providers
Major OpenAI, Anthropic, Google AI, AWS Bedrock, Azure OpenAI, Cohere, Mistral, Groq
Open Source HuggingFace, Together AI, Fireworks, Replicate
Chinese (BIS Entity List) Zhipu AI, iFlytek, SenseTime
Chinese (Data Sovereignty) DeepSeek, Alibaba Qwen, Baidu ERNIE, Moonshot, MiniMax, Baichuan, Yi
Agentic CrewAI, AutoGen, LangGraph, Semantic Kernel
Protocol MCP (Model Context Protocol)
Orchestration LangChain, LlamaIndex

Risk Categories

Category Rules Examples
Data Privacy 4 Missing DPA, data classification, prompt retention
Model Governance 8 No inventory, no versioning, supply chain risk
Security 4 Hardcoded keys, no input/output validation
Transparency 3 No AI disclosure, no decision logging
Accountability 3 No risk owner, no incident response plan
Bias & Fairness 2 No bias testing, no fairness evaluation
Export Compliance 4 BIS Entity List, data sovereignty, EU AI Act
Agentic AI 5 No HITL, no access controls, no observability

Compliance Frameworks

Framework Controls Coverage
NIST AI RMF 23 GOVERN, MAP, MEASURE, MANAGE functions
ISO 42001 15 AI management system requirements
EU AI Act 10 Articles 5-52, high-risk classification

How It Works

Your Codebase
     │
     ▼
┌─────────────┐     ┌──────────────┐     ┌─────────────┐     ┌────────────────┐
│ File Walker  │────▶│  AI SDK      │────▶│ Risk Engine │────▶│ Control Mapper │
│ git ls-files │     │  Detector    │     │ 34 rules    │     │ 48 controls    │
│ os.walk      │     │  70 patterns │     │ 8 categories│     │ 3 frameworks   │
└─────────────┘     └──────────────┘     └─────────────┘     └────────────────┘
                           │                    │                     │
                    Detections +          Risk findings         Gap analysis
                    model names +         with severity         NIST / ISO /
                    dependencies          qualification         EU AI Act
                                                                     │
                                                                     ▼
                                                              Table / JSON / SARIF

Why This Exists

We scanned 5 popular open-source AI repos (470K combined GitHub stars):

  • 389 AI SDK detections
  • 116 compliance findings
  • 0 governance controls fully mapped

One enterprise security company had a BIS Entity-Listed Chinese AI provider inherited silently through an acquisition.

EU AI Act enforcement starts August 2026. If you don't know what AI SDKs are in your codebase, you can't govern them.

Contributing

Contributions welcome. See CONTRIBUTING.md for guidelines.

  • Add detection patterns — new AI providers, SDKs, or frameworks
  • Improve risk rules — better severity calibration, new categories
  • New output formats — CycloneDX, SPDX, HTML reports
  • Language support — Go, Rust, Java detection improvements

License

Apache-2.0. See LICENSE.


Built by SaaSVista — AI Risk & Compliance Copilot

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aibom_scanner-1.2.0.tar.gz (142.5 kB view details)

Uploaded Source

Built Distribution

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

aibom_scanner-1.2.0-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file aibom_scanner-1.2.0.tar.gz.

File metadata

  • Download URL: aibom_scanner-1.2.0.tar.gz
  • Upload date:
  • Size: 142.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for aibom_scanner-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ed332b802263a27fa51a8fa44a96b5abfce93b54eecebc2f571d1a58877bff3a
MD5 2d64c72709e8adac65b85ab999f5ada4
BLAKE2b-256 ab8046635749e3e0306d292455d9ac503e0244482a4a4343ba49b35d65ec252a

See more details on using hashes here.

Provenance

The following attestation bundles were made for aibom_scanner-1.2.0.tar.gz:

Publisher: publish.yml on saasvista/aibom-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 aibom_scanner-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: aibom_scanner-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for aibom_scanner-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aac97bdea67f695a3c50211a55fceffeddf4eb1ad478006467871dbf221efec
MD5 d95285e2a991434522f4a9c0e7b45eb9
BLAKE2b-256 dc4b28b2cbd3cc854898f62d97da87d7bcda0d3546de333475a3673a24f10f56

See more details on using hashes here.

Provenance

The following attestation bundles were made for aibom_scanner-1.2.0-py3-none-any.whl:

Publisher: publish.yml on saasvista/aibom-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 Sentry Error logging StatusPage Status page