AI Model Manifest (AIBOM)

CycloneDX 1.6 ML-BOM emitter for AI bills of materials. EU AI Act Art. 11 + Annex IV require technical documentation for high-risk AI systems; the EU CRA (Regulation (EU) 2024/2847) transposition deadline (2027-12-11) extends SBOM-style documentation to AI components in products with digital elements. ML-BOM extends the CycloneDX 1.5 machine-learning component type with model-card, dataset, hyperparameter, formulation, and external-service sections per the OWASP CycloneDX Authoritative Guide to AI/ML-BOM and CycloneDX spec issue #702 (EU CRA alignment).

Two paths: - build({...}) constructs a 1.6-conformant JSON BOM in memory. - sign(bom, { privateKeyPem }) signs the canonical-JSON-1785 representation with the operator's signing key (ML-DSA-87 by default per project hard-rule 2). verify(envelope, publicKeyPem) re-canonicalizes and checks before trusting any field.

Self-validation: build rejects BOMs missing CycloneDX 1.6 required fields (bomFormat, specVersion, metadata.timestamp, metadata.component when shipping a model). Catches malformed inputs at emit time, not at downstream validator.

b.ai.modelManifest.build(opts) #

stable0.10.8eu-ai-act-art-11nist-ai-600-1iso-42001iso-23894
{
  model:           object,        // { name, version, license?, bom-ref?, modelCard? }
  datasets:        object[],      // [{ name, type?, contents?, classification?, ... }]
  hyperparameters: object,        // kv pairs → properties[]
  formulation:     object[],      // [{ ref, components, workflows }]
  services:        object[],      // [{ name, endpoints, authenticated }]
  tool:            object,        // tool metadata; defaults to blamejs core
  timestamp:       string,        // ISO 8601 UTC; defaults to now
  serialNumber:    string,        // urn:uuid:...; defaults to fresh UUIDv4
}

Build a CycloneDX 1.6 ML-BOM JSON document for the supplied model + datasets + hyperparameters + formulation + external services. Returns a frozen plain object ready for sign({...}) or direct serialization. Validates against the spec's required-field set at emit time (bomFormat / specVersion / metadata.timestamp / metadata.component) plus the ML-BOM-specific shape (model component type, dataset type vocabulary, bom-ref grammar).

var bom = b.ai.modelManifest.build({
  model: { name: "acme-classifier", version: "1.2.3" },
  datasets: [{ name: "training-2026", type: "dataset" }],
});
bom.bomFormat;   // → "CycloneDX"
bom.specVersion; // → "1.6"

b.ai.modelManifest.sign(bom, opts) #

stable0.10.8eu-ai-act-art-11
{
  privateKeyPem:  string,        // PEM-encoded private key
  audit:          boolean,        // default true
}

Sign an AIBOM produced by build({...}). Signature is over the canonical-JSON-1785 representation of the BOM (deterministic byte stream regardless of object-key insertion order); the operator's privateKeyPem selects the signing alg (ML-DSA-87 by default per the project's PQC-first crypto rule). Returns { bom, signature } where signature is base64-encoded.

var pair = b.crypto.generateSigningKeyPair("ml-dsa-87");
var bom = b.ai.modelManifest.build({ model: { name: "x", version: "1" }});
var env = b.ai.modelManifest.sign(bom, { privateKeyPem: pair.privateKey });
typeof env.signature; // → "string"

b.ai.modelManifest.verify(envelope, publicKeyPem, opts) #

stable0.10.8eu-ai-act-art-11
{
  audit:           boolean,        // default true
}

Verify an envelope produced by sign(bom, {...}). Re-canonicalizes the BOM with canonicalJson.stringify (NEVER trusts an embedded "signedBytes" field — defends the CVE-2025-29774 / CVE-2025-29775 xml-crypto-style signature-substitution class) and checks the signature with b.crypto.verify against the supplied public-key PEM. Returns { valid, bom, reason }; never throws.

var result = b.ai.modelManifest.verify(envelope, pair.publicKey);
if (!result.valid) console.log(result.reason);

Last updated 2026-08-08T16:39:49.652Z by seeder.