Skip to content

release evidence export: one release or a period, indexed by control id #5465

Closed

Description

@lex00

One command writes what an assessor needs for one release, or for every release and change in a period, as a directory with an index by control id. This is design work: the format, and how much of it is OSCAL or FedRAMP's own machine-readable format, is decided here.

Epic: #5452. Research: #5447 (the mapping comment holds the control table the index is built from).

What exists, checked at chant cee8937 (the ci-hardening branch)

  • The records are on chant/lifecycle: _merges/<commit>.json, _change-sets/<digest>.json, _gates/<op>.jsonl, _gates/policy-override.jsonl and its applied.jsonl, _releases/<digest>.json, _releases/cuts.jsonl, _releases/publishes.jsonl (with scanned and scan-failed lines since release publish: scan every artifact before the stage, with a pinned scanner, under supply-chain #5446), <env>/releases.jsonl and <env>/runs__<op>.jsonl.
  • The artifacts sit beside what was published: an image's SBOM, release provenance, scan.json, cosign signature and SLSA bundle as OCI referrers, and a forge release's <file>.sigstore.json and release.slsa.sigstore.json.
  • chant release verify <label> [--sigstore] --json checks a release's signatures. The gate audit reader (lifecycle/gate-audit.ts) and the unrecorded writer audit (ci-audit/unrecorded.ts) turn ledgers into reports.
  • chant workspace export exists and means something else: it writes members, with their lineage and records, into the workspace's export member (workspace/export.ts). The new command needs another name.
  • Nothing joins any of this per control, and nothing writes OSCAL.

What it should be

  • A command (name to settle, for example chant release evidence <label> and --since <date> --until <date>) that writes, into a directory it is given:
    • the lifecycle records for the release or the period, copied byte for byte so their seals still verify;
    • the referrers and forge assets, fetched by digest;
    • the --json output of release verify --sigstore for each release;
    • .chant/trust.json and .chant/allowed_signers at each release's commit;
    • an index.json that lists, per control id, the files that bear on it and what each shows and does not show, from a table in core that the Research: FedRAMP Moderate and CCCS Medium profiles and an evidence export #5447 mapping seeds and a test keeps in step with the docs;
    • a digest of every file, with the index signed by the runner key or with release.signing.
  • The format is decided in this issue after reading FedRAMP's current 20x rules and the FRMR format FedRAMP publishes them in. OSCAL assessment results are the other candidate. The first pull request ships the directory and the JSON index either way.
  • The command only reads: it writes nothing on chant/lifecycle and nothing to a registry.

Done when

  • A fixture release with scans, signatures and gates exports a directory whose index names every file, and every file's digest matches.
  • Copied approvals and cuts still verify from the export alone.
  • The docs describe the export and the index, and say which controls each kind of file bears on.

Activity

  1. added
    epic:ci-hardening
    on Nov 22, 2026
  2. lex00 commented on Nov 22, 2026

    @lex00
    ContributorAuthor

    Design

    Checked against the ci-hardening branch at a6be8ba (with the rescan and ci init fixes since), which carries #5464's SECURITY_CONTROLS, #5466's rescans, #5468's signed SBOM and scan attestations, #5470's crypto field and #5462's runnerKey.

    The command

    chant workspace export and chant release export are both taken (the second writes a release's compiled templates for a deploy), so the command is chant release evidence:

    chant release evidence <label|digest> -o <dir> [--sign [<key>]] [--referrers] [--sigstore [--assets <dir>]] [--json]
    chant release evidence --since <date> [--until <date>] -o <dir> [...the same flags]
    chant release evidence --check <dir> [--json]
    

    It runs in a member, as release verify does, and reads that member's records. -o is required and must name a directory that is missing or empty, so an export never mixes with other files. A period takes every release whose cut falls in [since, until), until defaulting to now, and every merge, gate, override, deploy and run line in it.

    What it reads, and what it never does

    By default it reads only the local repository: chant/lifecycle as it is in this clone (it does not fetch; the hint says to), and the trust files from git at each commit. It writes only into -o. Nothing is written to chant/lifecycle, a registry or a forge.

    Two flags reach out, each named for what it does:

    • --referrers fetches, by the digests the publish record holds, each image's referrers (the layer SBOM, scan.json, the signed SBOM and vulnerability attestations, the SLSA statement and the signature) from its registry, with the credentials a rescan uses. Each manifest and blob is checked against its digest and the manifest's subject against the image before it is written. A referrer that can't be fetched is listed with the reason.
    • --sigstore runs the check of release verify --sigstore and writes its result beside the offline one. It runs cosign, which reads the registry and the transparency log. Forge release assets are not downloaded by chant: --assets <dir> names where they were downloaded, and the bundles and SBOMs the publish record names are copied from there when their digests match.

    Layout

    <dir>/
      index.json                       the index, chant's own JSON, with a schema
      SHA256SUMS                       sha256sum format, every file including index.json
      SHA256SUMS.sig                   with --sign: an ssh signature in the chant-evidence namespace
      lifecycle/<path>                 each chant/lifecycle file, byte for byte, at its path on the branch
      commits/<sha>/<path>             .chant/trust.json, the signers file it names, chant.workspace.json, at each release commit and each merge's base
      verify/<digest>.json             release verify --json for each release (offline), and <digest>.sigstore.json with --sigstore
      referrers/<digest>/...           with --referrers: each referrer's manifest and blobs, named by digest
      assets/<digest>/<name>           with --assets: the forge assets the publish record names
    

    Ledger files are copied whole and byte for byte from the pinned tip of chant/lifecycle, so every seal on a line, and each file's git blob id, can be checked against the export. The index names, for each .jsonl file, the line numbers that bear on the scope and what kind of record each is. For one release, the records in scope are its release file, its cut and publish lines (scans, rescans, crypto, runnerKey and signature items among them), the deploy lines that name it, the merge records of the commits it carries since the previous release with their change sets and gate files, the overrides on those gates, and the run lines at its commit.

    The index

    index.json holds the scope, the lifecycle commit read, every file with its SHA-256, size, source (a lifecycle path and blob, a commit and path, a registry digest, or the command that produced it) and the kinds of record it holds, and one entry per control of SECURITY_CONTROLS and of CONTROLS_OUTSIDE_BOTH_BASELINES. Each control entry carries the table's id, titles, baseline marks and FedRAMP parameter, the files and lines in this export that bear on it with what each shows, the table's notShown, and the check codes and doctor checks to run. A control with no record in the export says so in a sentence and repeats where the mapping says its evidence lives (lint output, pinned tool files, a forge setting), instead of an empty list. A period with no release cut says so at the top of the index and on stderr.

    Which kinds of record bear on which control is a field of each SECURITY_CONTROLS row, so the ids stay in one table, and a test checks that every kind is claimed by some control and every row names kinds the export writes.

    The index states what it is: the records are evidence toward the controls named, notShown says what they do not show, and an assessor decides whether a control is met. Nothing in the export or the docs says chant meets or satisfies a control or a baseline.

    Format

    The research on #5447 did not establish what FedRAMP 20x accepts as machine-readable evidence, so the export does not claim any official format. The index is chant's own JSON, published as release-evidence.schema.json beside chant's other schemas. OSCAL is not emitted: doing so would need assessment-results documents tested against NIST's published schema, and that is a separate change once someone confirms which format an assessor wants.

    Signing and checking

    --sign [<key>] signs SHA256SUMS with ssh-keygen -Y sign in the chant-evidence namespace, with the key given or git's user.signingkey, as chant approve --sign takes it. A runner key file works when ssh-keygen can read it. Signing with release.signing (cosign keyless or KMS) is not offered: it would need the network or a KMS, and the export is meant to run offline.

    --check <dir> reads only the directory: every file's digest against SHA256SUMS and the index, no file unlisted, each release file against its own digest, each cut's signature against the signers file exported at the release's commit, each sealed approval against the trust files exported at the base of the merge whose gate it is, and the signature on SHA256SUMS, naming its key and whether an exported signers file lists it. So copied approvals and cuts verify from the export alone.

    Not in the export

    chant release doctor, chant workspace check and chant workspace state are not run: the first reads the forge and the scanner, the last reads every member's state backend. The index lists them with the command to run, so their absence is on the page.

    Corrections to this issue

    • The applied overrides are at _gates/policy-override/applied.jsonl, not beside policy-override.jsonl.
    • chant release export exists too and means something else, so neither export name fits.
    • "fetched by digest" would make a registry and a forge read the default. Here the default is offline, registry referrers come with --referrers, and forge assets are copied from a directory the team downloaded them to.
    • "signed by the runner key or with release.signing": the index's sums are signed with an ssh key, which may be a runner key file; release.signing modes are left out because they need the network or a KMS.
    • The signers file is the one .chant/trust.json names at the commit (signers), .chant/allowed_signers by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic:ci-hardening

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions