Browse documentation

Prepare and publish a reviewed source snapshot

Use coldrelease preflight, plan, check, export, approve, and publish inside the existing Coldrelease installation. coldrelease status shows where a run is and the next command. Coldrelease never pushes to a public repository itself: approve records the release for the Coldlocker publication guard and prints the one git push the guard allows; see Approve and push through the publication guard. There is no second scanner or service. Python 3.11+ and Git are required. Optional gitleaks and trufflehog run as external binaries. Nothing is vendored. Trufflehog's adapter disables credential verification and update checks so scanning does not submit candidate credentials to providers.

PASS means the declared checks passed. It does not guarantee safety.

Preflight cache

preflight caches only static license and quality checks under $XDG_CACHE_HOME/coldrelease/preflight-v1, or ~/.cache/coldrelease/preflight-v1 when XDG_CACHE_HOME is unset. An older release-check cache folder is never read, because every key binds the checker source, and can be deleted. Cache files are private local reports. Keep this directory outside source repositories and exports. A cache location inside a Git checkout disables caching.

Each key binds the actual snapshot file bytes, paths and modes, the complete checker source and version, Python version, denylist, private repository list, and policy including approvals. Missing, corrupt or unwritable cache entries rerun the checks. Binary Bun lockfile conversion always reruns because it uses an external executable. Command availability and quickstart document checks always rerun too.

Use coldrelease preflight SOURCE --denylist DENYLIST --no-cache to bypass cache reads and writes. Results are identical with and without caching. plan, check, export, approve, publish, the legacy audit, and --published-target never use this cache. The cache cannot approve a release. Preflight snapshots skip the unused Git commit; exports still have one clean commit. Shared snapshot staging sends all literal paths to one Git process.

Survey many repositories

coldrelease survey OWNER/* --denylist DENYLIST lists the owner's repositories with gh repo list and runs preflight on each. coldrelease survey LIST --denylist DENYLIST reads one source per line from a file (anything preflight accepts; blank lines and # comments are skipped). It prints one table row per source with the outcome, structural blockers, missing documents, and source discovery counts for unresolved exposure and coverage gaps. PASS covers structural preflight and static discovery in the source tree and reachable Git history. Recipe execution and dependency and export verification are deferred. Find source-discovery.json under the reported run ID in the private state directory ($XDG_STATE_HOME/coldrelease/runs, default ~/.local/state/coldrelease/runs). The exit code is the worst outcome: 1 if any FAIL, else 2 if any INCOMPLETE, else 0. An owner with 1000 or more repositories stops with INCOMPLETE survey-limit; survey a list file instead. Each source gets a new run, so --run is refused.

Prepare a run

The following commands are templates. Replace the paths, run ID, repository URL, and ref with values reviewed for your release. You can use a named destination remote with a single push URL. The workflow resolves that URL at approval and checks it again at publish. Relative local targets resolve against the source repository. Approval refuses the source checkout, its Git directory, and its source remotes. The workflow never creates a repository or changes its visibility. Destination lookup and readback use the export's Git configuration. Source-local URL rewrite rules do not redirect literal approved targets.

  1. Keep the denylist outside the source repository. Run state is written outside the source, to $XDG_STATE_HOME/coldrelease/runs/<source>-<hash>/<run>/ (default ~/.local/state, every folder mode 0700); a state folder inside the source returns INCOMPLETE run-state-inside-source. A run that already exists under the source's old .coldrelease/runs/<run>/ folder is read-only. status shows legacy-read-only for that run, and status --json reports whether it has a saved plan. Its approvals and allowlists remain available as baselines. To continue, start a new run or migrate the old run directory to the external state path above. An external run with the same ID takes precedence. Keep one run ID through repairs. Omit --run only when creating a new run and retain the generated ID printed in JSON.
       coldrelease preflight /path/to/source --run release-id --denylist /private/terms.json
       coldrelease plan /path/to/source --run release-id --denylist /private/terms.json
    Preflight first writes the static source findings to source-discovery.json in the private run directory. It scans tracked files and non-ignored untracked files outside generated directories. History covers commits reachable from local refs and reflogs in the checkout, or in the saved mirror for a remote source. Export exclusions do not limit discovery. Use these findings to prepare the candidate. The candidate has its own checks. Preflight then checks the proposed tracked snapshot without executing project commands. It reuses the engine's license, dependency declaration, documentation, and verification declaration checks. Actual installed dependency licenses and project commands are checked during check and export. Declared project entrypoints may be absent before installation. An unknown ecosystem or missing license evidence remains blocked; preflight does not waive engine findings. Shallow source repositories are rejected because historical attribution cannot be checked beyond their available history. Fetch the complete history separately before starting the workflow. A licence holder found anywhere in the history stays required in the export, including when the source copy was edited before the run. The owner may drop only their own attribution: list it under "owner_holders" in the JSON reference denylist. A matching denylist term alone does not prove ownership, and a third-party holder always blocks. owner_holders in a denylist that is not this host's reference stops the export with denylist-not-reference. plan lists the required scanners for the candidate. Every candidate needs Gitleaks and TruffleHog. Python source adds Bandit, other source adds Opengrep, and dependency manifests or lockfiles add OSV-Scanner. Add extra scans with --scanner on plan or release. Install the required binaries separately: gitleaks 8.19.0 or later, trufflehog 3.97.5 or later, osv-scanner 2.5.1 or later, bandit 1.8.0 or later (with pipx install bandit, so it runs without your user site-packages), and Opengrep 1.33.1 or later. For explicit --scanner selections, plan reads the scanner's --help and returns INCOMPLETE scanner-unsupported when it lacks a flag the adapter passes; detail names the missing flags, for example trufflehog lacks --no-ignore-tag on trufflehog 3.97.4 and earlier. A missing binary makes the export INCOMPLETE. When the source declares no quickstart or checks, plan writes a proposed recipe to the run folder's proposed-release-check.json and never to the source. It takes install commands and [project.scripts] names from fenced lines in README.md. For a Python project it proposes unittest discover only when every tests/**/test*.py file parses, sits in a package folder discovery reaches, and defines a unittest.TestCase subclass with a plain test* method and no other tests, async tests or load_tests; otherwise it proposes python -m pytest -q. List pytest in the README install line so verification installs it; without pytest, or with no tests found, verification fails. It proposes test, lint, typecheck and build from package.json scripts, and make test from a Makefile test: target. Review it, edit it if needed, and accept it by renaming it to release-check.json in the same run folder. It may hold only quickstart, checks and verify_tools. check and export stop with recipe-not-accepted until you do. If plan stops with recipe-proposal-incomplete, add the missing quickstart or test command, save it as the run's release-check.json and rerun plan. The accepted recipe is bound to the export, and the approval records it as recipe.
  2. Review the run folder's public-export.txt. It lists exact tracked files, without glob expansion or directories. Remove unwanted files. Untracked files, symlinks, credentials, agent configuration, state, scratch, audit/receipt evidence, and maintainer export notes are rejected. New tracked files do not silently enter an existing plan. Required attribution remains checked against every local ref and reflog, including deleted history. Proposed plans omit symlinks. Adding one to the allowlist is rejected. Once planned, preflight for check and export uses that exact reviewed allowlist, so unrelated tracked files cannot block it. If the initial preflight includes an unrelated private ecosystem, you may create this exact-file allowlist yourself before plan. Preflight and plan then audit only that selection. Keep required license and documentation files in it; omitted requirements still block the run. plan shows the diff from the previous plan. approve shows the diff from the allowlist of the most recently published run of the same source (by the modification time of its published.json); none means an empty baseline. The record contains the full allowlist as well as its diff.
  3. Run the check and repair the source until it passes.
       python -m release_check check /path/to/source --run release-id --denylist /private/terms.json --verify
       coldrelease export /path/to/source --run release-id --denylist /private/terms.json --verify
    --verify authorizes the manifest commands. Review them first. A fresh HOME and virtual environment do not sandbox hostile code. Each attempt has a new private directory under attempts/. Previous failed attempts remain available. Check audits the exact planned snapshot rather than unrelated private source history. Export repeats verification, creates a single generic-identity commit, and writes the engine's receipt. export.json points to that attempt. Both export only committed content: if any allowlisted path differs from the source HEAD (an uncommitted edit, a staged file or a mode change), they return INCOMPLETE source-dirty; commit or revert it first. The receipt records source_head and source_tree, and two exports of the same source commit and allowlist have the same export_tree. Checkouts whose working bytes differ from the committed blobs (for example CRLF conversion or ident) are also source-dirty. Selected scanners each receive an independent fresh clone checked out at the receipt's export commit. The adapter confirms its tree ID and rejects mutation. Gitleaks uses its default rules without repository allowlists or inline ignore comments. Trufflehog reports unverified findings too and requires its completion event and successful exit with no scan errors. Findings produce FAIL; missing binaries, errors, timeouts, invalid results, or absent completion produce INCOMPLETE. Both block approval. osv-scanner checks the export's lockfiles and manifests for known vulnerabilities. An advisory with CVSS 7.0 or higher or a HIGH or CRITICAL label FAILs with scanner-findings, with or without a fixed version. CVSS 9.0 or higher and CRITICAL advisories always block. A HIGH advisory without a fix passes only when the JSON reference denylist holds "advisory_acceptance": {"export_tree": "<tree SHA>", "advisories": ["<every ID in the group>"]} for this exact export tree; scanners.json then marks it owner_accepted. Another tree, a missing ID or a denylist that is not this host's reference still blocks. approve checks the acceptance again and stops with advisory-acceptance-stale if it was revoked after export. Export and approve stop with denylist-changed if the denylist changes while they run. scanners.json records each advisory's IDs, aliases, package, version, lockfile path, severity and fixed versions, and export prints the blocking IDs. It queries osv.dev by default. Set COLDRELEASE_OSV_DB to a directory holding osv-scalibr/<Ecosystem>/all.zip (for example from `osv-scanner scan source --offline-vulnerabilities --download-offline-databases`) to scan offline; a missing directory or ecosystem database is INCOMPLETE scanner-database-missing. A recognized dependency manifest needs a lockfile for its ecosystem in the same directory. For example, requirements.txt needs a Python lockfile such as pylock.toml. Export reports INCOMPLETE dependency-lock-missing if the lockfile is absent, or dependency-lock-unscanned if OSV reads no packages for it. The JSON report lists manifests without lockfiles. Provide a supported lockfile and rerun export before approval. Bandit checks the export's Python code for insecure patterns that include subprocess with shell=True or verify=False. Findings with high severity and high confidence block approval until you fix them or record an exact false-positive review. To review a false positive, run coldrelease review, choose approve, give the reason, and rerun export. The review applies to the exact finding and file bytes. scanners.json lists all findings with rule ID, rule title, path, line, severity and confidence. Export prints the rule IDs. Bandit ignores # nosec comments and .bandit files in the export. A parse error produces INCOMPLETE scanner-error. The report records unconfigured when the plan omits both application security scanners and not supported when they scan no supported files. Opengrep checks JavaScript and TypeScript for calls to eval with dynamic expressions. Coldrelease ships the first-party MIT rule in the wheel and records its SHA-256 in scanners.json. The scan uses only that rule, disables network version checks, and ignores candidate Git and Semgrep ignore files and inline suppressions. ERROR findings block approval until fixed or reviewed as exact false positives. A detected language outside the pinned ruleset, skipped source, or scanner error returns INCOMPLETE. Versions, executable digests, export commit/tree, outcomes, and output digests are retained. Every FAIL or INCOMPLETE entry in the attempt's scanners.json carries a reason (for example scanner-missing, scanner-database-missing, scanner-timeout, scanner-exit-code or scanner-findings), and export prints each INCOMPLETE reason to stderr. Raw scanner output stays temporary and is discarded rather than logged into run state.

The report field in the export result points to report.json relative to the run directory. The JSON and adjacent report.md show the release verdict, candidate commit and tree, scanner scope and outcomes, coverage and exclusions, and the allowlist and sanitization changes. The allowlist comparison uses the most recent published approval, or an empty list for the first release. The command result, report, and receipt use the same verdict.

All commands except status return JSON with PASS, FAIL, or INCOMPLETE and exit with 0, 1, or 2. They do not print matching secret values, private paths, or remote command output. Run state is private local data and must not be shared as a public report bundle. The existing audit CLI and its --export option retain their previous behavior.

Functional evidence for ColdVerify consumers

Every check and export attempt also writes verify-evidence.json beside its receipt: the export's verification commands as one ColdStack run result v1 record, the shared evidence format ColdVerify writes as .cold/verify-evidence.json (coldverify docs/evidence.md). Products that read ColdVerify evidence can read it without knowing the receipt.

  • repo.commit is the receipt's export_head, the one-commit export whose tree is export_tree. repo.name is the source's GitHub owner/repo (the remote source, or the checkout's origin). Without a GitHub repository identifier no record is written, because the shared schema requires one.
  • steps are the quickstart and check commands that ran, in order. Exit 0 is pass, anything else is fail with exit N as the excerpt. A timeout (exit 124) makes the record incomplete; any other failure makes it fail. It is pass only when verification passed, and incomplete when no command ran or a post-install check (installed project, dependency licences) blocked. duration_ms measures elapsed time for each command invocation, including VM transport on Coldbox. Run-level time fields are null.
  • environment records the guest ID and OS observed during Coldbox verification, with isolation: vm and host: unknown. An interrupted VM run retains the observed environment and completed steps.
  • artifacts lists receipt.json with its SHA-256. The receipt includes verification_environment.log_sha256 when Coldbox recorded a guest OS.

The record is functional evidence only. Coldrelease never reads it back: release safety is decided by the receipt, the approval, the publication guard and the final gate, and a pass record says nothing about secrets, privacy or licences.

Remove old attempts

Every check and export keeps a full export copy under the run's attempts/.

coldrelease prune /path/to/source --run release-id --keep 1

prune deletes that run's oldest attempts beyond the newest --keep unbound ones. It never deletes the current export attempt or the attempt whose receipt approval.json or published.json binds, and never touches approval.json, release.git or other runs. It takes the run lock and prints the removed and kept attempt names.

See where a run is

coldrelease status /path/to/source --run release-id --denylist /private/terms.json

status only reads the run's files: it creates nothing, takes no lock and contacts no remote. It prints the run's state on the first line and the next command on the second; --json prints the same as JSON. The command repeats the --denylist, --manifest, --private-repo, --timeout and --use-git-credentials options you pass to status, and --target and --ref where the next step needs them. Values it cannot know are printed as TARGET, NEW_RUN and PUBLISHED_CLONE; replace them. The line contains your local paths, so do not paste it anywhere public.

StateNext
newpreflight
preflightedplan
recipe-proposedreview the run's proposed-release-check.json, then rename it to release-check.json
plannedexport --verify
export-not-passfix the source, then export --verify again
exportedapprove
stagedwith status --first-release, a verified export is ready for approve --first-release
approval-stalea new run: the export changed after approve, and approvals are never overwritten
approvedthe guarded git push from the run's release.git as next, and publish as then; run them as two commands, because the publication guard allows the push only on its own
published <sha>clone the target's branch and run the final gate on it, bound to the published receipt's head and tree with --expected-export; INCOMPLETE receipt-invalid if that receipt no longer matches its digest, the approval or published.json. After the visibility change, run confirm-public
pushed <sha>for a first release, run ship to check the private destination, then the owner runs the make-public command it points to
ready-to-publish <sha>for a first release, the final gate passed on the still-private destination. next is ship, which rechecks the destination; then is the owner's make-public command
public-verified <sha>nothing; confirm-public passed on the public target for this published head. The printed confirm-public line checks it again

status prints the guarded push only in approved, when the approved receipt is the run's current export. publish checks the destination again.

Carry a reviewed finding forward

coldrelease review /path/to/source --run release-id --denylist /private/terms.json walks the unresolved findings of the run's newest preflight, check or export and writes approvals, allowlist exclusions and source repair decisions into triage.json: approve (with a reason and file_sha256), exclude (the run's allowlist and later plans leave the path out) or fix (recorded only; the finding stays until the source changes). A finding that is still unresolved is listed again with its recorded decision, and a new answer replaces it. It never prints finding values.

The engine's manifest approvals remain supported. Workflow-specific reviews go in the run's triage.json list. Copy the engine finding's scope, kind, path, fingerprint, and any required reason, then add file_sha256 containing the SHA-256 digest of the entire corresponding source file. Include separate entries for tree and history scopes when both findings exist. Use the exact reported path; redacted paths cannot resolve to source files and cannot receive this review.

The next plan copies the previous plan's triage. Only reviews whose file digest still matches become engine approvals. Changing any file bytes expires the workflow review. Engine eligibility and required reasons still apply. A review does not erase a finding from the report.

If preflight itself reports an eligible review, create triage.json in that run from its finding before plan. Planning, checking, and exporting apply valid reviews before preflight. Missing licenses and other ineligible blockers still require a source fix.

Sanitize a candidate copy

  1. Run review with the same denylist and any manifest or private repository options used for preflight or export. Review offers d to drop an eligible file from the candidate and r to replace an eligible text finding with [redacted]. After the findings, it offers to write a blank .env.example if the source has root environment keys. Confirm protected changes separately.
  2. Run sanitize with the same source, run and policy. Read its change summary and inspect the private changes.json for details such as the example's keys.
  3. Resume release to verify the candidate. To stop after verification, run plan if needed, then run check --verify.

coldrelease sanitize /path/to/source --run release-id refreshes the static source report, then applies the run's reviewed transforms.json to a candidate copy in the run state. The candidate starts from the committed content of the run's allowlist. You can also write entries directly in transforms.json:

  • {"op": "drop", "path": "notes/draft.txt"} leaves the file out of the candidate.
  • {"op": "replace", "path": "docs/guide.md", "fingerprint": "<16 hex>", "placeholder": "[author]"} replaces every occurrence of the value behind that finding fingerprint. Copy the fingerprint for the current file from the source discovery or check report. The value is never printed or stored.
  • {"op": "strip-metadata", "path": "photo.jpg"} removes EXIF, XMP, IPTC and comment segments from a JPEG, or text, eXIf and tIME chunks from a PNG, and keeps the image data. Any other file stops with transform-not-image.
  • {"op": "env-example"} writes .env.example with the keys of the source's root .env and .env.* files and every value blank. Only a root .env.example that holds nothing but KEY= lines passes the credential-file check.
  • {"op": "add", "template": "Apache-2.0"} adds a built-in document that is not yet in the candidate: MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause or ISC as LICENSE, CONTRIBUTING as CONTRIBUTING.md, SECURITY as SECURITY.md, or issue-template as .github/ISSUE_TEMPLATE/bug_report.md. MIT, the BSD licences and ISC need "holder": "2026 Jane Doe" for their copyright line. A placeholder such as Your Organization in an MIT notice or a holder that breaks the standard wording stops with transform-holder. To replace an existing LICENSE, drop it first. A licence is protected, so both entries need "approve_protected": true.

A transform that touches a licence, NOTICE, attribution or AUTHORS-style file, or a file named in the manifest's quickstart or checks (including --option=path), stops with transform-protected unless the entry has "approve_protected": true.

sanitize writes changes.json: the source commit, tree and allowlist, the transforms digest, the candidate tree and, per change, the path, before and after digests, fingerprint, placeholder, generated keys, and added template and holder. After that, preflight, plan, check and export scan and export the candidate, and the receipt still records the source commit. They stop with candidate-stale when the source head, the allowlist or transforms.json changed (run sanitize again), and with candidate-changed when the candidate no longer matches its recorded tree. A change to a file that the current manifest now names in its checks stops with transform-protected unless that transform was approved. Export keeps a copy of changes.json in the attempt, and approve adds its changes_sha256 to the record. publish and ship refuse another changes.json with approval-changes, and ship shows the change count. Once the run is approved, sanitize stops with run-approved. A legacy run kept inside the source stops with run-state-inside-source.

Review one otherwise forbidden export path

After inspecting a public instruction file or synthetic agent example, add an export-path-review to the manifest's existing approvals list:

{
  "scope": "tree",
  "kind": "export-path-review",
  "path": "AGENTS.md",
  "source_sha256": "COPY THE FULL SHA256 OF THE REVIEWED FILE",
  "reason": "Reviewed these exact public product instructions."
}

The review applies to that literal repository-relative path and those exact bytes. It does not cover a sibling with identical bytes, a directory, or a glob. Changing the bytes expires the review. A matching review allows the file into a proposed plan. An existing plan still requires an explicit allowlist edit. The workflow rechecks the bytes after staging both preflight and export copies. It also compares each reviewed export file with its committed Git blob, so line ending normalization cannot substitute bytes that were not reviewed.

You can also place the record in triage.json with file_sha256 equal to source_sha256. Valid triage reviews apply before path validation and carry forward through the existing plan mechanism.

This review changes only the forbidden-path decision. Files must still be tracked regular files with no symlink, traversal, or manifest exclusion. Git internals, workflow run state, and default credential exclusions remain forbidden. Privacy, secrets, licenses, attribution, verification, receipts, external scanners, approval and the publication guard still run unchanged. A path review cannot waive any scanner finding or authorize publication.

Approve and push through the publication guard

There is no signature and no key. The owner's yes or no is the "public_push" switch in ~/.coldlocker/guards.json, which only the owner can change. Coldrelease never pushes to a public repository itself: approve writes a record bound to the repository, ref, tree and receipt, and the release builder runs one printed git push that the Coldlocker publication guard checks against that record before it lets it through. publish then only reads the result back and records it.

The sequence

From an export PASS on the reference denylist to public main updated:

  1. On a test host, where the reference denylist lives and tests may run, gate the release from the private GitHub repository, so the run is self-contained:
       coldrelease plan OWNER/REPO --run release-id --denylist ~/.config/coldrelease/denylist.json --scanner gitleaks
       coldrelease export OWNER/REPO --run release-id --denylist ~/.config/coldrelease/denylist.json --verify
    Repeat check, review and repairs as usual until export is PASS with a gitleaks or trufflehog PASS. Every file the public repository needs, such as its own .github/workflows/*.yml or coldbox.toml, must be in this gated export: the guard allows only the export's exact tree.
  2. Move the run to the host whose publication guard will see the push (the hop below).
  3. On that host, approve:
       coldrelease approve OWNER/REPO --run release-id --denylist ~/.config/coldrelease/denylist.json --verify --target https://github.com/OWNER/PUBLIC.git --ref refs/heads/main
    The record approve writes on disk is the approval, even if its printed output is lost: coldrelease status shows whether the run has one (state approved).
  4. Run the exact git push line that approve prints (also in its JSON push and next), on its own: the guard denies it when it is joined to another command with && or ;. It has this shape:
       git -C RUN/release.git push --force-with-lease=refs/heads/main:EXPECTED public RELEASE_SHA:refs/heads/main
  5. Record it, on any host that has the run:
       coldrelease publish OWNER/REPO --run release-id --denylist ~/.config/coldrelease/denylist.json --verify --target https://github.com/OWNER/PUBLIC.git --ref refs/heads/main
  6. Run the final gate status prints, and confirm-public once the target is public.

Use the same --denylist, external --manifest, --private-repo, --verify and --timeout options throughout; they are bound into the receipt.

What approve checks and writes

approve refuses, writing nothing, when:

  • the owner says no: "public_push": false under default, or under repos for the target's GitHub owner/repo (which overrides default), returns FAIL with owner-public-push-no and exit code 1. So does an invalid, unreadable or symlinked guards file, or one with a repeated key. A target that is not a GitHub owner/repo URL is refused when default or any repos entry says no. Without the file the answer is yes.
  • the target names github.com but is not https://github.com/OWNER/REPO, [email protected]:OWNER/REPO or ssh://[email protected]/OWNER/REPO (with or without .git): target-invalid.
  • the denylist is not this host's reference denylist (see the reference denylist).
  • the receipt is older than 7 days (receipt-expired); the guard accepts a record for at most 7 days after the receipt was made, so start a new run.
  • a required scanner is missing or INCOMPLETE (coverage-required). The named owner exception is recorded in the JSON reference denylist as "coverage_acceptance": {"id": "risk_review", "export_tree": "<tree SHA>", "gaps": {"opengrep": "scanner-missing"}}. The configured reference hash must match, and the entry must specify the exact export tree and every scanner gap. The report prints the acceptance ID and gaps as residual risk. A scanner FAIL still blocks, and at least one secret scanner must PASS.
  • GitHub requires a status check on the target branch and applies it to admins (target-requires-checks). A direct push would be refused, so approve says so up front and names the two ways out, which only the owner can take: turn off "Do not allow bypassing the above settings" for that branch (the owner's push then lands and the checks run on it afterwards), or remove the required check. Then rerun approve.
  • the run already has an approval (approval-exists), or the receipt, recipe, policy, allowlist or scanner results changed since export.

approve then builds the release commit in the run's own release.git, never in the export checkout (the receipt covers the export's .git):

  • On a first publication (the ref does not exist) the release commit is the receipt's parentless export commit, and EXPECTED is empty.
  • When the ref exists, EXPECTED is its current head, and the release commit is the export commit with one parent EXPECTED line added: same tree, author, committer and message, and EXPECTED as its only parent. This is the exact commit the guard recomputes.

Before writing approval, approve scans the staged commit and its ancestors. It checks the destination's advertised refs as they would look after the push, using the published-target rules. If the graph fails either check, the command stops before it issues a push command.

It checks the owner's switch again just before writing. It writes approval.json in the run with receipt_sha256, source_head, source_tree, scanners, target, ref, expected_public_head, release_head, allowlist and its diff, recipe and the denylist it used (path, sha256, terms, patterns). For a GitHub target it also writes the same record and an exact copy of the receipt to ~/.local/state/coldlocker/release-approvals/OWNER__REPO/RELEASE_SHA/, which is where the guard reads them. On stderr it prints the run, target, ref, export head, release commit, public head, the denylist's path, sha256 and term and pattern counts, and until when the receipt is valid.

The guarded push

The printed push is a fast-forward with a compare-and-set, never a history rewrite. RELEASE_SHA's only parent is EXPECTED (or it has none on a first publication), and --force-with-lease=REF:EXPECTED makes Git send it only while the public ref still holds EXPECTED (or does not exist). If anyone moved the ref after approve, the push is refused and nothing changes; start a new run. The publication guard allows that push only when all of these hold:

  • the owner has not said no for that repository;
  • a record exists for that exact repository, ref and RELEASE_SHA, at most 7 days old, whose receipt is a self-consistent PASS;
  • RELEASE_SHA's tree is the receipt's export tree and the commit is the export commit itself or the export commit with only parent EXPECTED added;
  • the lease names EXPECTED, and the public ref still holds it;
  • the record has not been used before (each record allows one push).

When the GitHub target is PRIVATE, approve records target_visibility and prints git -C RUN/release.git push public RELEASE_SHA:REF instead, because the guard allows a private push only without a lease. Without --force, Git still refuses it unless it is a fast-forward of the ref, so a moved ref is not overwritten. If the target becomes public before the push, the guard denies the plain push; start a new run.

Any other sha, ref, lease or remote is denied by the guard. Never add --force, --tags or other refspecs, never edit the record and never write one by hand.

publish pushes nothing. It checks the record against the receipt, scanners, allowlist and recipe again, checks the owner's switch, and reads the target ref: when it holds RELEASE_SHA it writes published.json (published_head, parent); when it still holds EXPECTED it returns INCOMPLETE release-not-pushed with the push line in detail; any other head is FAIL target-moved. A second publish returns INCOMPLETE already-published.

The final gate and confirm-public check the refs and history again after the push. If either check reports published-extra-refs, review the destination refs with the owner.

When GitHub runs the public repository's own checks after the push and they fail, the release is already public. Fix the source, gate a new run and release again; never rewrite the public history.

Move a run to the push host

Gates and tests run on a test host; the publication guard runs only where the agent that pushes runs. approve and the push must run on that host, because the guard reads the record from that host's home folder. publish and the final gate can run on any host that has the run.

  1. Gate from the private GitHub repository (OWNER/REPO), not a local checkout. Such a run is self-contained: its folder holds the source clone (source/, mirror.git, source.json), plan.json, public-export.txt, triage.json and export.json, and attempts/EXPORT/ with the export checkout (export/), receipt.json, manifest.json, allowlist.json, scanners.json and the report.
  2. Copy the whole run folder, $XDG_STATE_HOME/coldrelease/runs/KEY/RUN/ (default ~/.local/state/coldrelease/runs/KEY/RUN/), to the same relative place on the push host, keeping symlinks and modes (for example rsync -a). Copy nothing else.
  3. Use the same Coldrelease version, Python and Git on both hosts. The receipt binds them; a difference returns INCOMPLETE receipt-stale.
  4. Run approve there with the same options as export. It does not run --verify again: the flag only has to match the receipt's policy binding, and approve re-checks the receipt's self-hash and bindings, the export checkout's inventory and the scanner results against the copied files.

The reference denylist

approve refuses a denylist that is not the host's reference denylist, so a receipt made with a smaller or different list cannot be released:

  • The owner writes the reference denylist's sha256 (64 lowercase hex characters and a newline) to ~/.coldlocker/release-denylist.sha256 on the push host. Agents cannot write there. A missing file returns INCOMPLETE denylist-reference-missing, a malformed one denylist-reference-invalid.
  • The reference denylist file itself is placed by the owner at ~/.config/coldrelease/denylist.json on the push host; agents never copy it. Pass that path as --denylist. A file with another hash returns INCOMPLETE denylist-not-reference, and the message names both hashes and the term and pattern counts of the file given, so a wrong file is never reported as a stale receipt.

Removed

  • --identity, --allowed-signers, --key, ssh-keygen signing and --scanner-waiver are gone; passing them is a usage error.
  • Create a first-release destination yourself. Follow [the first-release checkpoint](#create-a-destination-for-the-first-release).
  • publish and ship never push.

To approve and publish to a private HTTPS target, pass --use-git-credentials to approve, publish and the final gate. Only the target lookups may then ask the credential helpers in your global git config; no other global setting reaches git. Other commands return INCOMPLETE git-credentials-selection for the flag, and a missing global helper returns git-credentials-missing. The printed push uses your normal Git configuration.

To be reminded to list the repository on a product page, pass --listing-source FILE (or set COLDRELEASE_LISTING_SOURCE) with a file kept outside the published repository that names your products, such as a page's source. After publish records the release it looks for the target's repository identifier as a whole word in that file. If it is missing or the file cannot be read, the PASS result gains a reminder field and the same text goes to stderr.

Release: every step in one guided command

release runs preflight, plan, export (with verification), approve, publish and the final gate in order, and stops where a person or the guarded push must act. It needs --run, --verify and --target. The plan adds the required scanners automatically. Without a required input, release returns INCOMPLETE with that step's reason before it runs anything.

coldrelease release /path/to/source --run release-id --denylist /private/terms.json --verify --target https://github.com/example/project.git --ref refs/heads/main --scanner gitleaks --scanner trufflehog

To start from a specific remote revision, pass the source repository and --source-revision. Use --ref for the destination branch.

coldrelease release example/private-project --source-revision refs/heads/stable --run release-id --denylist /private/terms.json --verify --target https://github.com/example/project.git --ref refs/heads/main --scanner gitleaks --use-git-credentials

You can use a branch, tag, or commit from the source mirror. Subsequent commands reuse the recorded commit, so you can omit --source-revision when you resume. Use a new run ID to select a different revision.

Each step prints release: STEP OUTCOME on stderr. Preflight also prints the source discovery finding count and report location before planning. It stops at these points:

  • Findings to triage. A preflight or export FAIL prints the findings and returns FAIL with next set to coldrelease review SOURCE --run R. Use the same release policy in review. If review queues candidate changes, run sanitize before resuming release.
  • A recipe to accept. When the source declares no quickstart or checks, plan proposes one; release returns INCOMPLETE recipe-not-accepted and prints the mv that accepts it after you read it.
  • The guarded push. After approve, publish returns INCOMPLETE release-not-pushed with the push line in detail. Run it, then rerun release: it records the release and runs the final gate.

Rerunning the same command continues from the run's recorded state: a planned run is not planned again, and a PASS export of the current source commit goes on to approve. A run whose source moved after export is exported again. An approved run goes straight to publish unless the source moved after approve, which returns INCOMPLETE source-changed and asks for a new --run. A published run reruns the final gate and reports its outcome. When an export FAILs only because an external scanner did, next points at the attempt's scanners.json instead of review.

Create a destination for the first release

Use --first-release when releasing to a new private GitHub repository. Choose a destination separate from the source and use its default branch as --ref. Sign in to gh with access to the destination. For a private HTTPS destination, use the Git credential helper with --use-git-credentials.

coldrelease release /path/to/source --run release-id --denylist /private/terms.json \
  --verify --scanner gitleaks --first-release --use-git-credentials \
  --target https://github.com/example/project.git --ref refs/heads/main
  1. When the CLI reports staged and asks you to create the destination, create a private repository with no README, license, or .gitignore. Rerun the same command. With an existing export, use approve --first-release for this step.
  2. When the CLI reports approved, run the printed push by itself. Approval binds the repository ID, ref, and verified root commit to the run. Git refuses to replace a different commit on the destination branch.
  3. Rerun release with the same options, or run ship with the same target, ref, and verification options. When the CLI reports ready-to-publish with a passing visibility_checkpoint, check the printed head and tree.
  4. From your own terminal, run coldrelease make-public with the same run, policy and --use-git-credentials. It refuses agent sessions and non-interactive input, and asks you to type the repository identifier back. It then checks again that the repository ID, head and refs still match ready-to-publish (FAIL target-moved otherwise, the repository stays private), makes the repository public through the GitHub API by its repository ID and runs confirm-public. The CLI reports public-verified after an anonymous reader sees the exact approved head and tree and the repository identifier still resolves to the approved ID. If confirm-public does not pass, or the command is interrupted, it makes the repository private again by ID, reads it back and reports FAIL with flip_back. It checks the policy and the export before any visibility change. If that flip back fails, it prints an ALERT with the gh api commands that make the repository private by its ID and read it back, and reports flip-back-failed. GitHub has no atomic compare-and-set for visibility, so a push or rename in the short window between the last recheck and the flip is accepted residual risk; confirm-public then fails and the repository is made private again.

To let release do steps 1 to 3, pass --create OWNER/REPO with --first-release instead of --target. When the repository does not exist, the CLI creates it private with gh repo create --private, binds its ID at approval and runs the plain root push itself after checking again that the repository ID matches, it is still private and the branch is empty or already at the approved head. It then runs the final gate and stops at ready-to-publish. It never changes visibility: the owner runs make-public.

GitHub cannot lock a repository private for the length of a push. An owner or admin who makes the destination public, or replaces it, between the recheck and the push would expose the release. After the push the CLI reads the repository again. It returns FAIL first-release-exposed if it cannot confirm the repository is still the approved private one, and target-moved if the branch does not hold the approved commit and tree.

coldrelease release /path/to/source --run release-id --denylist /private/terms.json \
  --verify --scanner gitleaks --first-release --use-git-credentials --create example/project

Refresh an existing release

Use a new run and pass the full reviewed destination commit as --refresh-from to release or approve. For Coldrelease's own versioned releases, prepare the version and changelog using the maintainer guide before starting the run.

coldrelease release /path/to/source --run refresh-id --denylist /private/terms.json --verify --target "$DESTINATION" --ref refs/heads/main --scanner gitleaks --scanner trufflehog --refresh-from "$REVIEWED_HEAD"

A missing or changed destination branch returns target-moved. The staged commit uses the verified export tree and has the reviewed head as its sole parent. A public push leases that head and a private push is a plain fast-forward push, so a refresh only appends: it never force-pushes or rewrites published history. Use coldrelease status SOURCE --run refresh-id --json with the same policy to record source_head, release_head, export_tree and receipt_sha256 at the guarded push checkpoint. After an authorized push, rerun the same release command to gate the destination's exact commit and history. For a public destination, run coldrelease confirm-public on the same run to verify access without credentials.

Record coldrelease --build-info in a fresh install of the candidate and on each operator install you verify. For a Git install at a full commit, pip records the revision. Pass "git+${REPOSITORY_URL}@${COMMIT}" as its install argument, using the release head for a consumer install and the source head for an install from the engine repository. The command reports this provenance as installed_from_commit without displaying the URL. Local directory and wheel installs may report null. Compare module_sha256 against the intended build to verify the installed bytes, including when two builds share a version string.

Ship: publish and gate in one command

After the guarded push, ship runs publish and then the final gate.

Source discovery, scanning, and candidate preparation run on the host. export --verify --verify-backend coldbox runs the declared verification commands in a disposable Coldbox VM. The approval binds the export receipt, which records the Coldbox selection and whether the operator passed --allow-host-fallback. The final gates in ship, release, and confirm-public use that policy, as does the final-gate command from status. If Coldbox is unavailable, the gate returns INCOMPLETE (verify-backend-unavailable) unless the approved export explicitly allowed host fallback. Receipts from before this policy field with Coldbox execution evidence require Coldbox for any gate that can still validate them. For an approved run, omit the backend flags to reuse the approved policy. If you pass --verify-backend coldbox to release, the backend and fallback choice must match the approval. Start a new run to change that policy.

coldrelease ship /path/to/source --run release-id --denylist /private/terms.json --verify --target https://github.com/example/project.git --ref refs/heads/main
  1. publish runs unchanged, so ship refuses before the push (release-not-pushed) and for anything publish refuses.
  2. It clones the target's branch into a temporary directory and runs the guarded final gate on it with --verify, the same options, the export's captured manifest (so the run's triage.json reviews still apply), --expected-export with the approved receipt's head and tree, and reports under the run's final-gate/. If another writer moved the target after the readback, the gate returns FAIL published-receipt-mismatch, even when the new tree would pass on its own.
  3. On a final-gate PASS it prints, and never runs, the visibility change for a GitHub target that is still private. After the change, run confirm-public. For a first release it instead points the owner to make-public, which rechecks the destination, changes visibility, runs confirm-public and makes the repository private again if that does not pass. If the final gate does not pass, the result is FAIL or INCOMPLETE with final-gate-not-pass; fix the source and start a new run.

Run state is serialized with an OS lock (flock) on the run's .lock file, so a second command on the same run returns INCOMPLETE run-locked. The operating system releases the lock when its process exits, so a .lock file left by a killed process or a crash does not block the next command. Run markers (approval.json, published.json and the other JSON records) are written to a temporary file and linked into place, so an interruption leaves either no marker or a complete one, at most beside a dot-prefixed temporary file that plan ignores. A prepared approval is never overwritten. Start a new run when an approval needs replacement. Keep the old run for review. Incomplete prior plans are excluded from baseline and triage selection, so an interrupted plan does not prevent starting a new run.

Optional readtrial reports belong beside the run's evidence, outside its export. Hosted push protection, Scorecard, and Allstar are advisory follow-ups and do not replace this gate. No GitHub Actions, hosted CI, history rewriting or OCR is part of this workflow. The audit expands zip, tar, gzip and PDF Flate content in memory.

Confirm the public release

After the visibility change, check that the public target still holds exactly the approved export:

coldrelease confirm-public /path/to/source --run release-id --denylist /private/terms.json

It checks the approval and the published receipt the way status does, checks that --denylist, --private-repo, --timeout and the export's captured manifest still match the receipt's bindings (INCOMPLETE receipt-stale otherwise; pass the same options as export), clones the approved target and ref without credentials, and runs the guarded final gate with --verify and --expected-export set to the approved receipt's head and tree. Reports go under the run's public-gate/. On PASS it writes public-verified.json (published head, export tree, receipt hash and report path) and status shows public-verified. Resolve the marker's report path from the directory containing the marker. If an older marker lacks the public-gate/ prefix, resolve its path inside public-gate/.

  • A target that moved after ship or publish, including between the final gate and the visibility change, returns FAIL published-receipt-mismatch. An extra ref returns FAIL published-extra-refs. Do not leave it public.
  • For a tagged first release, pass --release-tag TAG every time you run confirm-public. The option applies only to first releases. The gate requires that exact lightweight tag at the approved head and rejects every other extra ref.
  • A target that is still private cannot be cloned without credentials and returns INCOMPLETE published-clone-failed. --use-git-credentials is refused (git-credentials-selection), because the check must read the public URL as an anonymous reader would. Git runs with an empty temporary HOME, so a ~/.netrc cannot log in either. A GitHub SSH target is read over its https://github.com/OWNER/REPO.git URL, because SSH keys would still work on a private repository. Any other SSH target, a local path or a URL with a user information returns INCOMPLETE public-url-unknown: nothing proves it is public.
  • Once the run is found and locked, the command removes any earlier public-verified.json before any other check, so every later non-PASS leaves none. Flag errors that stop the command before it opens the run change nothing.
  • A run that was never published returns INCOMPLETE not-published.

Run final gates on the published export

Use the guarded published-target command for any final-gates claim about the latest published export. Supply a clean export checkout, the reviewed destination URL and full branch ref, and the same denylist, external manifest, and verification options. The guard compares the candidate HEAD with the authoritative git ls-remote result before scanning and rechecks the remote and candidate afterward. An arbitrary older export passing plain --verify, or a retained receipt passing --validate-receipt, is not evidence that the latest publication passed final gates.

Reproduce the synthetic acceptance test

From a Coldrelease clone, run these exact commands. No external remote, account or service is used.

python3 -m unittest discover -s tests -p test_release_workflow.py -k test_cli_unsafe_repaired_blocked_then_guarded_push_and_publish -v
python3 -m unittest discover -s tests -p test_release_workflow.py -v
python3 -m unittest discover -s tests -q

The acceptance test invokes the real release_check.py CLI in subprocesses. An unsafe tracked file fails check, repaired content passes, the export passes actual verification in a fresh virtual environment with a synthetic gitleaks, approve records the release, and publish refuses until the printed push to a disposable local bare repository has landed; the branch is then read back and proven to contain exactly one commit. Other tests cover stale receipts, changed recipes/policies, approved scanner set and digest tampering, scanner completeness/errors/timeouts, target/ref mismatches, lease races, the owner's switch, the reference denylist, branch protection, the 7-day limit, the host hop, and appending to an existing branch. tests/test_guard_record_drift.py (kept out of the public export with its guard copy) runs a pinned copy of the Coldlocker publication guard against the record approve writes, so the two cannot drift. Most focused safety tests replace only project verification to avoid repeating environment setup; Git, receipt validation and local push behavior remain real.

On this pagePreflight cacheSurvey many repositoriesPrepare a runFunctional evidence for ColdVerify consumersRemove old attemptsSee where a run isCarry a reviewed finding forwardSanitize a candidate copyReview one otherwise forbidden export pathApprove and push through the publication guardThe sequenceWhat approve checks and writesThe guarded pushMove a run to the push hostThe reference denylistRemovedRelease: every step in one guided commandCreate a destination for the first releaseRefresh an existing releaseShip: publish and gate in one commandConfirm the public releaseRun final gates on the published exportReproduce the synthetic acceptance test