Repository navigation
ci: cosign from the rules_img_signer_cosign toolchain (v3.1.2), not cosign-installer - #995
Merged
Merged
Conversation
…osign-installer One pinned cosign for signing and verifying, in CI and locally: the official release binary that bazel_dep rules_img_signer_cosign 0.0.1 downloads per platform, sha256-pinned in that module's lock (v3.1.2). Bumping cosign is now bumping the bazel_dep. - MODULE.bazel: bazel_dep(rules_img_signer_cosign, 0.0.1). Only the CLI (@rules_img_signer_cosign//cosign) is used. The module's sign-oci-artifact signer plugin is not: it stores signatures as OCI 1.1 referrers, and ghcr.io has no Referrers API. - //tools/cosign: an sh_binary that runs the pinned binary from runfiles in the caller's directory with the caller's environment. //tools/cosign:verify_image_signatures wraps scripts/verify-image-signatures.sh with COSIGN exported (the script still runs standalone). //tools/cosign:version_test is a network-free guard that the binary is v3.1.2. - publish.yaml, proxy-release.yml (sign job) and publish-verify.yaml: the SHA-pinned sigstore/cosign-installer steps are replaced by `bazel build //tools/cosign` and `bazel run //tools/cosign -- sign --yes --recursive ...` / `bazel run //tools/cosign:verify_image_signatures -- ...`. These run locally with no --config=remote. proxy-release's sign job and publish-verify gain a plain Setup Bazel step. `bazel run` execs with the client environment, so the Actions OIDC request variables reach cosign; this was checked locally with a --run_under env probe. - runbook + script headers: `bazel run //tools/cosign` is how you get cosign, and the runbook explains why the signer plugin is not used. Verified by hand with the new target: agent@066267b6 (main 7f8f825, bundle layout) PASS 3/3; agent@14949387 (5b0c199, legacy .sig) PASS 3/3; aether-proxy@574d5211 under the proxy-release identity PASS 3/3, the first hand verification of a signed proxy image; aether-proxy@938c5a57 (pre-signing) FAIL "no signatures found" x3, as expected. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 27, 2026
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 27, 2026
…uay migration phase 1, no behaviour change) (#998) * ci: one image-registry setting and a quay-capable registry library (Quay migration phase 1, no behaviour change) Proposal 040 moves every image and chart from ghcr.io/bpalermo/aether to the quay.io org `aethermesh`. This is phase 1: nothing moves yet, but the move becomes a one-file flip and the verification library already works against both registries. One setting: bazel/img/registry.bzl (IMAGE_REGISTRY, IMAGE_NAMESPACE, IMAGE_NAME_OVERRIDES, CHART_REPOSITORY_PREFIX + image_repository(), image_reference(), chart_repository(), chart_registry_url(), registry_token_url()). Every go_multi_arch_image call site, the chart pushes and the proxy-supervisor template test, the e2e go_test (x_defs) and //bazel/proxy_pin read it; the //proxy workspace carries a byte-identical copy (proxy/bazel/registry.bzl). Workflows, verifiers and e2e scripts read it through scripts/image-registry.sh (strict parse, no defaults); IMAGE_REGISTRY / PROXY_IMAGE in the workflows are now derived into $GITHUB_ENV. scripts/check-registry-config.sh (ci + proxy shell jobs) asserts the setting parses, the proxy copy matches, the aether-proxy pin agrees, and no literal survives outside a written-down allow-list; //bazel/img:registry_test pins the shell reader against the Starlark helpers. scripts/ghcr-lib.sh -> scripts/registry-lib.sh (ghcr-lib.sh is a shim; every ghcr_* name is an alias): REGISTRY_HOST-parameterised, per-host token endpoint (ghcr /token, quay /v2/auth), and registry_referrers (OCI 1.1; a 404 means "no API", never "no signatures"). registry_signature_layout[_direct] now also reports `referrer` for a cosign sign-bundle referrer (an attestation bundle or a buildx attestation does not count). check-ghcr-lookup.sh -> check-registry-lookup.sh with a fake quay; check-signature-layout.sh gains the referrer cases. Every rendered coordinate is unchanged (image_push/image_load/oci_push/helm push targets queried before and after). Chart patch versions bumped because their BUILD files changed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * chart: 0.95.6 (main took 0.95.5 with the #995 proxy pin) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Sep 27, 2026
…fetch, so proxy.golang.org flakes stop failing jobs (#1001) (#1016) * ci: persist Bazel's repository cache across runs and retry the first fetch, so proxy.golang.org flakes stop failing jobs (#1001) The repository cache was already restored (setup-bazel repository-cache: true) but keyed on the root MODULE.bazel alone, shared with the proxy workspace's jobs, and saved by whichever job finished first. A job that fetched little -- or a proxy job -- could write the entry every later job restored as an exact hit and never re-saved, which is how #995's netns job fetched googleapis/api from proxy.golang.org with a 1.9 GB cache freshly restored. - Key on MODULE.bazel + MODULE.bazel.lock + go.mod + go.sum (root) and proxy/MODULE.bazel + proxy/MODULE.bazel.lock (proxy), in separate cache-version namespaces (root-1 / proxy-1). - One saver per workflow (ci/main `diff`, the proxy build matrix per arch), whose warm-up fetches for all of //...; every other job cache-save: false. - scripts/ci-bazel-warmup.sh: `bazel build --nobuild` as each job's first Bazel step, retried 3x with 20s/40s backoff only on a repository-fetch error, never talking to BuildBuddy. scripts/check-ci-bazel-warmup.sh pins the contract with a stub bazel in the `shell` job. - docs/runbook.md: "CI: external repository fetches". Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * ci: empty commit — second CI run to prove the repository-cache restore (#1001) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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
This PR gives the repo one pinned cosign for signing and verifying, in CI and on a workstation. It comes from
bazel_dep(name = "rules_img_signer_cosign", version = "0.0.1"), which provides the official release binary as@rules_img_signer_cosign//cosign. The binary is sha256-pinned per platform in the module'scli/cosign_cli.lock.json, currently v3.1.2. It replacessigstore/cosign-installer@6f9f177…(v4.1.2, which installs cosign v3.0.6) in all three workflows. To bump cosign, bump the bazel_dep.//tools/cosign(sh_binary, public): runs the pinned binary from runfiles. It runs inBUILD_WORKING_DIRECTORYwith the caller's environment. Usage:bazel run //tools/cosign -- <args>.//tools/cosign:verify_image_signatures(public): wrapsscripts/verify-image-signatures.shand exportsCOSIGNas the pinned binary. The script still works standalone.//tools/cosign:version_test: network-free check thatcosign versionreportsGitVersion: v3.1.2. I saw it fail withEXPECTED=v3.0.6before setting the real value.publish.yamland theproxy-release.ymlsignjob now runbazel build //tools/cosignfirst. Signing isbazel run //tools/cosign -- sign --yes --recursive …, with the same flags as before. Verifying isbazel run //tools/cosign:verify_image_signatures -- ….publish-verify.yamlruns its cosign pass through the same target.proxy-release.ymlsignandpublish-verify.yamlhad no Bazel setup. Each now has the plainSetup Bazelstep used byci.yaml'sshelljob (bazelisk and repository cache, no BuildBuddy key).--config, so cosign is fetched and run locally on the runner, never on RBE.docs/runbook.mdcosign section and the script headers now saybazel run //tools/cosignis the way to get cosign.Why only the CLI, not the module's signer plugin
rules_img_signer_cosignalso shipssign-oci-artifact, a plugin for rules_img'ssigning_config/img deploy. That plugin stores signatures as OCI 1.1 referrers, but ghcr.io has no Referrers API. The sign step, the verify step and thepublish-verifysweep all rely on cosign'ssha256-<hex>tag, so signing stays an explicitcosign signstep after the pushes.How OIDC reaches cosign under
bazel runbazel runexecs the binary with the Bazel client's environment, which here is the step's environment.--incompatible_strict_action_envand--action_envonly affect build actions, not the run, and the wrapper execs cosign without changing the environment. SoACTIONS_ID_TOKEN_REQUEST_URLandACTIONS_ID_TOKEN_REQUEST_TOKEN(provided byid-token: write) reach cosign unchanged, as doesCOSIGN_YES.I checked this locally with a
--run_underprobe on//tools/cosign, with both variables set in the calling shell. The target process received both, andBUILD_WORKING_DIRECTORYwas the caller's directory.Not provable before merge: the keyless sign itself. It runs only on
main, and nothing was signed from this branch.Verification (read-only, workstation, linux/amd64)
agent image from main's latest publish (7f8f825, tag
dev-7f8f825…, bundle layout):The same PASS came from a relative
--filerun from another directory. v3.1.2 also verifies the legacy.siglayout:agent@sha256:14949387…(5b0c199, 2026-09-22) passes 3/3.aether-proxy
574d5211…, under the proxy-release identity. This is the first hand verification of a signed proxy image:Expected failure: the old unsigned proxy
938c5a57…:Other checks:
bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //tools/... //scripts/...is green. The shellcheck reports for all three new scripts exist and are empty, so they were actually linted.bazel test //tools/...passes.scripts/check-shell-lint.shreports OK (36 scripts covered).Things to watch
--new-bundle-formatand other flags as deprecated for v4, and they no longer show in--help. The sign step never passed any of them. I could not check locally whether v3.1.2 still writes thesha256-<hex>fallback tag on ghcr.io, because that needs a real sign. After the first post-merge publish,publish-verify's registry-side layout check will confirm it.cosign verifystill has no--recursivein v3.1.2, so the walk in the verify script is still needed.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr