Literate AI

Repository documentation

Source Trust, Classification, and Build Policy

Status

This is the initial security architecture and delivery plan. It is not yet an enforced security boundary. No implementation may claim source is safe merely because this plan exists or because a signature is valid.

Assumption and invariant

Cache population receives authoritative signed source. Verification establishes that the fetched canonical source tree is the source authorized by an accepted signer and has not changed. It does not establish that the source is non-malicious, suitable for a given machine, free of vulnerable dependencies, or safe to compile and execute.

The mandatory trust path and the explicit sample-only exception are:

flowchart LR
    F[Fetch] --> Q[Quarantine]
    Q --> C[Canonicalize]
    C --> V[Verify origin + bytes]
    V --> S[Scan exact closure]
    S --> P[Classify]
    P --> A[Authorize exact builder + toolchain]
    A --> B[Production sandboxed build]
    B --> T[Attest artifact]
    A -. explicit sample-only yolo .-> H[Portable host build]
    H -. non-production evidence .-> T

The solid route is the production path. The dotted route describes only the portable sample adapters. The shipped Python, C++, Rust, JavaScript, and composite Rust/JavaScript host builders have no cross-platform OS sandbox. They accept only the explicit unsandboxed-host profile, complete ambient privilege enumeration, and an acknowledged yolo authorization; a request that labels them constrained is rejected.

Every arrow emits an immutable event. A cache hit may reuse an unexpired decision only when all bound source, dependency, scanner, policy, trust-root, builder, and toolchain identities match.

Security objects

All objects are content-addressed where deterministic; operational timestamps and revocation events remain append-only event data.

Classification profiles

Profile Intended behavior
constrained minimal network/filesystem/process privileges; accepted low-risk policy
reviewed human or delegated review required for enumerated findings/privileges
privileged-review stronger approval and isolation for elevated build requirements
blocked no build authorization may be issued
yolo exceptional explicitly enumerated privileges with full warnings and audit

Profiles are policy inputs, not trust labels embedded by a Component author. Dependency risk propagates to the effective closure; a consumer cannot erase a dependency finding.

Full-yolo policy

yolo deliberately supports the “go crazy knobs all turned up” workflow for users who accept the risk. It must still be difficult to confuse with a normal secure build:

For automation, acknowledgement is a signed policy grant, never a generic --force or ambient environment variable.

Enforcement boundaries

Delivery plan and gates

  1. Define strict schemas, canonical identities, policy evaluation, and denial errors.
  2. Implement trust-root and signature verification adapters with revocation tests.
  3. Implement quarantine, static scanners, finding normalization, and dependency propagation without executing source.
  4. Implement classifier policy plus explicit reviewed and yolo exception workflows.
  5. Require expiring build authorization in every builder adapter and add sandboxed reference builders.
  6. Attest/scan outputs and enforce publication policy.
  7. Expose typed settings and unmissable status/warnings through CLI/API/UI contracts.
  8. Run adversarial tests for valid-signed-malicious source, confused deputy, TOCTOU, stale/revoked decisions, dependency substitution, sandbox escape requests, forged yolo acknowledgement, and warning/provenance removal.

Constrained or production build execution remains unavailable until step 5's sandboxed reference builders and adversarial tests exist. The sample ladder's separately named host builders run only after explicit unsandboxed yolo acknowledgement. A future production-security claim additionally requires a threat model, independent review, supported-platform isolation evidence, incident and revocation procedures, and continuous policy/scanner update management.

Read the Markdown sourceConference homePublished 1.3.0 · Patch 1.3.1 in progress · Development 1.4