Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

AssuranceLab

AssuranceLab is an evidence-first Python library for building reviewable cyber-assurance decisions. It connects business objectives, service dependencies and control requirements to attributable evidence, then returns an explicit decision with the evidence identities and reasons that produced that decision.

The library is designed for bounded labs, Docker-based evaluation and assurance workflow development. It is not a certification service, SIEM, EDR, scanner or replacement for a qualified auditor.

Documentation · Learning path · Guide catalog · API reference

Install

The initial public release is a prerelease and requires Python 3.11 or later:

python -m pip install --pre assurance-lab

Import the package with an underscore:

import assurance_lab

The base installation has no third-party runtime dependencies.

First assurance decision

The example below defines one service requirement, converts a versioned JSON observation into typed evidence, and evaluates the requirement at an explicit UTC time.

from datetime import datetime, timezone

from assurance_lab import (
    AssuranceEngine,
    MappingEvidenceAdapter,
    compile_service_contract,
    ingest_json_envelope,
)

now = datetime.now(timezone.utc)

contract = compile_service_contract({
    "service_id": "checkout",
    "name": "Payment checkout",
    "controls": [{
        "control_id": "backup",
        "title": "Backup is fresh",
        "assertion": "backup_fresh",
        "expected_value": True,
    }],
    "objectives": [],
    "dependencies": [],
})

payload = {
    "schema_version": "assurance-telemetry/v1",
    "records": [{
        "evidence_id": "backup-1",
        "subject": "checkout",
        "assertion": "backup_fresh",
        "value": True,
        "observed_at": now.isoformat(),
        "kind": "runtime",
        "provenance": "backup-monitor",
    }],
}

evidence = ingest_json_envelope(
    payload,
    MappingEvidenceAdapter(),
).evidence

decision = AssuranceEngine().evaluate(
    contract,
    evidence,
    now=now,
)

print(decision.state.value)
print(decision.reasons)

Decision semantics

AssuranceLab does not reduce every incomplete observation to a Boolean. The decision boundary preserves six distinct states:

State Meaning at the evaluation boundary
PASS All required admitted evidence satisfies the contract.
FAIL Valid evidence contradicts a declared requirement.
UNKNOWN Required evidence or a required trust condition is unavailable.
EXPIRED Evidence falls outside its declared validity window.
CONFLICT Relevant admitted observations disagree.
NOT_TESTED No evidence reached the evaluation boundary.

PASS is a result for the declared contract, evidence and evaluation time. It does not mean certification, absence of cyber risk or organization-wide conformity.

What the library provides

  • typed service contracts for controls, business objectives and dependencies;
  • deterministic evidence-to-decision evaluation;
  • versioned JSON, JSONL and explicit OTLP/HTTP JSON ingestion;
  • subject binding, freshness, conflict and dependency semantics;
  • evidence hashing, signature verification and configurable key providers;
  • replay protection, monotonic sequences, leases and fencing tokens;
  • trusted-time samples, signed receipts and quorum policies;
  • evidence ledgers, hash-linked audit events and signed checkpoints;
  • versioned standards context and explicit crosswalk provenance;
  • NVD and MITRE ATT&CK snapshot parsing without automatic business inference;
  • fault scenarios, comparison baselines and bounded statistical utilities.

The module map explains which subsystem owns each responsibility.

Explicit dependency binding

A dependency name is descriptive until it is bound to an assertion. For a strict evaluation, declare the dependency requirement and enable dependency binding:

contract = compile_service_contract({
    "service_id": "checkout",
    "name": "Checkout",
    "controls": [],
    "objectives": [],
    "dependencies": ["payment"],
    "dependency_requirements": [{
        "dependency_id": "payment",
        "assertion": "payment_available",
        "expected_value": True,
    }],
})

engine = AssuranceEngine(require_dependency_binding=True)
decision = engine.evaluate(contract, evidence, now=now)

Missing dependency evidence becomes UNKNOWN; contradictory valid evidence becomes FAIL. An unbound dependency cannot silently produce a strict PASS.

Operational pattern

A practical deployment keeps collection, evaluation, retention and response as separate responsibilities:

  1. A collector authenticates to the monitored system and creates a versioned observation.
  2. An adapter validates the external envelope and constructs typed evidence.
  3. Trust policies check identity, integrity, time and replay conditions.
  4. AssuranceEngine evaluates the evidence against the service contract.
  5. The application retains the decision and evidence references, then routes the result through an approved response policy.

Scheduled collection is appropriate for slower-changing controls. Event or telemetry-driven collection is appropriate when the required detection delay is shorter. The library does not choose a monitoring cadence on behalf of the operator.

Docker boundary

After obtaining the wheel, a network-isolated smoke test can install the local artifact and import the package:

docker run --rm --network none \
  -v "$PWD/assurance_lab-0.1.0a11-py3-none-any.whl:/assurance_lab-0.1.0a11-py3-none-any.whl:ro" \
  python:3.12-slim \
  sh -c "python -m pip install --no-index --no-deps /assurance_lab-0.1.0a11-py3-none-any.whl && \
         python -c 'import assurance_lab; print(assurance_lab.__name__)'"

Installing directly from PyPI requires network access. The network-isolated boundary starts only after a wheel is mounted or included in a container image.

Standards and audit boundary

Standards are represented as versioned context with provenance. They are not hard-coded keyword rules and they do not convert a library decision into an ISO certificate or formal conformity opinion. The organization remains responsible for scope, applicability, audit criteria, evidence ownership, risk acceptance and response authority.

See the standards model and security boundary before using a decision in an operational workflow.

Release status

The current package is an alpha research release intended for controlled evaluation. Local and Docker smoke tests support the documented bounded workflow. Production orchestration, enterprise scale, cloud SLA, independent organizational validation and certification remain outside the release claim.

License

Apache License 2.0.

Metadata

Release files for assurance-lab 0.1.0a11

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

Built distribution (wheel)

Table of built distributions (wheels) for assurance-lab 0.1.0a11
File Interpreter ABI Platform Actions
assurance_lab-0.1.0a11-py3-none-any.whl Python 3 none any Details for assurance_lab-0.1.0a11-py3-none-any.whl

Release files / assurance_lab-0.1.0a11-py3-none-any.whl

Download URL assurance_lab-0.1.0a11-py3-none-any.whl
Size 53.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
212ae50fa18064e31985e30cd954973234abbf59db30453e77c134089841116a
BLAKE2b-256 checksum
How to use checksums
5c44bbf259c68ae57538ac6ea9ee8b5826e37cf04e996a8dd77f44b50e5061dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Security for assurance-lab 0.1.0a11

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for assurance_lab-0.1.0a11-py3-none-any.whl

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 Oct 30, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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