Skip to main content

agent-harness-aibom

CI PyPI License: MIT

An AIBOM (AI Bill of Materials) generator for AI agent harnesses — currently Hermes and OpenClaw — that emits standard CycloneDX 1.6 JSON extended with harness-specific fields (skill fingerprints, MCP server TLS/auth posture, hook approval state, model provenance). See SPEC.md for the full data model and its rationale.

This is the "ground truth" layer for a broader exercise: scan a real harness with this tool, scan the same harness with a general-purpose scanner (e.g. Cisco AI BOM), and diff what each one saw.

Install

pip install agent-harness-aibom

or, with uv:

uv venv && source .venv/bin/activate && uv pip install agent-harness-aibom
# or, to match plain `pip install` above and skip the venv:
uv pip install --system agent-harness-aibom

For development, from a checkout:

uv sync --extra dev       # or: pip install -e ".[dev]"

Usage

# Auto-detect and scan whatever's installed under $HOME
harness-aibom scan --runtime auto -o aibom.json

# Scan a specific runtime explicitly
harness-aibom scan --runtime hermes -o hermes-aibom.json
harness-aibom scan --runtime openclaw -o openclaw-aibom.json

# Check a document's shape
harness-aibom validate aibom.json

# Compare two scans -- e.g. before/after a suspected skill compromise
harness-aibom diff before.json after.json

# Render a document as a single, offline, static HTML file
harness-aibom report aibom.json -o report.html

scan runs entirely against the local filesystem and local subprocesses/ HTTP calls (hermes/openclaw CLIs, Ollama's /api/tags). To scan a remote lab VM, install the package there (or SSH in and run it) — there's no built-in remote transport yet.

Missing pieces are never fatal: if hermes isn't on PATH, or Ollama isn't reachable, the scan still completes and prints a warning[...] line to stderr explaining what it skipped, so students can see exactly what partial information looks like.

Example output

examples/hermes-aibom.example.json and examples/openclaw-aibom.example.json were generated by running scan against the test fixtures in tests/fixtures/ (a synthetic config.yaml/openclaw.json, no live hermes/openclaw/ollama on this machine) — a realistic example of graceful degradation when the runtime binary isn't present. examples/hermes-aibom.example.html and examples/openclaw-aibom.example.html are the report rendering of those same two documents.

Project layout

src/harness_aibom/
├── model.py          # Component / HarnessDocument -- the in-memory data model
├── cyclonedx.py       # model.py -> CycloneDX 1.6 JSON
├── fingerprint.py      # sha256 helpers
├── validate.py         # structural checks on a harness-aibom document
├── diff.py             # before/after comparison
├── cli.py               # `harness-aibom` entrypoint
└── collectors/
    ├── base.py          # Collector ABC
    ├── ollama.py         # shared: model discovery via Ollama's HTTP API
    ├── mcp.py             # shared: MCP server extraction from a config dict
    ├── secrets.py          # shared: secrets-surface discovery (paths/perms only)
    ├── hermes.py            # Hermes collector
    └── openclaw.py          # OpenClaw collector

CI and publishing

  • .github/workflows/ci.yml runs the test suite and a CLI smoke test on every push and pull request, on Python 3.10, 3.11, and 3.12.
  • .github/workflows/publish.yml builds and publishes the package to PyPI when you publish a GitHub Release. It uses PyPI Trusted Publishing, so no password lives in this repo. Trusted publishing is already configured for this project on PyPI.

To ship a new version: bump version in pyproject.toml, commit, then publish a new GitHub Release with a matching tag (e.g. v0.1.1). The release triggers publish.yml, which builds and uploads it automatically.

Testing

pytest -q

Collector tests run entirely against fixtures under tests/fixtures/ (hermes_home/, openclaw_home/) with injected fake run/fetch functions — no real hermes/openclaw/ollama needed to run the suite.

Roadmap

v0.1 is live on PyPI — the spec plus two working collectors. Natural next steps, roughly in order:

  1. Harden hook parsing against a live Hermes box (see SPEC.md §5).
  2. Point this at the actual CAASP lab VMs and fix whatever the real output shapes get wrong.
  3. Scan the same harness with Cisco AI BOM and diff the two documents — the gap-analysis exercise this package exists to support.
  4. cosign signing/provenance for the emitted AIBOM.

Release files for agent-harness-aibom 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-harness-aibom 0.6.0
File Size Uploaded
agent_harness_aibom-0.6.0.tar.gz 69.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-harness-aibom 0.6.0
File Interpreter ABI Platform
agent_harness_aibom-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 149.6 kB

Release files / agent_harness_aibom-0.6.0.tar.gz

Download URL agent_harness_aibom-0.6.0.tar.gz
Size 69.0 kB
Tags Source
SHA-256 checksum
How to use checksums
edebd4ecf2c78b8f1c87f133789212e7db56c63aa607ca9e43062910896c753a
BLAKE2b-256 checksum
How to use checksums
15ceab798aeb55ba29d3d8e14ad8543cf5c53f3a8c03c78b22c4a4a7ee0c2394
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log

Release files / agent_harness_aibom-0.6.0-py3-none-any.whl

Download URL agent_harness_aibom-0.6.0-py3-none-any.whl
Size 80.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4801f22e589da85eeda726c7c253aba3126579529440c70123f61155cd634806
BLAKE2b-256 checksum
How to use checksums
fa6c9503d06f8e45db943d841612addc0b2ed5a5a6428e715eef65bd53027470
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page