Skip to main content
brox - AI-BOM Generator and Capability Diff Tool for MCP and Agents

AI-BOM Generator and Capability Diff Tool for MCP and Agents

License: Apache 2.0 Security Policy PRs welcome

brox scans a repo, produces an AI-BOM, and generates a capability diff (the "power change" in a PR): new MCP tools, widened filesystem scopes, new model egress, system prompt edits, new agent frameworks, etc. Then it gates merges with policy-as-code.

Don't just track code changes. Track Power changes.

Quick Start

Installation

pip install brox

Or install from source:

git clone https://github.com/yourusername/brox.git
cd brox
pip install -e .

Usage

1. Scan a repository

brox scan --repo . --out head.aibom.json

This generates an AI-BOM (Bill of Materials) in CycloneDX format, containing:

  • MCP servers and their capabilities
  • Prompts (file-based and inline)
  • LLM provider endpoints
  • Agent frameworks
  • Network egress domains

2. Compare two AI-BOMs

brox diff --base base.aibom.json --head head.aibom.json --out capdiff.json --md capdiff.md

This generates:

  • capdiff.json: Structured capability diff
  • capdiff.md: Human-readable markdown report for PRs

3. Gate with policy

brox gate --diff capdiff.json --policy policy.yaml

Exit codes:

  • 0: Pass
  • 2: Policy blocked (fail CI)
  • 3: Internal error

What brox Detects

MCP Servers

  • Configuration files: mcp.json, mcp.yaml, servers.json
  • Extracted capabilities:
    • filesystem.read / filesystem.write with scopes
    • exec.shell for shell execution
    • db.read / db.write for database access
    • network.egress for network tools

Prompts

  • File-based: .prompt, .jinja, .jinja2, .md files in prompts/, agents/, system/ directories
  • Inline: Multiline strings (≥200 chars) near LLM client calls
  • Risk signals: "ignore previous", "bypass safety", "exfiltrate", "reveal secrets"

LLM Providers & Egress

  • OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Cohere
  • Generic HTTP egress to external domains
  • Maps to network.egress capabilities

Agent Frameworks

  • LangChain, LlamaIndex, Autogen, CrewAI, Semantic Kernel, Haystack

Policy Configuration

Create a policy.yaml file to define rules:

version: 1
rules:
  - id: block-shell-exec
    when:
      capability_added: "exec.shell"
    action: block
    message: "Shell execution introduced. Requires security approval."

  - id: block-broad-fs-write
    when:
      capability_added: "filesystem.write"
      scope_matches_any:
        - "/**"
        - "/etc/**"
        - "~/.ssh/**"
        - "**/*.pem"
    action: block
    message: "Broad filesystem write introduced."

  - id: warn-system-prompt-change
    when:
      asset_changed_kind: "prompt"
      prompt_type: "system"
    action: warn
    message: "System prompt changed. Review for jailbreak/injection patterns."

Policy Actions

  • block: Fail CI (exit code 2)
  • warn: Pass CI but annotate
  • require_approval: Fail CI unless approval signal present (e.g., PR label)

Condition Syntax

  • capability_added: Match new capabilities
  • capability_widened: Match expanded scopes
  • asset_added_kind: Match new assets by kind
  • asset_changed_kind: Match changed assets by kind
  • scope_matches_any: Glob patterns for scope matching

GitHub Action Integration

Add .github/workflows/brox.yml:

name: brox — Capability Diff

on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  brox:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write

    steps:
      - name: Checkout head
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install brox
        run: pip install brox

      - name: Scan HEAD
        run: brox scan --repo . --out head.aibom.json

      - name: Checkout base
        run: git checkout origin/${{ github.base_ref }}

      - name: Scan BASE
        run: brox scan --repo . --out base.aibom.json

      - name: Diff + Gate
        run: |
          git checkout ${{ github.sha }}
          brox diff --base base.aibom.json --head head.aibom.json --out capdiff.json --md capdiff.md
          brox gate --diff capdiff.json --policy policy.yaml

      - name: Upload artifacts
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: brox
          path: |
            base.aibom.json
            head.aibom.json
            capdiff.json
            capdiff.md

AI-BOM Format

brox generates CycloneDX-compatible AI-BOMs with custom properties:

{
  "$schema": "https://cyclonedx.org/schema/bom-1.5.schema.json",
  "bomFormat": "CycloneDX",
  "specVersion": "1.5",
  "version": 1,
  "metadata": {
    "timestamp": "2026-02-11T00:00:00Z",
    "tools": [{"vendor": "brox", "name": "brox", "version": "0.1.0"}]
  },
  "components": [
    {
      "type": "service",
      "name": "mcp-server:filesystem-server",
      "bom-ref": "mcp_server:filesystem-server",
      "properties": [
        {"name": "brox.ai.asset.kind", "value": "mcp_server"},
        {"name": "brox.location.file", "value": "mcp.json"}
      ]
    }
  ],
  "services": [
    {
      "name": "brox.ai.capabilities",
      "properties": [
        {
          "name": "brox.capability.record",
          "value": "cap=filesystem.write;scope=./data/**;evidence=mcp.json:12;asset=mcp_server:filesystem-server"
        }
      ]
    }
  ]
}

Risk Scoring

brox automatically assesses risk levels:

  • Low: No significant changes
  • Medium: New egress domain, agent framework, or system prompt change
  • High: Shell execution, sensitive filesystem access, database writes
  • Critical: Shell exec + broad filesystem write, or sensitive paths + egress

Development

Setup

git clone https://github.com/yourusername/brox.git
cd brox
pip install -e ".[dev]"

Run Tests

pytest

Code Formatting

black brox/
ruff check brox/

License

Apache 2.0

Contributing

Contributions welcome! Please open an issue or PR.

Roadmap

  • TypeScript/JavaScript language support
  • Capability provenance tracking
  • CODEOWNERS-based approval workflows
  • AI-BOM registry for org dashboards
  • Secret/PII flow analysis
  • Plugin system for custom detectors

Capabilities + diff + gate + evidence. Not "security theater," not "SBOM spam," just power deltas in PRs.

Metadata

Release files for brox 0.1.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 brox 0.1.0
File Size Uploaded Provenance
brox-0.1.0.tar.gz 574.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for brox 0.1.0
File Interpreter ABI Platform
brox-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 603.8 kB

Release files / brox-0.1.0.tar.gz

Download URL brox-0.1.0.tar.gz
Size 574.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c39edc0de02a7fe7a589d7ac9050e7cf81b2459ffd428c183720cd4e2d2185e8
BLAKE2b-256 checksum
How to use checksums
47ea89a91e2ab5225275158d6be55ffe7f2d49cbe36cb3b338b0826c36a48805
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.9

Release files / brox-0.1.0-py3-none-any.whl

Download URL brox-0.1.0-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5233d1695e0549049dc779255c389056c59641eb426bf1abaa9efbcffd2396ba
BLAKE2b-256 checksum
How to use checksums
8c3c9ac50ac459a6d7d59c9896830dbf4b6462fcaaf3b5c51e642be09d16d09e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.9

Security for brox 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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