Skip to content

ci(release): let the signing actions run in a called workflow - #1465

Merged
robinnsc merged 1 commit into
mainfrom
ci/sign-in-called-workflow
Dec 3, 2026
Merged

robinnsc merged 1 commit into
mainfrom
ci/sign-in-called-workflow

Conversation

@robinnsc

@robinnsc robinnsc commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Release automation (#1395), PR 2 of 6. Stack: #1464 PR title check ← #1465 signing in a called workflow ← #1466 freeze-migrations ← #1467 release-please ← #1468 rehearsal ← #1469 release-publish. Merge in that order.

What

Lets the release workflows sign images when another workflow calls them through workflow_call, and makes every keyless cosign verify of a release signature also check the repository. A release workflow dispatched on its own, as every release run is today, signs and verifies under the same identity as before.

  • sign-image action: a new signer-workflow input, the base name of the file that holds the signing job. The post-sign verify then expects that file at the run's ref, which holds when the caller calls it as ./.github/workflows/<name>.yml. Without the input, it expects GITHUB_WORKFLOW_REF as before. release-image, release-dev-image and sign-image pass their own names.
  • Repository check: --certificate-github-workflow-repository ExtendDB/extenddb on every keyless verify of a release signature: promote-registry, the re-entry check in release-dev-image, sign-image's post-sign verify, and the commands in the four Docker Hub overviews. The trigger check stays workflow_dispatch, which the publishing run also has: release.yml dispatches it (ci(release): publish a release when the release PR merges #1469).
  • Selftest: keyless-signing-selftest gets a second job that calls a new keyless-signing-selftest-called workflow, which signs a throwaway image with the real action.

Why

The publishing workflow of #1395 calls the release workflows through workflow_call. Two assumptions break there:

  • sign-image verifies a new signature against GITHUB_WORKFLOW_REF, which in a called workflow names the caller. Fulcio puts the called file in the certificate (job_workflow_ref), so the verify would fail right after signing.
  • Any public repository can call a reusable workflow stored in a public repository, and the certificate's SAN then names the called file in this repository. The run's repository is in a separate certificate extension, which the verify commands did not check.

Testing done

  • Selftest run at this PR's head: https://github.com/ExtendDB/extenddb/actions/runs/46828549106. The called job checks that the certificate names the called file at the caller's ref, that cosign refuses the caller's identity, that the trigger is the caller's event, and that the repository check passes for this repository and refuses another. A refusal counts only when cosign reports the mismatch, so a registry or Rekor error fails the job.
  • The published commands with the repository flag pass on the 0.1.15 and 1.0.0 signatures of all four images, and fail with another repository value. Same for the promote-registry and release-dev-image flags, on Docker Hub, GHCR and ECR Public.
  • actionlint and devtools/check-actions-pinned are clean.

The called selftest job builds and pushes its own throwaway image instead of taking the caller's digest. The caller's job signs its own image, so on a shared digest the caller's identity would verify, and the check that the caller's identity does not verify would have nothing to refuse. The two jobs run in parallel (56 s and 36 s in run 46828549106). keyless-signing-selftest-called.yml's header says the same.

Before and after merging

  • Merging starts a Docker Hub description run for the four overviews, which waits for a dockerhub approval. Approve it so Docker Hub shows the commands with the repository flag.
  • The release notes of v0.1.15, v1.0.0 and v1.1.0 give the verify commands without the repository flag. Add --certificate-github-workflow-repository 'ExtendDB/extenddb' to both commands in each with gh release edit.

Checklist

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace): not run, no Rust change
  • Code is formatted (cargo fmt --check): no Rust change
  • Clippy is clean (cargo clippy -- -W clippy::pedantic): no Rust change
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)
  • If this changes the wire protocol, Storage trait, auth model, on-disk
    format, or public CLI surface, an RFC has been accepted or is linked
    below. Otherwise, an ADR captures the decision (link below).

ADR / RFC: n/a: CI and release tooling only; the design is discussed in #1395

Breaking changes

None. The published verify commands gain one flag; the old commands still verify the same signatures.


By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.

This lets the release workflows sign images when another workflow
calls them through workflow_call, and makes every keyless cosign
verify of a release signature also check the repository. A release
workflow that is dispatched on its own, as every release run is today,
signs and verifies under the same identity as before.

The release automation tracked in #1395 runs the release workflows from
a publishing workflow through workflow_call, in a dispatched run:
release.yml dispatches it when a release PR merges, and a maintainer can
dispatch it to retry. The sign-image action assumes that each workflow
is dispatched on its own, and the keyless verify commands assume that
only this repository can run the signing workflows.

The sign-image action verifies a new signature against
GITHUB_WORKFLOW_REF. In a called workflow that names the calling file,
while Fulcio puts the called file in the certificate (the OIDC token's
job_workflow_ref), so the verify would fail right after signing. The
action takes a signer-workflow input, the base name of the file that
holds the signing job, and then verifies that file at the run's ref.
Without it, the verify is unchanged. release-image, release-dev-image
and sign-image pass their own names, which gives the same identity as
before when they are dispatched.

Any public repository can call a reusable workflow that is stored in a
public repository. The certificate's SAN then names the called file in
this repository, whichever repository the run belongs to. The
certificate records the run's repository in a separate extension, so
every keyless cosign verify of a release signature in this repository
also passes --certificate-github-workflow-repository ExtendDB/extenddb:
promote-registry, the re-entry check in release-dev-image, sign-image's
post-sign verify, and the commands in the four Docker Hub overviews. The
verify commands in the published release notes of 0.1.15, 1.0.0 and
1.1.0 lack the flag; they are edited after this merges. Keyless
signatures from 0.1.15 on carry the extension; the published commands
pass on 0.1.15 and 1.0.0 and fail with another repository. The trigger
check stays workflow_dispatch, which a dispatch made by release.yml also
gives.

keyless-signing-selftest gets a second job that calls a new
keyless-signing-selftest-called workflow, which signs a throwaway image
with the real action. Its first step refuses to run outside
ExtendDB/extenddb. It checks that the certificate names the called file
at the caller's ref, that cosign refuses the caller's identity, that
the trigger is the caller's event, and that the repository check
passes for this repository and refuses another. A refusal counts only
when cosign reports the identity or repository mismatch, so a registry
or Rekor error fails the job. The published cosign verify commands
name the signing file at refs/heads/main, so these are the properties
they depend on. The roundtrip verify in the first job checks the
repository too.

Merging this starts a Docker Hub description run for the four
overviews, which waits for a dockerhub approval.

Signed-off-by: Scott Robinson <robinnsc@amazon.com>
@robinnsc
robinnsc force-pushed the ci/sign-in-called-workflow branch from 3b94c94 to 48b2cb6 Compare December 2, 2026 06:56

@LeeroyHannigan LeeroyHannigan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I read the change against main 92155f3. actionlint 1.7.12 finds nothing in the five workflows that this PR changes, at this head and at the merge base. On the whole .github/workflows directory it reports the same 53 findings at both, all in files that this PR does not change.

With signer-workflow set, the post-sign verify expects the identity of the called file, which Fulcio takes from job_workflow_ref. Without it, the verify uses GITHUB_WORKFLOW_REF as before, so the three release workflows verify as on main. Each verify of a release signature now also requires the run's repository. The selftest at this head covers both identities and the repository flag: run 46828549106 passed selftest and selftest-called / sign-in-called-workflow.

The merge steps add the repository flag to the v1.1.0 release notes, and the description tests it on the 0.1.15 and 1.0.0 signatures. I ran the published commands with --certificate-github-workflow-repository 'ExtendDB/extenddb' on the four 1.1.0 images: extenddb-postgres, extenddb-mongodb, extenddb-cassandra and extenddb-dev. All four passed. With ExtendDB/extenddb-x in its place, all four failed with "expected GitHub Workflow Repository not found in certificate".

Small points, none of them a condition:

  • Testing done cites run 45532804107 at 1c9f7fd. The post-sign verify changed after that run, because the repository value is now the literal 'ExtendDB/extenddb'. Run 46828549106 at this head is the one to cite.
  • promote-registry and the re-entry step of release-dev-image.yml keep --certificate-github-workflow-trigger workflow_dispatch. In a called workflow the trigger is the caller's event, so the caller that #1469 adds must stay on workflow_dispatch.
  • keyless-signing-selftest.yml:17-20 names release-publish.yml, which only #1469 adds. A reader of main would find no such file, so naming #1469 there would help.
  • keyless-signing-selftest-called.yml repeats the login, Buildx, build-and-push with its digest step, and cleanup steps of the existing selftest job. The login has to stay, to push the signature. The caller could build the image and pass the digest as a workflow_call input. If the called job needs its own image, please say why in the description.

No other open PR changes these files for the same purpose. #822 merges clean with this PR. Your #325 conflicts in sign-image/action.yml, but it predates the keyless signing of #754.

@robinnsc
robinnsc added this pull request to the merge queue Dec 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Dec 2, 2026
@robinnsc
robinnsc added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit c444cfc Dec 3, 2026
66 checks passed
@robinnsc
robinnsc deleted the ci/sign-in-called-workflow branch December 3, 2026 00:06
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
Main is at c8e66fb, six commits past 01556cf: #481, #1137, #1403,
#1465, #1515 and #1411. #1403 and #1411 add v1.2.0 entries at the top
of "Behavior Changes by Release" in docs/manuals/07-upgrade-manual.md,
where the entry of this branch goes next. The merge has no conflict.

Git merged crates/core/src/types/table.rs and crates/engine/src/lib.rs
at other lines. In table.rs, main changes the members of a DELETING
table in TableDescription, and this branch adds the ReplicaUpdates
member of UpdateTableInput. In lib.rs, main declares a test module, and
this branch declares nested_enums and adds enum_constraint. The lines
that this branch changes are the same before and after the merge.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base merges main at c8e66fb, which brings #481, #1137, #1403,
#1465, #1515 and #1411, and adds the v1.2.0 entry of #1110 to
docs/manuals/07-upgrade-manual.md. The merge has no conflict, and no
file has changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base merges main at c8e66fb, which brings #481, #1137, #1403,
#1465, #1515 and #1411, and adds the v1.2.0 entries of #1110 and #1114
to docs/manuals/07-upgrade-manual.md. The merge has no conflict.

Git merged two files at other lines. In crates/core/src/types/table.rs,
main changes the members of a DELETING table in TableDescription, and
this branch changes the doc comment of the SSESpecification member of
UpdateTableInput. In crates/storage-mongodb/src/table_engine.rs, main
makes the creation time of a table description optional, and this
branch records the specification in update_table.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
Main is at c8e66fb, three commits past e8b5f10: #1465, #1515 and
#1411. #1411 adds a v1.2.0 entry at the top of "Behavior Changes by
Release" in docs/manuals/07-upgrade-manual.md, above the entry of #606.
Git merged the file with no conflict, so the order is #1411, #606, then
the entry of this branch. No other file has changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base merges main at c8e66fb, which brings #1465, #1515 and #1411.
#1411 adds a v1.2.0 entry to docs/manuals/07-upgrade-manual.md. The
merge has no conflict, and no file has changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base brings main at c8e66fb through #1260, with #1465, #1515 and
#1411, and adds the v1.2.0 entry of #1313 to
docs/manuals/07-upgrade-manual.md. The merge has no conflict, and no
file has changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base brings main at c8e66fb through #1260, with #1465, #1515 and
#1411, and adds the v1.2.0 entry of #1313 to
docs/manuals/07-upgrade-manual.md. Git merged the manual with no
conflict. The order of the v1.2.0 entries is #1313, #1411, #606, #1260,
then the entry of this branch. No other file has changes on both sides.
LeeroyHannigan added a commit that referenced this pull request Dec 3, 2026
The base brings main at c8e66fb through #1260, with #1465, #1515 and
#1411, and adds the v1.2.0 entries of #1313 and #1355 to
docs/manuals/07-upgrade-manual.md. The merge has no conflict, and no
file has changes on both sides.
@robinnsc

robinnsc commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author
  1. Testing done now cites run 46828549106, at this PR's head.
  2. In ci(release): publish a release when the release PR merges #1469, release.yml starts release-publish.yml with gh workflow run ... --ref main, so every run that signs or verifies a release is a workflow_dispatch run, and the trigger checks keep their meaning. release-publish.yml's header says why it is a dispatch: crates.io refuses trusted publishing from a workflow_run run.
  3. ci(release): publish a release when the release PR merges #1469 changes the comment in keyless-signing-selftest.yml and in keyless-signing-selftest-called.yml from "will call" to "calls", so it is true once release-publish.yml exists, without naming a PR.
  4. The called job needs its own image. The caller's job signs its image too, so on a shared digest the caller's identity would verify, and the check that the caller's identity does not verify would have nothing to refuse. A digest input would need a second, unsigned image from the caller, which saves no build, and the called job would then wait for the caller; the two run in parallel now (56 s and 36 s in run 46828549106). The header of keyless-signing-selftest-called.yml (since ci(release): add devtools/freeze-migrations #1466) and ci(release): let the signing actions run in a called workflow #1465's description now say so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants