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 @@ -29,6 +29,13 @@ jobs:
# Dummy settings: config loads at startup, no request reaches them.
boot-env: |
GITHUB_TOKEN=gate-dummy
# 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 (main 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 secrets are stored in the cosign-signing environment. Environment-scoped secrets are not available to the caller unless its job references that environment. A reusable-workflow call cannot bind an environment on the caller job, so these values will be empty and signing will fail.

Suggestion: Make the signing secrets available to the caller job, or have the reusable workflow bind the cosign-signing environment and read the secrets there rather than passing them through caller-side expressions.

Evidence:

secrets:
  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: the called workflow's promote job sets environment: cosign-signing when sign is true (constitution v1.51.0 container-release.yml), so the secrets resolve there. The identical change in crunchtools/mcp-nagios#101 signed quay.io/crunchtools/mcp-nagios:main and cosign verify passes.

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
Expand Down
Loading