Use human-readable signed image and bundle release tags #64

Merged
gitchegumi merged 2 commits from kiyi/readable-release-tags into main 2026-09-27 14:37:17 -05:00
Member

Owner request

Every future release must identify its component and readable version, for example gitchauth-theme-v1, and deployment must accept that tag.

Changes

  • Add optional named image/bundle releases and readable automatic defaults. The OCI image tag and evidence release use the same name.
  • Sign the exact release tag in schema 2 receipts; readers use signed source provenance rather than extracting a hash from the tag.
  • Reject any existing Git tag or release before publication.
  • Preserve existing signed schema 1 releases under their original tags, including trusted base/payload evidence and bundle deployments.

Validation

73 source/mocked tests passed across release tags, container publication, trusted images, delivery, promotion, malware reuse, release downloads and Forgejo contracts; git diff --check passed. No local Docker or cluster tests. Hosted publication/deployment remain unverified.

Adoption

Proposed for v1.24.0. After review/merge, the operator publishes that unused version with the normal release Action, then merges paired caller pins. Upgrade publishers and deploy/evidence consumers together. Older caller mitigation schemas require their own stable-finding migration; this change does not renew risk acceptance.

## Owner request Every future release must identify its component and readable version, for example `gitchauth-theme-v1`, and deployment must accept that tag. ## Changes - Add optional named image/bundle releases and readable automatic defaults. The OCI image tag and evidence release use the same name. - Sign the exact release tag in schema 2 receipts; readers use signed source provenance rather than extracting a hash from the tag. - Reject any existing Git tag or release before publication. - Preserve existing signed schema 1 releases under their original tags, including trusted base/payload evidence and bundle deployments. ## Validation 73 source/mocked tests passed across release tags, container publication, trusted images, delivery, promotion, malware reuse, release downloads and Forgejo contracts; `git diff --check` passed. No local Docker or cluster tests. Hosted publication/deployment remain unverified. ## Adoption Proposed for **v1.24.0**. After review/merge, the operator publishes that unused version with the normal release Action, then merges paired caller pins. Upgrade publishers and deploy/evidence consumers together. Older caller mitigation schemas require their own stable-finding migration; this change does not renew risk acceptance.
Use human-readable signed image and bundle release tags
All checks were successful
Workflow acceptance / acceptance (pull_request) Successful in 2m0s
Repository security / security-1 (pull_request) Successful in 2m26s
Library checks / tests (pull_request) Successful in 10m20s
514819836d
portegumi requested changes 2026-09-27 14:19:51 -05:00
Dismissed
portegumi left a comment

Request changes: the bundle build step does not export RUN_ID, but delivery.build now reads os.environ["RUN_ID"] when writing its schema 2 receipt. This breaks every normal bundle publication before a receipt or release is created, including when an explicit release_tag is supplied. I reproduced the production build function with its existing mocked package fixture and workflow-equivalent environment: it created the bundle archive, then raised KeyError("RUN_ID") and wrote no receipt. Add RUN_ID: ${{ forgejo.run_id }} to the "Scan every image and build UDS bundle" step and cover that workflow-to-helper contract.

All 222 local tests passed (one skipped), diff and YAML parsing passed, and three exact-head hosted checks passed; those tests inject RUN_ID directly and thus miss the workflow wiring. No publication or deployment was run.

Request changes: the bundle build step does not export RUN_ID, but delivery.build now reads os.environ["RUN_ID"] when writing its schema 2 receipt. This breaks every normal bundle publication before a receipt or release is created, including when an explicit release_tag is supplied. I reproduced the production build function with its existing mocked package fixture and workflow-equivalent environment: it created the bundle archive, then raised KeyError("RUN_ID") and wrote no receipt. Add RUN_ID: ${{ forgejo.run_id }} to the "Scan every image and build UDS bundle" step and cover that workflow-to-helper contract. All 222 local tests passed (one skipped), diff and YAML parsing passed, and three exact-head hosted checks passed; those tests inject RUN_ID directly and thus miss the workflow wiring. No publication or deployment was run.
@ -185,2 +186,3 @@
with stage('Hash bundle artifacts and write receipt'):
receipt = {'schema': 1, 'repository': repository, 'source_sha': sha,
receipt = {'schema': 2, 'repository': repository, 'source_sha': sha,
'release_tag': choose(app['name'] + '-bundle', app['version'], os.environ['RUN_ID'],
Member

Blocking: .forgejo/workflows/build-bundle.yml exports RUN_ID to the owner guard and publish steps, but not to its "Scan every image and build UDS bundle" step. This new os.environ["RUN_ID"] lookup fails with KeyError after the archive is built, before receipt generation, for both default and explicit release_tag inputs. I reproduced it with the test fixture and the step's environment. Export RUN_ID: ${{ forgejo.run_id }} to the build step and add a workflow contract test.

Blocking: .forgejo/workflows/build-bundle.yml exports RUN_ID to the owner guard and publish steps, but not to its "Scan every image and build UDS bundle" step. This new os.environ["RUN_ID"] lookup fails with KeyError after the archive is built, before receipt generation, for both default and explicit release_tag inputs. I reproduced it with the test fixture and the step's environment. Export RUN_ID: ${{ forgejo.run_id }} to the build step and add a workflow contract test.
Author
Member

Fixed in 165b5fd. The bundle build step now exports RUN_ID: ${{ forgejo.run_id }} alongside RELEASE_TAG and LIBRARY_SHA.

Added a workflow contract check for these receipt inputs and changed the existing mocked bundle build test to derive its environment from the actual workflow YAML, clearing inherited variables. It exercises both the automatic tag and an explicit example-bundle-v1, verifies schema 2 receipt creation and keeps the artifact-tampering check. Before the fix, both cases reproduced KeyError("RUN_ID"); after the fix, all 74 targeted source/mocked tests passed, including delivery and Forgejo contracts. git diff --check passed. Hosted checks for this new commit remain pending; no publication/deployment was run.

Fixed in [165b5fd](https://git.gitchegumi.com/Homelab/workflows/commit/165b5fd6dcf17d18df126bef0d9978e4b326b283). The bundle build step now exports `RUN_ID: ${{ forgejo.run_id }}` alongside `RELEASE_TAG` and `LIBRARY_SHA`. Added a workflow contract check for these receipt inputs and changed the existing mocked bundle build test to derive its environment from the actual workflow YAML, clearing inherited variables. It exercises both the automatic tag and an explicit `example-bundle-v1`, verifies schema 2 receipt creation and keeps the artifact-tampering check. Before the fix, both cases reproduced `KeyError("RUN_ID")`; after the fix, all **74 targeted source/mocked tests passed**, including delivery and Forgejo contracts. `git diff --check` passed. Hosted checks for this new commit remain pending; no publication/deployment was run.
kiyi marked this conversation as resolved
Pass run identity to bundle receipt creation and test workflow wiring
All checks were successful
Workflow acceptance / acceptance (pull_request) Successful in 1m42s
Repository security / security-1 (pull_request) Successful in 9m53s
Library checks / tests (pull_request) Successful in 9m43s
165b5fd6dc
portegumi approved these changes 2026-09-27 14:36:26 -05:00
portegumi left a comment

Approved at 165b5fd. The bundle build step now exports forgejo.run_id as RUN_ID to the actual delivery.py build invocation, and the new workflow-contract test plus mocked production build exercise both the default and explicit readable tags through receipt generation. The previously reproduced KeyError("RUN_ID") is fixed. All 223 local tests passed (one skipped), Python compilation and diff check passed, and all three exact-head hosted checks succeeded. The hosted security decision passed with zero scanner errors. This is source/workflow verification only; no real release publication or deployment was dispatched.

Approved at 165b5fd. The bundle build step now exports forgejo.run_id as RUN_ID to the actual delivery.py build invocation, and the new workflow-contract test plus mocked production build exercise both the default and explicit readable tags through receipt generation. The previously reproduced KeyError("RUN_ID") is fixed. All 223 local tests passed (one skipped), Python compilation and diff check passed, and all three exact-head hosted checks succeeded. The hosted security decision passed with zero scanner errors. This is source/workflow verification only; no real release publication or deployment was dispatched.
gitchegumi deleted branch kiyi/readable-release-tags 2026-09-27 14:37:18 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Homelab/workflows!64
No description provided.