Observed since 21 Oct, 10:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Security and risk analysis tool for AI projects (AI-BOM).
What is it?
AI-BOM Inspector is an offline-first, deterministic risk engine for AI supply chains. Feed it an AI project (SBOM + model artifacts) and it returns a policy decision, an evidence-backed report, and CI-friendly outputs designed for automated enforcement.
Killer workflow (one command demo)
Give AI-BOM Inspector an AI project's SBOM and model artifacts → it determines supply-chain risk → explains why → maps affected systems → produces evidence → enforces policy.
AI project ↓ SBOM + model artifacts ↓ AI-BOM Inspector ├── Dependency analysis ├── Model analysis ├── Vulnerability intelligence ├── Provenance └── License analysis ↓ Deterministic risk engine (single source of truth) ↓ Policy decision ↓ Evidence + report + CI result
Architecture (data flow)
graph LR
Input["SBOM / Models / Metadata / Threat Intel"] --> Engine["Deterministic Risk Engine"]
Engine --> Policy["Policy Decision (block/allow/flag)"]
Engine --> Graph["Evidence Graph Context (impact & explain)"]
Policy --> Output["Report / CI / Enforcement / Annotations"]
One-command golden demo
demo/golden-vulnerable-ai.demo/golden-vulnerable-ai/applications.json; the runner merges it into the generated report so impact analysis can map models → apps → owners.PYTHONPATH=src bash demo/golden-vulnerable-ai/run_demo.sh
Quick impact example (after the run):
# Show merged applications in the report
jq '.applications' demo/golden-vulnerable-ai/report.json
# Run a blast-radius check for a CVE using the built-in graph impact helper
python -c "from aibom_inspector.graph import impact; exit(impact('demo/golden-vulnerable-ai/report.json','CVE-2024-XXXX'))"
What changed in this branch (enterprise upgrades)
.github/security for safer runtime tracing.block_legacy_pickles policy, scripts/check_for_pickles.py, and GitHub Actions to run validators and demo tests; CI emits policy_action and policy_failures in report JSON for easy automation.Why this matters (differentiators)
Quick show-me
Run the demo, open demo/golden-vulnerable-ai/report.json, and run pytest tests/test_golden_demo.py to see the claim→proof assertion.
Full feature list and deeper docs follow below.
ai-bom-inspector/
crates/
core/ # parsing, normalization, scoring (Rust extension)
licenses/ # license rules, SPDX mapping
advisories/ # CVE ingestion adapters (OSV/NVD/etc)
report/ # JSON/MD/SARIF outputs + diff support
src/ # Python package (aibom_inspector)
policies/
examples/
default.yml
strict.yml
oss-friendly.yml
schemas/
policy.schema.json
report.schema.json
integrations/
github-action/ # composite action wrapper for CI
pre-commit/ # reusable hook definition
docs/
QUICKSTART.md
POLICY.md
SCORING.md
FAQ.md
.github/
workflows/
ci.yml
scan-pr.yml # runs on PR and posts summary
tests/
README.md
requirements.txt, pyproject.toml), JavaScript (package.json / package-lock.json), Go (go.mod), and Java (pom.xml)--sbom-file) and export CycloneDX or SPDX alongside AI-BOM extensionsfrom_pretrained loads, pipeline configs) directly from your repo--online --enable-shadow-uefi-intel is usedThe default reports only use deterministic heuristics; the "AI summary" field is generated offline from the scan findings so teams get an executive-ready summary without hosted inference.
--offline is the default and hard-blocks every remote call. Expect [OFFLINE_MODE] / [CVE_LOOKUP_SKIPPED] annotations in reports when enrichment is skipped.--online to allow outbound calls, then enable specific feeds (e.g., --with-cves, --model-id, --enable-shadow-uefi-intel) to choose what actually dials out.--local-only (or keep --safe-mode enabled) to enforce zero outbound fetches even if --online is set.| Endpoint | When it fires | Data sent | How to disable |
|---|---|---|---|
https://api.osv.dev/v1/query (or OSV_API_URL) | --online and --with-cves | JSON body containing package.name, package.ecosystem, and version for each dependency | Default offline; omit --with-cves; keep --offline; or point OSV_API_URL to an internal mirror |
https://huggingface.co/api/models/<id> (or huggingface_hub SDK) | --online with --model-id or models whose source is huggingface | Model identifier only; response cached locally | Default offline; avoid --online; or provide a fully populated models.json |
| GitHub API for Shadow-UEFI-Intel | --online and --enable-shadow-uefi-intel | Repository metadata fetch; no project data sent | Default is disabled; leave --enable-shadow-uefi-intel off or keep --offline enabled |
Local model advisory/hash databases (model_vulnerability_db.json, model_hash_reputation.json) | Always local unless you point to a custom URL | None (local JSON only) | Use defaults or pass --model-advisory-db / --model-hash-db |
| Future feeds | Any new integrations (documented as added) | Varies by feed | Default offline; disable the specific feature flag; or run with --offline |
Timeouts can be tuned via --osv-timeout, --shadow-uefi-timeout, or the OSV_API_TIMEOUT / SHADOW_UEFI_INTEL_TIMEOUT environment variables.
pip install "aibom-inspector @ git+https://github.com/aibom-inspector/AI-BOM-Inspector.git@v.2.0"
pip install -e .[dev]
python -m build will produce a .whl under dist/ for airgapped installs.python -m build
pip install cyclonedx-bom
cyclonedx-py -o aibom-inspector-sbom.json
Create a models.json file if you want to include model metadata (auto-discovery will still pull model IDs out of your code/configs when this is omitted). A ready-to-use sample lives in examples/models.sample.json:
[
{"id": "gpt2", "source": "huggingface", "license": "mit", "last_updated": "2024-01-01"},
{"id": "custom-embedder", "source": "private"}
]
Run the scanner (auto-detects dependency files when present):
aibom scan --models-file models.json --format html --output report.html
Run aibom scan --help for the full list of options and supported formats.
Network calls are off by default; add --online (plus flags like --with-cves or --model-id) if you want remote enrichment.
End-to-end demo (examples/demo/): tiny app with requirements.txt, pyproject.toml, package-lock.json, go.mod, models.json, and generated aibom-report.json/md/html.
examples/demo/aibom-report.htmlexamples/demo/aibom-report.mddocs/screenshots/before-after.htmlSmall JSON excerpt (full file in examples/demo/aibom-report.json):
{
"stack_risk_score": 30,
"risk_breakdown": {"unpinned_deps": 3, "unverified_sources": 0, "unknown_licenses": 1, "stale_models": 1},
"dependencies": [{"name": "urllib3", "issues": ["[KNOWN_VULN] CVE-2019-11324: CRLF injection when retrieving HTTP headers"]}],
"models": [{"id": "gpt2", "issues": ["[STALE_MODEL] Model metadata is stale", "[MODEL_VULNERABILITY] Advisory feed match (model_vulnerability_db.json)"]}]
}
Screenshots:
examples/demo/aibom-report.htmlexamples/demo/aibom-report.mddocs/screenshots/before-after.htmlSample models file: examples/models.sample.json
Sample Markdown report: examples/report.sample.md
Example commands:
aibom scan --format jsonInclude models from a file: aibom scan --models-file examples/models.sample.json --format markdown --output report.md
Specify models inline: aibom scan --online --model-id gpt2 --model-id meta-llama/Llama-3-8B --format html
Enrich CVEs during the scan: aibom scan --online --with-cves --format json
Use local model advisory and hash feeds: aibom scan --models-file models.json --model-advisory-db feeds/model_vulnerability_db.json --model-hash-db feeds/model_hash_reputation.json
Apply training source fingerprints: aibom scan --models-file models.json --training-source-db feeds/training_source_fingerprints.json
Include non-Python manifests: aibom scan --manifest package-lock.json --manifest go.mod --format json
Import an SBOM: aibom scan --sbom-file path/to/cyclonedx.json --format html --output merged-report.html
Run fully offline (no OSV/HF calls): aibom scan --format markdown
Require inputs or fail fast: aibom scan --require-input
Export CycloneDX: aibom scan --format cyclonedx --sbom-output aibom-cyclonedx.json
Fail CI if health score < 70: aibom scan --fail-on-score 70 --format html
Inspect model weights directly (detect NaNs/LSB steganography): aibom weights my_model.safetensors --json
aibom diff aibom-report-old.json aibom-report-new.jsonSee docs/HIGHEST_IMPACT_NEXT_MOVES.md for the capabilities that enable the end-to-end discover → enforce loop, policy-as-code UX, and GitHub-native SARIF outputs.
See docs/ENTERPRISE_TRUST_BASELINE.md for the deal-maker controls around provenance/signing, artifact integrity, and dependency trust enforcement that enterprises expect in CI/CD rollouts.
aibom scan --sbom-file examples/demo/aibom-report.json --format markdown --output before.md --fail-on-score 70MISSING_PIN for multiple deps, UNKNOWN_LICENSE on the model, STALE_MODEL, demo KNOWN_VULN entry, and UNVERIFIED_SOURCE.stack_risk_score ≈ 50 and exit code 1 because it failed the --fail-on-score 70 gate.aibom scan --sbom-file examples/demo/aibom-report.json --models-file examples/models.sample.json --format markdown --output after.md --fail-on-score 70 --online --with-cvesCVE hits (if any) plus minor governance nits; pins and licenses quiet down once manifests and model metadata are cleaned up.stack_risk_score in the high 80s and exit code 0, making it CI-safe.CycloneDX and SPDX exports include AI-BOM extension data (e.g., aibom:source, license category, risk score, and issues) alongside the standard SBOM fields. See docs/ai-bom-extensions.md for the JSON schema and how each extension maps into CycloneDX properties and SPDX summaries.
schemas/report.schema.json tracks the AI-BOM JSON conventions and is structured to align with the TAIBOM-style trust/attestation fields emerging in the community (e.g., explicit model source, license, provenance, and risk signals).aibom:* properties into vendor-neutral fields so the output can slot into existing SBOM pipelines without custom parsers.docs/credibility-pack/ ships SBOM slices, a repo list, and a scoreboard you can rerun to validate detection heuristics and false-positive rates.See docs/OUTPUTS.md for a side-by-side JSON, SARIF, and CycloneDX example plus guidance on when to use each.
--fail-on-score 70, require allowlisted model sources (--require-input plus allowlist rules in policies/examples/*), and keep --offline as the default posture.aibom scan --format json --output aibom-report.json --fail-on-score 70 in CI, then publish CycloneDX/SPDX via --format cyclonedx or --format spdx for downstream compliance jobs. Locally, add --format html or --format markdown for readability and iterate with --diff against previous runs.docs/POLICY_COOKBOOK.md for OSS-friendly, enterprise-strict, and regulated defaults that can be copied into your own policy file (HIPAA, SOC 2, ISO/IEC 42001 packs are in policies/examples/).Configuration tips:
--osv-url or OSV_API_URL and adjust the HTTP timeout via --osv-timeout or OSV_API_TIMEOUT.--model-advisory-db, --model-hash-db, --license-risk-db, and --training-source-db when you want to point at internal mirrors or curated feeds.AI-BOM Inspector ships with lightweight, explainable checks that map to common AI supply-chain issues:
| Code | What it means | Severity |
|---|---|---|
MISSING_PIN | Dependency version not pinned with ==/~= | High |
LOOSE_PIN | Dependency uses a range (>=, <=, etc.) | Medium |
UNSTABLE_VERSION | Pre-1.0 releases that may churn | Medium |
KNOWN_VULN / CVE | Known vulnerable versions (built-in heuristics + optional OSV lookup; recommends safer versions when known) | High |
LICENSE_RISK | Copyleft / reciprocal terms detected for a model | Medium |
MODEL_LICENSE_RESTRICTED | Restricted or custom model license detected (OpenRAIL, research-only, etc.) | Medium |
PROPRIETARY_AI_RISK | Proprietary model license may limit auditability or reuse | Medium |
UNKNOWN_LICENSE | Model or SBOM component lacks license metadata | High |
STALE_MODEL | Model metadata older than ~9 months | Medium |
UNVERIFIED_SOURCE | Non-standard model source value | Medium |
MODEL_VULNERABILITY | Model flagged by a vulnerability/advisory feed | High |
MODEL_HASH_MALICIOUS | Model hash matches a malicious fingerprint | High |
MODEL_WEIGHT_ANOMALY | Safetensors inspection detected poisoned/steganographic weights | High |
PICKLE_DANGEROUS_GLOBALS | Pickle checkpoint references dangerous globals | High |
MODEL_LINEAGE_RISK | Base model lineage contains license or vulnerability risk | Medium |
MODEL_LINEAGE_UNKNOWN | Base model lineage not present in scan context | Medium |
FINE_TUNE_INHERITANCE_RISK | Fine-tune inherits high-risk findings from base model | High |
DATASET_CONTAMINATION_RISK | Training sources suggest contamination or policy exposure | High |
TRAINING_SOURCE_RISK | Training source requires additional governance review | Medium |
SUPPLY_CHAIN_ANOMALY | Model hash mismatch or artifact integrity anomaly detected | High |
MODEL_HASH_INVALID | Declared model hash is not a valid SHA256 fingerprint | Medium |
MODEL_HASH_MISSING | Model artifacts present without declared hashes | Medium |
OFFLINE_MODE / CVE_LOOKUP_SKIPPED | Scan ran offline or without network dependencies; no remote enrichment performed | Low |
METADATA_UNAVAILABLE | Model registry/API could not be reached; metadata reused from cache with a warning | Low |
INVALID_SBOM | SBOM could not be parsed; flagged as an issue instead of crashing the scan | Medium |
The report shows a stack_risk_score (0–100, higher is healthier) and a risk_breakdown capturing unpinned deps, unverified sources, unknown licenses, stale models, and CVE hits. Tune the scoring with --risk-max-score, per-severity --risk-penalty-* flags, and governance/CVE penalties so teams can calibrate what “red” means for them. Conceptually, this is a health score: penalties are subtracted from the maximum, so --fail-on-score 70 means “fail if health drops below 70/100.”
risk_settings.max_score (default 100) and subtract penalties instead of adding danger points.risk_settings.penalty_for(severity) (default high=8, medium=4, low=2).governance_penalty for each unpinned dependency and unverified model source; CVE hits subtract cve_penalty to emphasize known exploit paths.active_exploitation_penalty, ensuring live exploitation signals dominate baseline severity math.max_score, giving you a “health score” you can fail CI on via --fail-on-score.--fail-on-score 70 while teams pilot the tool; after triage, ratchet up to 80 once noisy signals are addressed.MISSING_PIN / LOOSE_PIN: add explicit == pins (or ~= if you must) and commit lockfiles.UNKNOWN_LICENSE / LICENSE_RISK: annotate licenses in models.json and prefer permissive alternatives when available.STALE_MODEL: update to a fresher model release or document a waiver in models.json.KNOWN_VULN / CVE: upgrade to the suggested safe version; if blocked, add a comment in your SBOM or pin to a patched fork.UNVERIFIED_SOURCE: source models from trusted registries (Hugging Face, internal artifactory) and record provenance.OFFLINE_MODE / CVE_LOOKUP_SKIPPED: rerun with network access before shipping to ensure enrichment isn’t missing critical advisories.OFFLINE_MODE / CVE_LOOKUP_SKIPPED so reviewers know enrichment was suppressed.INVALID_SBOM issues and ignored otherwise; well-formed CycloneDX/SPDX inputs are merged into the dependency set.METADATA_UNAVAILABLE, but license/freshness signals may be stale until the registry is reachable again.AI-BOM Inspector attaches explicit AI threat categories and STRIDE classifications to model findings. Mappings are surfaced in the report framework section and can be tailored via a local taxonomy file:
src/aibom_inspector/data/ai_threat_taxonomy.jsonaibom scan --threat-taxonomy-db path/to/ai_threat_taxonomy.jsondocs/THREAT_TAXONOMY.md for the default taxonomy and extension guidance.Model risk intelligence is local-first. You can ship curated JSON feeds in-repo or pull them from internal mirrors:
model_vulnerability_db.json (use --model-advisory-db to override)model_hash_reputation.json (use --model-hash-db to override)license_risk_db.json (use --license-risk-db to override)training_source_fingerprints.json (use --training-source-db to override)| Scenario | Risk score | Signals |
|---|---|---|
| Messy AI stack | 48/100 | Unpinned package-lock.json, unknown model license, stale model metadata |
| Hardened AI stack | 88/100 | All deps pinned, permissive licenses, fresh model metadata, no advisories |
aibom scan --requirements requirements.txt --models-file models.json --with-cves --format html --output report.html \
--risk-penalty-high 10 --risk-penalty-medium 5 --risk-penalty-low 2
Pair it with aibom diff report-old.json report-new.json to highlight PR drift, or run in CI with --fail-on-score 70.
Baseline timings below were captured on the included demo project to give teams a starting point. Re-run in your own CI to capture local baselines:
| Scenario | Command | Result |
|---|---|---|
| Demo project scan | PYTHONPATH=src python -m aibom_inspector.cli scan --requirements examples/demo/requirements.txt --pyproject examples/demo/pyproject.toml --manifest examples/demo/package-lock.json --manifest examples/demo/go.mod --models-file examples/demo/models.json --format json --output /tmp/aibom-report.json | 2.16s real (container, Python 3.10.19) |
Use /usr/bin/time -p or your CI timing metrics to capture project-specific numbers (dependency count, model count, and total runtime).
pytest.github/workflows/scan-pr.yml uses the bundled composite action to scan PRs and post a risk comment.--online --with-cves when you want CVEs):
name: AI-BOM Inspector
on: [pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install AI-BOM Inspector
run: pip install aibom-inspector
- name: Scan AI stack and emit SARIF + Markdown
run: >-
aibom scan --format sarif --output aibom-report.sarif --markdown-output aibom-report.md
--fail-on-score 75 --require-input
- name: Upload SARIF to GitHub Security
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: aibom-report.sarif
- name: Upload Markdown artifact
uses: actions/upload-artifact@v4
with:
name: aibom-report
path: aibom-report.md
--offline unless you need enrichments; when allowed, add --online --with-cves to the scan step and adjust allowlists accordingly.pyproject.toml and tracks the changelog.aibom-inspector name; until then, install from source (pip install -e .[dev]) or lock to a tag tarball.SECURITY.md for how to report vulnerabilities.CODE_OF_CONDUCT.md for community standards.CONTRIBUTING.md for development conventions and how to propose changes.CHANGELOG.md tracks notable updates.The following capabilities were recently added to support enterprise-grade AI supply-chain workflows. Quick enablement notes are included where relevant.
CycloneDX 1.7 & SPDX 3.0 exporters: canonical JSON exporters and a CycloneDX 1.7 schema validator. Use --format cyclonedx or --format spdx and see schemas/cyclonedx-1.7.schema.json for validation rules.
Policy enforcement to block legacy Pickle formats (.pkl/.pt): enable with a policy that sets block_legacy_pickles: true or run the CI check (scripts/check_for_pickles.py) which fails PRs and posts remediation guidance.
Read-only Pickle VM & containerized sandbox: a pickle opcode emulator (src/aibom_inspector/pickle_vm.py) and a Docker-based sandbox runner (scripts/pickle_sandbox_runner.py) produce guarded traces (no deserialization). For hardened runs, the runner accepts --seccomp and --apparmor options; self-hosted runners are recommended.
Dynamic findings integration: sandbox traces are parsed and converted into integrity findings and fed into the policy/risk engine (see src/aibom_inspector/dynamic_analysis.py and src/aibom_inspector/pickle_sandbox.py). Dynamic findings affect stack_risk_score and policy evaluations.
Attestation helpers (sigstore-friendly): attestation payload builders and a sigstore-friendly signing fallback (src/aibom_inspector/attestation_sigstore.py) so CI can emit provenance artifacts. Enable full Sigstore signing by provisioning signing keys / OIDC in CI.
CI automation: .github/workflows/export-validate.yml runs exporter tests, policy checks, posts remediation PR comments, creates Checks API annotations, and (on self-hosted runners) runs the sandbox and uploads traces.
See the linked docs for detailed configuration and operational guidance (Enterprise Control Plane, Enterprise Trust Baseline, and POLICY_COOKBOOK).
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0 | 15 Aug 2026 | 13 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 10:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:681bc6868f87dbceea95752d4a4a356c2771d2c63c8f355e68db0c2c2c13733c