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

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.

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

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.1.2
File Size Uploaded
agent_harness_aibom-0.1.2.tar.gz 21.7 kB Details

Built distribution (wheel)

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

Total release size: 45.6 kB

Release files / agent_harness_aibom-0.1.2.tar.gz

Download URL agent_harness_aibom-0.1.2.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d03ae0318f40d8defac08de397ef59d1efffc70b8c4576dd7a168296f5172f35
BLAKE2b-256 checksum
How to use checksums
42f11bb9e2133b2ae72206c650ee0962e2daec2adc10c17d9d3275080b9110de
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 8, 2026.

Transparency log

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

Download URL agent_harness_aibom-0.1.2-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a6244511749bba14a27b9877cb442a5bf9a97900ed1cd0dd48a9bb28d790a64
BLAKE2b-256 checksum
How to use checksums
5bdb6bcd99730e46f8abf810f6827b647429d9598b081a19b6a43a7b28f85670
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 8, 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