Repository navigation
Description
Follow-up from #2270. The Snap Store flagged stale ca-certificates in revisions r12–r14: v1.2.0-rc.1 builds from 2024-05 that were still published on candidate/beta/edge. Those channels have been closed and now follow stable (v1.3.5). The items below keep this from happening again.
- Release stable builds to
candidateas well, so that channel can't go stale - Remove
stage-packages: ca-certificatesfromsnapcraft.yaml - Add an ORAS owner as a collaborator on the
orassnap in the Snap Store, and regenerateSNAPCRAFT_STORE_CREDENTIALSwith narrower permissions
Feasibility
- Stale
candidatechannel. This is a one-line change inrelease-snap.yml#L45: changerelease=stabletorelease=stable,candidate. The upload step already passes$SNAP_RELEASEto--release, which accepts a comma-separated list of channels. - Remove
ca-certificates. Deletesnapcraft.yaml#L41-L42. The package was added in chore: add snap for ubuntu #965, when the snap was strictly confined. Since ci(release): add dispatch GHA for snapcraft classic release #1256 the snap usesconfinement: classic, and the binary is pure Go (built withCGO_ENABLED=0), so it reads the host's/etc/ssl/certs. Nothing in the repo setsSSL_CERT_FILEor refers to$SNAPpaths, so the bundled certificates are never used. Their only effect is to trigger the store's security notices. - Store access. This isn't a code change. Today no ORAS owner is a collaborator on the snap. The publisher (
toabctl) has to add one, or an existing collaborator can if the store allows them to invite others. Regenerating the token also needs an owner with store access.
Effort
Small. Items 1 and 2 fit in one PR that touches two files. Item 3 is coordination with people, not code.
Risk
- Item 1: low risk. If an RC is on
candidatewhen a stable release goes out, the stable build replaces it. That's the behaviour we want. - Item 2: low risk, but there are no snap tests, so it needs checking by hand. Confirm that TLS still works from the installed classic snap on a plain Ubuntu host, both for registry calls and for credential helpers.
- Item 3: limiting the token to this snap and adding an expiry shrinks what a leaked token could do. If the new token is too narrow, the release workflow fails at the publish step, so test it with a
candidaterelease. - None of this touches the CLI's Go code or user-facing behaviour.
Suggested approach
-
One PR covering items 1 and 2:
- Change
release-snap.ymlto setrelease=stable,candidatewhenisStableis true. - Remove the
stage-packages: - ca-certificatesblock fromsnapcraft.yaml.
- Change
-
Verify the PR locally:
- Fill in the placeholders and build:
sed 's/{VERSION}/v1.3.5/;s/{ARCH}/amd64/' snapcraft.yaml, then runsnapcraft. - Install it with
sudo snap install --classic --dangerous oras_*.snap. - Run
oras repo tags ghcr.io/oras-project/oras, then an authenticated login and pull. - Check that
unsquashfs -lno longer listsetc/ssl.
- Fill in the placeholders and build:
-
Check the next release: after the next stable release, confirm with
snapcraft status orasthatstableandcandidateboth show the new revision. -
Store access (item 3): once an owner is a collaborator, they regenerate the CI token. The exact ACL names should be checked with
snapcraft export-login --help. The documented ACLs arepackage_access,package_manage,package_metrics,package_push,package_register,package_releaseandpackage_update; uploading usespackage_push.snapcraft export-login --snaps oras \ --acls package_access,package_push,package_update,package_release \ --expires <date> creds.txt
Put the result in the
SNAPCRAFT_STORE_CREDENTIALSrepo secret. Optionally, move publishing to a publisher account the project controls.
Related code
.github/workflows/release-snap.yml#L44-L47: chooses the target channel fromisStable..github/workflows/release-snap.yml#L80-L86: the publish step, which runssnapcraft upload --release "$SNAP_RELEASE"withSNAPCRAFT_STORE_CREDENTIALS.snapcraft.yaml#L20:confinement: classic.snapcraft.yaml#L41-L42: theca-certificatesstage package.Makefile#L76-L79: thebuild-linux-<arch>targets thatoverride-buildcalls.- Tests: none for snap packaging. The only check is a successful
release-snaprun, which happens only on manual dispatch.
References: Snapcraft authentication, Snapcraft authentication options
Activity
TerryHowe commentedon Oct 23, 2026
Re: store access.
[email protected]is reportedly a collaborator on theorassnap, which would cover the first half of item 3. Can someone with that login confirm, either withsnapcraft loginthensnapcraft status oras, or from the snapcraft.io/oras Collaboration page? @SamirPS, as a collaborator you should also be able to see whether it's listed there.SamirPS commentedon Oct 23, 2026
I see the email
[email protected]on the snap dashboardketchupz1999 commentedon Oct 23, 2026
I reproduced the stale-channel/package-content conditions and implemented the two code items in this issue: publishing stable builds to both
stable,candidate, and removing the unusedca-certificatesstage package.The snap builds successfully, no longer contains
etc/ssl, and the packaged binary can access GHCR using the Ubuntu host CA store. I also verified authenticated login, push, and pull through a Docker credential helper against a temporary local registry.I can open a draft PR today. The remaining validation gap is installing the artifact through snapd on a plain Ubuntu host.
TerryHowe commentedon Oct 23, 2026
Done