Repository navigation
feat(triage): kit triage release checks a prebuilt release archive or binary - #1108
Merged
sandstream merged 2 commits intoNov 27, 2026
Merged
Conversation
… binary kit had no triage for the install path a prebuilt binary takes: download, extract, chmod +x, run or move onto PATH (kit-research#233, G1). `kit triage release <url|file>` reports five checks, each pass, fail or unverified as `kit triage pkg` does: - checksum: SHA-256 against --checksum, or the publisher's checksum files next to the asset (checksums.txt, SHA256SUMS, <asset>.sha256) and GitHub's asset digest; sources that disagree fail; - signature: minisign or cosign with a key the user names, verified with node:crypto; never a key from the release itself. OpenPGP and keyless Sigstore are unverified; - age: a GitHub release's publish date through the cooling period; a latest/download URL and a draft fail; - repository: against --repo, and against the repository GitHub serves the release from; - archive: tar, tar.gz and zip members, read from headers only, failing absolute paths, "..", links out of the tree, setuid/setgid and special entries. xz, bzip2 and 7z are unverified. It passes only when every unverified check is accepted by name, and a pass for a URL records a `release` receipt with the file's digest. Nothing from the file is executed. No new dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… streams CI's coverage gate wants a sibling test for every new source file, so the archive, signature, checksum-source, URL and cooling tests move next to the modules they test, and the tar, zip and URL parsers get direct tests. Also: - close the archive file stream however the listing ends, so Windows does not hold the download when the temporary directory is removed; - a zstd stream that holds a single file is "not an archive", as gzip's is; - a missing or garbled Content-Length is not taken as small; - helpers no other file uses are no longer exported. Test-Growth: a new triage command with five checks over three archive formats, two signature schemes and four checksum forms; each module needs its own fixtures, and the coverage gate requires a sibling test per module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
sandstream
deleted the
claude/web-kit-status-sync-p6fg9a-triage-release
branch
November 27, 2026 11:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
kit triage release <url|file>checks a prebuilt release archive or binary before it is extracted, made executable, run or put on PATH. It closes the triage half of gap G1 in kit-research#233:kit triage --helphadpkgfor macOS installers and nothing for a release archive or a bare binary.Five checks, each
pass/fail/unverified, reported the waykit triage pkgreports them:--checksum(hex or a list file), else every checksum source the publisher put next to the asset (checksums.txt,SHA256SUMS,*_checksums.txt,<asset>.sha256) and GitHub's own assetdigest.minisig, Ed25519, prehashedEDor legacyEd, plus the trusted-comment signature) or cosign key (.sig, ECDSA/RSA over SHA-256) signature verifies with a key the user names (--minisign-key,--cosign-key), on the asset or on a checksum list that covers it.asc, keyless Sigstore bundles, a signature with no key, or no signaturepublished_atis past the cooling period ([supply_chain],KIT_MIN_RELEASE_AGE_DAYS,KIT_COOLING_ENFORCE: the samecoolingCheckpackages use)releases/latest/downloadURL (it moves)KIT_GITHUB_API--repo owner/repomatches the URL--repo, or not GitHub.., symlinks or hard links out of the tree, setuid/setgid, device/fifo entries, a malformed archiveIt passes only with no
failand everyunverifiedcheck accepted by name (--accept-unverified signature,age), so an unsigned release is never a silent pass. A pass for a URL appends areleasereceipt (canonical URL,contentDigest: sha256:…) to.kit-triage.jsonl; a local file without--urlgets no receipt and is told why.Design decisions
mkdtempdirectory (0600,wx) and is removed, and the streams are closed before removal so Windows does not hold the file.minisign.pubnext to it, so the key comes from the user. A checksum list from the same release is integrity only; the report says the signature is what speaks to authenticity.coolingCheck,limitFromandenforceFrom; air-gap usesregistryBase(… "KIT_GITHUB_API" …)and downloads nothing; the GitHub token goes only to the API base, never to a download host.node:crypto(Ed25519, BLAKE2b-512, ECDSA),node:zlib,fetch.src/commands/triage-release.tsalready holdstriage cargo|go, so the command lives intriage-release-asset.ts.Docs
docs/COMMANDS.mdis at its 600-line cap, sotriage releaseis folded into thetriage pkgrow (still 600 lines). Help entry insrc/subcommand-help.ts, help row,TRIAGE_TYPES,docs/FEATURES.md, changelog fragmentchanges/triage-release.md.src/flag-surface.ts,contracts/public-surface.jsonandcontracts/kit.opencli.jsonregenerated after a build.Tests
A sibling test for each new module (10 files, 29 tests): archives built in memory, keys generated in the test, stubbed fetch, neutral hosts (
h.example); no real download. 722 net new test lines, stated in aTest-Growth:trailer. Smoke-tested against real GNUtarand Info-ZIPzip -youtput (a symlink to/etc/passwdfails in both).Prepush
node scripts/prepush.mjs --allow "enforcement gate liveness"(run on the stacked branch, which contains this one): build, format, lint, changed-file tests, coverage gate, test growth (trailer), self-audit and the session-URL checks pass;kit adr checkpasses. Only the known local-only items remain:kit review --enforce(setup gaps:gh auth, infisical, uninstalled scanners) and Semgrep not run (!, 1.184.0 not installed).Platforms
Linux tested. The code uses
node:path, no shell and no child process. Windows runs in CI. macOS is unverified: no CI job runs it.The gate that asks for this receipt is the stacked protected PR.
Refs kit-research#233.
Generated by Claude Code