Skip to content

Push images with the registry credentials kept in this organisation - #748

Merged
jbernal0019 merged 1 commit into
masterfrom
ci/registry-auth
Nov 4, 2026
Merged

jbernal0019 merged 1 commit into
masterfrom
ci/registry-auth

Conversation

@rudolphpienaar

Copy link
Copy Markdown
Contributor

The Build job failed on the push that merged #745 (run 40954266512): Username and password required at the Docker Hub login. Moving the repository from FNNDSC to HARBOR-Medical-AI left three settings behind.

Left behind Fix
DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD were FNNDSC org secrets Set as secrets on this repository (a Docker Hub access token with push and delete on fnndsc/cube; delete is what the Docker Hub description step needs)
The default GITHUB_TOKEN is read-only in HARBOR-Medical-AI The release draft job asks contents: write; Build asks only contents: read, since it no longer pushes with this token
ghcr.io/fnndsc/cube is an FNNDSC package, which this repository's token cannot write Build logs in to GHCR with GHCR_USERNAME and GHCR_TOKEN: the FNNDSC account fnndscghbot, given write on the package alone, with a classic token scoped to write:packages

The image names do not change: docker.io/fnndsc/cube and ghcr.io/fnndsc/cube, as every consumer pulls them.

The Build job runs on push only, so this PR's checks do not exercise it; the push to master that merges it is the test.

The move to HARBOR-Medical-AI left three settings behind: the Docker Hub secrets (FNNDSC org secrets), a default GITHUB_TOKEN that is read-only here, and ghcr.io/fnndsc/cube, an FNNDSC package this repository's token cannot write. The Build job logs in to GHCR with GHCR_USERNAME and GHCR_TOKEN (an FNNDSC account with write on the package) and asks only contents: read of its own token; the release draft asks contents: write. DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD are set on this repository.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

✅ No blocking issues noticed

No blocking findings were identified in the reviewed diff. The workflow’s credential and publishing behavior is not exercised by the available checks, so the acceptance criteria remain unverified, including release drafting and Docker Hub publishing.

Test suggestions

  • A push Build job logs into GHCR using GHCR_USERNAME and GHCR_TOKEN and successfully publishes both image tags.
  • The Build job runs with only contents:read permission and does not rely on GITHUB_TOKEN for registry publishing.
  • A tagged release can still draft a GitHub release with contents:write permission.
  • Docker Hub login continues to use the configured Docker Hub credentials and publishes the unchanged image name.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. A push Build job logs into GHCR using GHCR_USERNAME and GHCR_TOKEN and successfully publishes both image tags.
2. The Build job runs with only contents:read permission and does not rely on GITHUB_TOKEN for registry publishing.
3. A tagged release can still draft a GitHub release with contents:write permission.
4. Docker Hub login continues to use the configured Docker Hub credentials and publishes the unchanged image name.
Low confidence findings
  • The central credential and image-publishing behavior is unverified because the workflow is not covered by automated checks; add workflow-level validation where practical and confirm the referenced organisation and repository secrets are configured with the required permissions.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

@jbernal0019
jbernal0019 self-requested a review November 2, 2026 22:35

@jbernal0019 jbernal0019 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.

@rudolphpienaar

Code Review

Scope reviewed

PR #748 at 8ba3957. The only file changed is .github/workflows/ci.yml, but I went through every job in it, including the tag-only ones this PR's checks skip. I judged it against the agreed decisions: images stay on docker.io/fnndsc/cube and ghcr.io/fnndsc/cube, Docker Hub uses a personal token as a stopgap, GHCR uses the FNNDSC bot, Build gets contents: read and the release draft gets contents: write.

I also checked the secret names on the repository, the merge rules, past tag runs and the READMEs of the Docker Hub description and Pages actions. Build has not run on this branch, so nothing below proves the tokens work.

Verdict

The diff is correct and fixes all three causes of the failure plus the release-draft permission. No job is left short of a permission it needs, and the release notes already name the right registry. The four secrets exist on the repository.

I assumed the Docker Hub account has the Admin role on fnndsc/cube that the description step's action requires.

Approve.

Minor

The description overstates how narrow the Docker Hub token is. It says "push and delete on fnndsc/cube", but Docker's personal tokens take one repository permission and aren't limited to a single repository.

Worth noting

  • Merging tests Build only. "The push to master that merges it is the test" doesn't cover contents: write, because build-docs, deploy-docs and draft-release run only on v* tags. The last tag run was v7.0.0-a2 on 2026-04-08, so those jobs have never run in this organization and their runner and actions have moved since. I found nothing that should fail, but a pre-release tag would be the safer first run. deploy-docs still replaces the live docs on any tag.
  • pfcon and oxidicom need the same fix. They need their own secrets and the bot needs write on each package, since this grant covers one package.
  • The Codacy coverage upload is still failing. It needs a new CODACY_PROJECT_TOKEN from an admin. It's separate from this PR and doesn't block it.

@jbernal0019
jbernal0019 merged commit 16fb726 into master Nov 4, 2026
12 checks passed
@jbernal0019
jbernal0019 deleted the ci/registry-auth branch November 4, 2026 17:16
rudolphpienaar added a commit to HARBOR-Medical-AI/oxidicom that referenced this pull request Nov 5, 2026
)

* Push images with the registry credentials kept in this organisation

The move to HARBOR-Medical-AI left the registry settings behind: the Docker Hub secrets were FNNDSC org secrets, and ghcr.io/fnndsc/oxidicom is an FNNDSC package this repository's GITHUB_TOKEN cannot write. The image job logs in to GHCR with GHCR_USERNAME and GHCR_TOKEN (an FNNDSC account with write on the package) and asks only contents: read of its own token. The four secrets are HARBOR-Medical-AI org secrets shared with this repository. Same change as HARBOR-Medical-AI/ChRIS_ultron_backEnd#748.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update codecov-action to v6.0.2, which verifies the uploader with Codecov's new key

v6.0.0 fetches the uploader's signing key from keybase.io/codecovsecurity, which Codecov retired in June 2026; the URL now returns 404, so the upload step fails on every run and, through fail_ci_if_error, fails Test and skips the image job. v6.0.2 (wrapper 0.2.9) fetches it from keybase.io/codecovsecops. See codecov/codecov-action#1956.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
rudolphpienaar added a commit to HARBOR-Medical-AI/pfcon that referenced this pull request Nov 5, 2026
…179)

The move to HARBOR-Medical-AI left the registry settings behind: the Docker Hub secrets were FNNDSC org secrets, and ghcr.io/fnndsc/pfcon, pfconopjob, pfconopjob-swift and pfconopjob-s3 are FNNDSC packages this repository's GITHUB_TOKEN cannot write. The build job logs in to GHCR with GHCR_USERNAME and GHCR_TOKEN (an FNNDSC account with write on the four packages) and asks only contents: read of its own token. The four secrets are HARBOR-Medical-AI org secrets shared with this repository. Same change as HARBOR-Medical-AI/ChRIS_ultron_backEnd#748.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@rudolphpienaar

Copy link
Copy Markdown
Contributor Author

@jbernal0019 thanks for flagging the failed master build. It's fixed, along with the follow-ups from your review.

CUBE master build (the GHCR push)
The merge build logged in to GHCR fine but the push was refused with permission_denied: write_package. fnndscghbot had Read, not Write, on ghcr.io/fnndsc/cube; the package lost its link to the repository in the transfer, so nothing was inherited either. Raised to Write, re-ran the failed Build: green, and cube:master/latest on both registries are built from 16fb726.

pfcon and oxidicom (your "same fix" note)

Codacy coverage upload
Failing since the move with "Request URL not found": CODACY_PROJECT_TOKEN belonged to the old FNNDSC Codacy project. Replaced with a repository API token from the HARBOR-Medical-AI project (expires 2027-11-05); the re-run uploaded.

Still open
The tag-only jobs (docs, Pages, release draft, and the version-tag image builds in all three repos) have never run in this organization. A pre-release tag is still the safer first run, as you suggested.

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