Skip to content

Copa hardened fixes#259

Merged
bluvulture merged 3 commits into
5.xfrom
copa-hardened-fixes
Jul 21, 2026
Merged

Copa hardened fixes#259
bluvulture merged 3 commits into
5.xfrom
copa-hardened-fixes

Conversation

@bluvulture

@bluvulture bluvulture commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Fixex for copa patching

This pull request improves the reliability of attaching SBOMs (Software Bill of Materials) to container images by ensuring registry references are correctly qualified, particularly for Docker Hub images. It also updates test coverage for these changes and clarifies severity gate reporting in the release workflow.

Registry reference qualification and SBOM attachment:

  • Updated .github/scripts/attach-sbom.sh to automatically prefix bare Docker Hub image references with docker.io/, ensuring the oras tool resolves and authenticates against the correct registry. References already containing a registry host (like ghcr.io or localhost:5000) are left unchanged.

Test updates for registry qualification:

  • Enhanced .github/scripts/tests/run.sh to verify that bare Docker Hub references are correctly qualified with docker.io/ for oras, and that references already containing a registry host remain unaltered.
  • Updated assertions in .github/scripts/tests/run.sh to expect docker.io/-qualified references in SBOM attachment logs, reflecting the new qualification logic.

Release workflow improvements:

  • Modified .github/workflows/release.yml to clarify that severity gate failures for hardened images only skip the -hardened tag and do not fail the entire job. Failures are now reported as warnings, ensuring that plain images are still published even when some variants fail the gate.

bluvulture and others added 2 commits July 21, 2026 08:41
…the job)

A Copa-patch/gate failure now skips only the -hardened tag for that variant and
surfaces a ::warning:: + step-summary entry, instead of failing the whole leg.
Plain images already shipped, and some stable lines (e.g. EOL Debian bullseye,
whose fixed packages are no longer served) can never be fully patched -- those
must not turn the pipeline red. Hardened publishing is best-effort.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
oras (unlike the docker CLI) does not default a bare 'repo/name:tag' to docker.io
-- it reads the first path segment as the registry host, so 'pimcore/pimcore:tag'
became a DNS lookup of host 'pimcore' and every Docker Hub SBOM attach silently
failed (only ghcr.io referrers landed). Prefix docker.io/ for bare refs; leave refs
that already carry a registry host (ghcr.io/..., localhost:5000/...) untouched.
Fixes plain, hardened, and logical-multiarch-tag attaches at once. Mutation-verified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 21, 2026 06:46
@bluvulture
bluvulture requested a review from berfinyuksel as a code owner July 21, 2026 06:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Makes hardened-image publishing best-effort and fixes SBOM attachment for Docker Hub references.

Changes:

  • Reports severity-gate failures without failing releases.
  • Qualifies Docker Hub references for ORAS.
  • Adds SBOM attachment tests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/release.yml Makes hardened gate failures non-fatal.
.github/scripts/attach-sbom.sh Adds registry qualification logic.
.github/scripts/tests/run.sh Tests qualified ORAS references.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/scripts/attach-sbom.sh Outdated
Addresses review feedback on the docker.io-qualification heuristic:
- single-component refs (no slash, e.g. alpine:latest) are official images ->
  docker.io/library/<ref> (previously the tag colon matched *:* and the ref was
  left unqualified -> invalid for oras).
- localhost is a registry host -> left as-is (previously rewritten to
  docker.io/localhost/...). localhost:5000/... already matched via the port colon.
Our own refs (pimcore/pimcore:tag -> docker.io/..., ghcr.io/... unchanged) are
unaffected. Added regression tests for both edge cases.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 21, 2026 06:50
@bluvulture
bluvulture merged commit ab87d13 into 5.x Jul 21, 2026
5 checks passed
@bluvulture
bluvulture deleted the copa-hardened-fixes branch July 21, 2026 06:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants