Repository navigation
Closed
Labels
epic:ci-hardeningHardened images, scans, compliance evidence, and the gaps a regulated CI team needs closed
Description
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.jsonland itsapplied.jsonl,_releases/<digest>.json,_releases/cuts.jsonl,_releases/publishes.jsonl(withscannedandscan-failedlines since release publish: scan every artifact before the stage, with a pinned scanner, under supply-chain #5446),<env>/releases.jsonland<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.jsonandrelease.slsa.sigstore.json. chant release verify <label> [--sigstore] --jsonchecks 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 exportexists 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
--jsonoutput ofrelease verify --sigstorefor each release; .chant/trust.jsonand.chant/allowed_signersat each release's commit;- an
index.jsonthat 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/lifecycleand 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.
Metadata
Metadata
Assignees
Labels
epic:ci-hardeningHardened images, scans, compliance evidence, and the gaps a regulated CI team needs closed
Activity
lex00 commentedon Nov 22, 2026
Design
Checked against the
ci-hardeningbranch at a6be8ba (with the rescan and ci init fixes since), which carries #5464'sSECURITY_CONTROLS, #5466's rescans, #5468's signed SBOM and scan attestations, #5470'scryptofield and #5462'srunnerKey.The command
chant workspace exportandchant release exportare both taken (the second writes a release's compiled templates for a deploy), so the command ischant release evidence:It runs in a member, as
release verifydoes, and reads that member's records.-ois 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),untildefaulting 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/lifecycleas 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 tochant/lifecycle, a registry or a forge.Two flags reach out, each named for what it does:
--referrersfetches, 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.--sigstoreruns the check ofrelease verify --sigstoreand 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
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.jsonlfile, 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,runnerKeyand 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.jsonholds 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 ofSECURITY_CONTROLSand ofCONTROLS_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'snotShown, 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_CONTROLSrow, 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,
notShownsays 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.jsonbeside 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>]signsSHA256SUMSwithssh-keygen -Y signin thechant-evidencenamespace, with the key given or git'suser.signingkey, aschant approve --signtakes it. A runner key file works when ssh-keygen can read it. Signing withrelease.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 againstSHA256SUMSand 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 onSHA256SUMS, 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 checkandchant workspace stateare 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
_gates/policy-override/applied.jsonl, not besidepolicy-override.jsonl.chant release exportexists too and means something else, so neitherexportname fits.--referrers, and forge assets are copied from a directory the team downloaded them to.release.signing": the index's sums are signed with an ssh key, which may be a runner key file;release.signingmodes are left out because they need the network or a KMS..chant/trust.jsonnames at the commit (signers),.chant/allowed_signersby default.