Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
default-branch: master
boot: systemd
boot-units: httpd.service
# Hosts refuse an unsigned quay.io/crunchtools image
# (crunchtools/rhel10-bootc-server#47). Promote signs the gated digest
# before any tag moves, with the key from this repo's cosign-signing
# environment (default branch and v* only); without it promote refuses.
sign: true
secrets:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

HIGH (Bug Hunter): These expressions are evaluated in the caller workflow, but the changelog says the signing keys are stored in the cosign-signing environment. Environment secrets are only available to jobs that declare that environment; a reusable-workflow caller cannot access them through its secrets context. If the keys exist only in that environment, both values passed here are empty and signing will fail.

Suggestion: Make the secrets available in the caller context, or have the called workflow job declare and use the cosign-signing environment so it can read the environment secrets directly.

Evidence:

COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not a bug: constitution v1.51.0 container-release.yml's promote job declares environment: ${{ inputs.sign && 'cosign-signing' || '' }} (line 510), so the secrets passed by name resolve from the cosign-signing environment inside the called job, which is what the workflow documents. crunchtools/mcp-nagios#101 uses this identical wiring and its :main passes cosign verify.

COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ All notable changes to this project are documented here. The format follows
## [Unreleased]

### Changed
- Promote signs the image with the fleet cosign key (`sign: true`), because
bootc hosts are moving to trust only signed `quay.io/crunchtools` images
(crunchtools/rhel10-bootc-server#47). Needs the repo's `cosign-signing`
environment to hold `COSIGN_PRIVATE_KEY` and `COSIGN_PASSWORD`.
- The container release runs constitution v1.51.0's `container-release.yml`
(was v1.46.0) and grants it `issues: write`, so a failed scheduled rebuild
opens an issue instead of only warning. A `v*` promote now also refuses an image whose `version` label names a
Expand Down
Loading