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.2.4

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.2.4
File Size Uploaded
agent_harness_aibom-0.2.4.tar.gz 44.5 kB Details

Built distribution (wheel)

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

Total release size: 97.5 kB

Release files / agent_harness_aibom-0.2.4.tar.gz

Download URL agent_harness_aibom-0.2.4.tar.gz
Size 44.5 kB
Tags Source
SHA-256 checksum
How to use checksums
19f423bc115d67ea41775e07a9c9945e8e8c69da27485159c540228f6e91d3b1
BLAKE2b-256 checksum
How to use checksums
e8881ac7ca8357acc66012ee841e60b4d23be76f67664e21ab42a82a2d67d202
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.2.4-py3-none-any.whl

Download URL agent_harness_aibom-0.2.4-py3-none-any.whl
Size 53.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b2084f189244bd5ac67541eb787cb28d7dd5ce1879864157c683a74b288d788
BLAKE2b-256 checksum
How to use checksums
3a39f73fca5c996732a3eb08849b71261b7aa3fa90937750c535baa6e5a6d2f1
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