-
Notifications
You must be signed in to change notification settings - Fork 5k
Add Cosign keyless signing for Harbor release artifacts #22578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Cosign keyless signing for Harbor release artifacts #22578
Conversation
71af39b to
0b5f8ad
Compare
bupd
left a comment
There was a problem hiding this 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.
|
I would also suggest to cleanup and squash your commits. 51 commits might be way too much for this change.
Thanks for picking this up. this has been sitting in my backlog for a while. |
|
This was on my to-do list, but thanks for taking it over. |
|
@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 |
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]>
…igning Signed-off-by: Aloui-Ikram <[email protected]>
c02d520 to
fe4d074
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
bupd
left a comment
There was a problem hiding this 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
|
@Aloui-Ikram please add |
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]>
Signed-off-by: Ikram ALOUI <[email protected]>
bupd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
This PR added Cosign keyless signing for Harbor release artifacts to verify integrity and provenance of binaries.
Key Changes:
.bundlesignature filesmake/pushimage.shTesting & 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 Releaseworkflow successfully identifies the signed bundles and processes them alongside the main packages.2. Verified Release Assets

The final release includes the
.bundlefiles (verifiable signatures) alongside the offline and online installers.Issue being fixed
Fixes #22367, #21156
Please indicate you've done the following: