Repository navigation
v1.4.0: Pin forge identity by repository ID; accurate libc and architecture for Linux artifacts
packslip verify and the library can now pin a GitHub or GitLab project by its repository ID, not just its name, so renamed repositories keep verifying and a recreated name is rejected. packslip create also stops recording static Linux builds as gnu and recognizes more architecture spellings. It now refuses Linux and BSD artifacts whose architecture it can't work out, which may require changes to existing release jobs (see Breaking Changes).
Added
- Forge identity pinned by repository ID. Until now a project's name was its identity: a consumer that asked for
github.com/jdx/rtxrejected releases after the repository was renamed tojdx/mise. A name-based pin would also accept releases from a new repository created under an old name. Fulcio certificates from GitHub Actions and GitLab CI record the forge's IDs for the repository and its owner. The repository ID stays the same through a rename or transfer. The owner ID changes on a transfer. (#135, @jdx)-
packslip verifyprints these IDs for keyless bundles, and--jsonadds asource_repositoryobject:ok: github.com/jdx/hk 2.3.0 published … signed by … (sigstore-oidc) … repository https://github.com/jdx/hk (id 922514152), owner https://github.com/jdx (id 216188) -
New library APIs
verify_forgeandverify_forge_release_listcheck a verified release against the consumer's storedForgePin. Without a pin, they check it against the repository ID the forge resolves the requested name to. There are four outcomes:- Same repository: accepted.
- Same repository ID under a new name: accepted as
Continuity::Renamed, including releases signed before the rename. - Same repository ID with a different owner: rejected with
IdentityError::Transferredunless the consumer callsaccepting_transfer(true). - Different repository ID: rejected with
IdentityError::DifferentRepository.
use packslip::forge::{Continuity, Expected, ForgePin}; let expected = Expected::new("github.com/jdx/hk") .pinned(stored_pin.as_ref()) .resolved(api_repository_id.as_deref()) .accepting_transfer(user_said_yes); let accepted = packslip::verify_forge(&bundle, &expected, options, &artifacts)?;
Also added:
sigstore::SourceRepository,sigstore::source_repository, and theforgemodule (ForgePin,Expected,Continuity,Check,IdentityError,check,policy). All additions are backward compatible, andcargo-semver-checksreports no breaking change against 1.3.0. -
The specification has a new Forge identity section and updated consumer rules for renames, transfers, and monorepo subpaths. It also documents the limits:
- Trust on first use when there is no pin.
- Without a pinned owner ID, an owner rename looks like a transfer.
- Certificates issued before Fulcio recorded the IDs are checked by name only.
-
anyis accepted forarchandlibc, both on the command line and in the manifest, to leave a field out on purpose (#134, @jdx):dist/mytool.tar.gz:linux/any # a Linux build for every architecture dist/mytool.tar.gz:linux/x86_64/any # a Linux x86_64 build that loads no C library
Fixed
-
Static Linux builds are no longer marked
libc: gnu. Before, every Linux artifact withoutmuslin its name was recorded asgnu. That included fully static binaries such as Go builds withCGO_ENABLED=0, so musl hosts like Alpine found no match. When the name doesn't saymuslorgnu,createnow reads the libc from the--binexecutables. (#134, @jdx)- If every executable is static,
libcis omitted. - If an executable is loaded by
ld-muslor linkslibc.musl-*,libcismusl. - Otherwise
libcisgnu, as before. This also applies when there are no executables to read, for example with no--binor with--no-libs.
Values given in the manifest or on the command line still take precedence, followed by what the name says.
- If every executable is static,
-
More architecture names are recognized (#134, @jdx):
- goreleaser's
386andia32are recorded asi686. Before, they were recorded with noarch, which means "any architecture", so an armv7 or riscv64 host could be given an x86 binary. The match only applies to a separate word, so the386in a version like1.386.0is ignored. - A plain
armisarmv6, the default for both goreleaser and Rust. ppc64elispowerpc64le.win64isx86_64when nothing else in the name gives an architecture.- MIPS and big-endian POWER are recorded with Rust's spelling (
mips,mipsel,mips64,mips64el,powerpc64).
- goreleaser's
Breaking Changes
packslip createnow fails for a Linux, BSD, or Android artifact whose architecture it can't infer from the name, for exampletool-linux.AppImage. It used to record these as fitting every architecture. This affects any release job that runscreateon such files.- Exempt:
.noarch.rpmand_all.debpackages, macOS and Windows artifacts, and portable artifacts (:any,portable = true). - To fix it, give the architecture explicitly, or use
anyif the build really runs everywhere:$ packslip create ... tool_linux.tar.gz Error: artifact "tool_linux.tar.gz" is for linux, but nothing in the name says which architecture; give it as PATH:linux/x86_64 or arch = "x86_64" in the manifest, with any in place of x86_64 if the build runs on every architecture
- Exempt:
- Library:
packslip::create::infer_platformnow returns alibconly when the name says one, and never for an OS other than Linux. Thegnufallback now happens increate. New APIs:create::ANY,Error::UnknownArch, andlinkage::{Libc, elf_libc}.
The CLI, library, and Action share one semver version, and this release bumps it to 1.4.0. The packslip format itself is unchanged and stays at version 1. The forge identity rules are consumer rules, not a schema change.
Full Changelog: v1.3.0...v1.4.0