WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@Aloui-Ikram
Copy link

@Aloui-Ikram Aloui-Ikram commented Nov 18, 2025

This PR added Cosign keyless signing for Harbor release artifacts to verify integrity and provenance of binaries.

Key Changes:

  • Integrated Cosign keyless signing using GitHub OIDC tokens
  • Automatic signing for offline and online installers
  • Updated build and release workflows to handle .bundle signature files
  • Added signature verification documentation
  • Fixed duplicate flag issue in make/pushimage.sh

Testing & Verification

I have successfully tested these changes in a fork. https://github.com/Aloui-Ikram/harbor/releases/tag/v2.15.0-test-v2

1. Successful Workflow Execution
The Publish Release workflow successfully identifies the signed bundles and processes them alongside the main packages.

image

2. Verified Release Assets
The final release includes the .bundle files (verifiable signatures) alongside the offline and online installers.
image

Issue being fixed

Fixes #22367, #21156

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/infra , needs/follow-up , target/2.15.0"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@Aloui-Ikram Aloui-Ikram requested a review from a team as a code owner November 18, 2025 23:11
@Aloui-Ikram Aloui-Ikram force-pushed the feature/cosign-keyless-signing-release-artifacts branch 8 times, most recently from 71af39b to 0b5f8ad Compare November 19, 2025 18:56
Copy link
Contributor

@bupd bupd left a comment

Choose a reason for hiding this comment

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

@Aloui-Ikram Thanks for your contribution, I have added suggestions for improvements.

@bupd
Copy link
Contributor

bupd commented Nov 23, 2025

I would also suggest to cleanup and squash your commits. 51 commits might be way too much for this change.

  • also remove redundant commits
  • Do a release on your forked repo. so i can verify the signed artifacts.

Thanks for picking this up. this has been sitting in my backlog for a while.

@reasonerjt
Copy link
Contributor

@Aloui-Ikram

This was on my to-do list, but thanks for taking it over.
I'll double-check the PR. Ping me when it's ready.

@bupd
Copy link
Contributor

bupd commented Nov 24, 2025

@Aloui-Ikram can you remove the WIP from PR title.

@reasonerjt here is the release artifacats which you can take a look. https://github.com/Aloui-Ikram/harbor/releases/tag/v2.15.0-test-v2

dulanting and others added 4 commits November 24, 2025 20:32
Signed-off-by: dulanting <[email protected]>
Signed-off-by: Aloui-Ikram <[email protected]>

Add unit test for DeleteManifest method in TencentCR adapter (goharbor#22537)

Added test case

Signed-off-by: Anurag Ojha <[email protected]>
Signed-off-by: Aloui-Ikram <[email protected]>

disable land tag in the backend storage (goharbor#22507)

According to the gc performance proposal, harbor will skip to write the tag file into the data storage since we already use the harbor database to manage the tag CRUD.
Proposal: goharbor/community#265

fixed goharbor#22405

Signed-off-by: wang yan <[email protected]>
Co-authored-by: wang yan <[email protected]>

Signed-off-by: Aloui-Ikram <[email protected]>
…uild-package workflow

Signed-off-by: Aloui-Ikram <[email protected]>

feat(ci): Implement Cosign keyless signing for release artifacts (goharbor#22367)

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Use GitHub-hosted runner for fork testing

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Revert Makefile changes to fix build error

Signed-off-by: Aloui-Ikram <[email protected]>

feat(ci): Implement Cosign keyless signing for release artifacts in build-package workflow

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Debugging and fallback for Docker image tag in Build Package

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Comment out Docker image publishing for fork testing

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Correct COSIGN_REPOSITORY format for GHCR

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Hardcode COSIGN_REPOSITORY for direct GHCR path

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Hardcode COSIGN_REPOSITORY for direct GHCR path

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Hardcode COSIGN_REPOSITORY for direct GHCR path

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Hardcode COSIGN_REPOSITORY for direct GHCR path

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Change runner to ubuntu-latest for fork compatibility

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Change runner to ubuntu-latest for fork compatibility

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Change runner to ubuntu-latest for fork compatibility

Signed-off-by: Aloui-Ikram <[email protected]>

Fix: Uncomment AWS credentials and restore runner configuration

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Adjust Build Base Image condition for fork testing without get-changed-files

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Adjust Build Base Image condition for fork testing without get-changed-files

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Adjust Build Base Image condition for fork testing without get-changed-files

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Adjust Build Base Image condition for fork testing without get-changed-files

Signed-off-by: Aloui-Ikram <[email protected]>

fix(ci): Adjust Build Base Image condition for fork testing without get-changed-files

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Prevent Docker image pushing in fork

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Skip S3 upload and base image push for fork testing

- Set BUILD_BASE=false to prevent pushing to goharbor namespace
- Comment out AWS S3 uploader calls (no access to harbor-releases bucket)
- Comment out publishImage (no Docker Hub push permissions)
- Keep Cosign signing and GitHub artifact upload working
- Use larger runner for faster builds

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Skip S3 upload and base image push for fork testing

- Set BUILD_BASE=false to prevent pushing to goharbor namespace
- Comment out AWS S3 uploader calls (no access to harbor-releases bucket)
- Comment out publishImage (no Docker Hub push permissions)
- Keep Cosign signing and GitHub artifact upload working

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Skip S3 upload and base image push for fork testing

- Set BUILD_BASE=false to prevent pushing to goharbor namespace
- Comment out AWS S3 uploader calls (no access to harbor-releases bucket)
- Comment out publishImage (no Docker Hub push permissions)
- Keep Cosign signing and GitHub artifact upload working

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Complete Cosign signing implementation

- Add sign_artifacts Makefile target
- Update README with verification instructions
- Add comprehensive signature-verification.md guide

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Complete Cosign signing implementation

- Add sign_artifacts Makefile target
- Update README with verification instructions
- Add comprehensive signature-verification.md guidee

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Complete Cosign signing implementation

- Add sign_artifacts Makefile target
- Update README with verification instructions
- Add comprehensive signature-verification.md guidee

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Complete Cosign signing implementation

- Add sign_artifacts Makefile target
- Update README with verification instructions
- Add comprehensive signature-verification.md guidee

Signed-off-by: Aloui-Ikram <[email protected]>

feat: Complete Cosign keyless signing implementation

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Override Docker namespace in CI for fork to enable base image push

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Override IMAGENAMESPACE and BASEIMAGENAMESPACE in CI to fix Docker Hub permissions

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Pass explicit AWS region to S3 upload command in build_util.sh to resolve AccessDenied errors

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Complete unfinished function block in build_util.sh to fix CI syntax error.

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Complete unfinished function block in build_util.sh to fix CI syntax error.

Signed-off-by: Aloui-Ikram <[email protected]>

fix: Corrected variable assignments in build_util.sh uploader to resolve empty file path S3 error.

Signed-off-by: Aloui-Ikram <[email protected]>

Fix: Artifact upload to custom S3 bucket

Signed-off-by: Aloui-Ikram <[email protected]>

Fix: Docker image cleanup error in pushimage.sh

Signed-off-by: Aloui-Ikram <[email protected]>

Add bundle upload to S3

Signed-off-by: Aloui-Ikram <[email protected]>

Add bundle upload to S3

Signed-off-by: Aloui-Ikram <[email protected]>

update readme and Signature Verification files

Signed-off-by: Aloui-Ikram <[email protected]>

Add Cosign keyless signing for Harbor release artifacts

- Add Cosign installation and signing steps to build workflow
- Sign both offline and online installers with keyless signing
- Upload signature bundles to S3 for verification
- Add GitHub Actions artifacts backup
- Fix bug in pushimage.sh (duplicate -f flag)
- Add comprehensive verification documentation
- Addresses issue goharbor#22367

Signed-off-by: Aloui-Ikram <[email protected]>

Add Cosign keyless signing for Harbor release artifacts

- Add Cosign installation and signing steps to build workflow
- Sign both offline and online installers with keyless signing
- Upload signature bundles to S3 for verification
- Add GitHub Actions artifacts backup
- Fix bug in pushimage.sh (duplicate -f flag)
- Add comprehensive verification documentation
- Addresses issue goharbor#22367

Signed-off-by: Aloui-Ikram <[email protected]>

Add Cosign keyless signing for Harbor release artifacts

- Add Cosign installation and signing steps to build workflow
- Generate signature bundles for offline and online installers
- Upload signature bundles to S3 alongside installers
- Add GitHub Actions artifacts backup with 90-day retention
- Fix duplicate -f flag in pushimage.sh and modernize Docker cleanup
- Add comprehensive signature verification documentation
- Update README with verification quick start section

Addresses goharbor#22367

Signed-off-by: Aloui-Ikram <[email protected]>
Signed-off-by: Aloui-Ikram <[email protected]>

Remove unnecessary file changes

Signed-off-by: Aloui-Ikram <[email protected]>

Remove unintended file changes

Signed-off-by: Aloui-Ikram <[email protected]>

ci: upload signed bundle files to release assets and removed the redundant upload to GitHub artifacts step

Signed-off-by: Aloui-Ikram <[email protected]>
@Aloui-Ikram Aloui-Ikram force-pushed the feature/cosign-keyless-signing-release-artifacts branch from c02d520 to fe4d074 Compare November 24, 2025 19:39
@Aloui-Ikram Aloui-Ikram changed the title [WIP] Add Cosign keyless signing for Harbor release artifacts Add Cosign keyless signing for Harbor release artifacts Nov 25, 2025
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.85%. Comparing base (c8c11b4) to head (676e9f8).
⚠️ Report is 598 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #22578       +/-   ##
===========================================
+ Coverage   45.36%   65.85%   +20.48%     
===========================================
  Files         244     1073      +829     
  Lines       13333   116095   +102762     
  Branches     2719     2931      +212     
===========================================
+ Hits         6049    76455    +70406     
- Misses       6983    35399    +28416     
- Partials      301     4241     +3940     
Flag Coverage Δ
unittests 65.85% <ø> (+20.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 987 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wy65701436 wy65701436 added release-note/infra Infra related changes e.g. release, test, ship etc... target/2.15.0 labels Nov 26, 2025
@Aloui-Ikram
Copy link
Author

@Aloui-Ikram

This was on my to-do list, but thanks for taking it over. I'll double-check the PR. Ping me when it's ready.
@reasonerjt Thank you. The PR is ready for your review.

Copy link
Contributor

@bupd bupd left a comment

Choose a reason for hiding this comment

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

@Aloui-Ikram Added a few more suggestions.

Also please do mark the comments as resolved after fixing it.

Thanks

@bupd
Copy link
Contributor

bupd commented Dec 2, 2025

@Aloui-Ikram please add fix #21156 to the pr description so this PR tracks that issue too.

Aloui-Ikram and others added 2 commits December 2, 2025 14:13
Co-authored-by: Prasanth Baskar <[email protected]>
Signed-off-by: Ikram ALOUI <[email protected]>
Co-authored-by: Prasanth Baskar <[email protected]>
Signed-off-by: Ikram ALOUI <[email protected]>
Updated version numbers in signature verification documentation from v2.14.0 to v2.15.0.

Signed-off-by: Ikram ALOUI <[email protected]>
Copy link
Contributor

@bupd bupd left a comment

Choose a reason for hiding this comment

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

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs/follow-up release-note/infra Infra related changes e.g. release, test, ship etc... target/2.15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing .asc signature files in latest release assets

9 participants