Skip to content

CI/CD consolidation on bor#2249

Open
sanketsaagar wants to merge 6 commits into
developfrom
sanketsaagar/SPEC-2699
Open

CI/CD consolidation on bor#2249
sanketsaagar wants to merge 6 commits into
developfrom
sanketsaagar/SPEC-2699

Conversation

@sanketsaagar
Copy link
Copy Markdown
Contributor

@sanketsaagar sanketsaagar commented May 28, 2026

Summary

Tidies up the release-side GitHub Actions workflows so they are consistent with each other and with the runners/tooling already in use elsewhere in the repo. No code changes, no behavioural changes to the release artifacts
themselves — same .debs, same docker images, same tags.

Changes

  • Sign release artifacts with cosign. amoy_deb_profiles.yml, mainnet_deb_profiles.yml, and packager_deb.yml now run cosign sign-blob against the produced .deb files using GitHub's OIDC identity. The .sig and
    .pem files are attached to the GitHub Release next to the existing .deb and .deb.checksum. Standard supply-chain hygiene, costs ~10s per build.
  • Mirror release artifacts. packager_deb.yml and release_ghcr.yml now mirror their build outputs (debs and a tar.gz of the multi-arch image) to an external artifact store via short-lived OIDC tokens. Destination and
    identity are read from repo secrets.

Pinned actions

New third-party actions are pinned by commit SHA:

  • sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a (v3.7.0)
  • google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 (v2.1.5)

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@sanketsaagar
Copy link
Copy Markdown
Contributor Author

@claude review

Comment thread .github/workflows/release_ghcr.yml
sreevalsanmr
sreevalsanmr previously approved these changes May 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.87%. Comparing base (bb2ab25) to head (ad4ecb8).
⚠️ Report is 52 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2249      +/-   ##
===========================================
+ Coverage    52.28%   52.87%   +0.59%     
===========================================
  Files          885      886       +1     
  Lines       155777   156888    +1111     
===========================================
+ Hits         81444    82957    +1513     
+ Misses       69092    68672     -420     
- Partials      5241     5259      +18     

see 83 files with indirect coverage changes
see 83 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.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Prior comment addressed via lowercased IMAGE_NAME; remaining changes are mechanical workflow consolidation (cosign signing, GCP mirroring, runner alignment).

Extended reasoning...

Overview

This PR consolidates release-side GitHub Actions workflows: adds cosign sign-blob steps to three .deb packaging workflows, adds GCP bucket mirroring via OIDC to packager_deb.yml and release_ghcr.yml, and switches the kurtosis e2e jobs to the same self-hosted runner already in use by release_ghcr.yml. No application code changes.

Security risks

The new work is largely supply-chain hardening (cosign-signed artifacts attached to releases). GCP authentication uses short-lived OIDC tokens via workload identity federation rather than long-lived keys, which is the right pattern. Third-party actions are pinned by commit SHA. Bucket destinations and GCP identity are sourced from repo secrets — assuming those secrets are configured correctly, the blast radius is limited to mirroring artifacts that are already published to GitHub Releases / GHCR.

Level of scrutiny

Medium. These are release-infrastructure workflows, so failures would be visible at release time but cannot corrupt the artifacts themselves (which are still produced and shasummed before signing). The prior uppercase-IMAGE_NAME bug I flagged would have broken the new tar.gz export entirely on every tag run, and it has been fixed in commit 2d1979b by lowercasing IMAGE_NAME directly. The cosign signing steps use shopt -s nullglob plus an explicit empty-array guard, which is defensive.

Other factors

  • The bug-hunting system found no further bugs in the updated diff.
  • My only prior concern has been resolved.
  • SonarCloud quality gate passed, codecov shows no regression on this PR.
  • No CODEOWNER-protected application code is touched.

@sanketsaagar sanketsaagar changed the title CI/CD consolidation CI/CD consolidation on bor May 28, 2026
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

My previous bug report about uppercase IMAGE_NAME in release_ghcr.yml was addressed; the rest is straightforward CI/CD hygiene (cosign signing, GCP mirroring, runner alignment) with pinned action SHAs.

Extended reasoning...

Overview

This PR touches six GitHub Actions workflows: it adds cosign blob-signing of .deb artifacts in amoy_deb_profiles.yml, mainnet_deb_profiles.yml, and packager_deb.yml; mirrors release artifacts (debs and a multi-arch image tar.gz) to GCP buckets via OIDC in packager_deb.yml and release_ghcr.yml; and switches the e2e-tests job in kurtosis-e2e.yml and kurtosis-stateless-e2e.yml to the same large self-hosted runner already used by release_ghcr.yml. No production code or non-workflow files are modified.

Security risks

The supply-chain posture improves here, not regresses: .deb artifacts now get keyless cosign signatures attached to GitHub Releases, and the GCP uploads use short-lived OIDC tokens with workload identity federation rather than long-lived service-account keys. Third-party actions are pinned by commit SHA (sigstore/cosign-installer@d7d6bc7, google-github-actions/auth@71f9864, google-github-actions/setup-gcloud@e427ad8). The new GCP destinations and identities are read from repo secrets, so the blast radius of a misconfiguration is bounded.

Level of scrutiny

Medium — these are release-path workflows, so bugs here can silently break a release (no immediate user impact, but supply-chain breakage). That's why I flagged the uppercase IMAGE_NAME issue on the first pass: the four new docker pull/docker tag shell-level interpolations would have failed on every release tag. That has been fixed by lowercasing the env var directly, which also matches what docker/metadata-action was already producing. The remaining changes are mechanical: cosign installer + sign-blob loop, an OIDC auth step, and a gcloud storage cp loop.

Other factors

The bug hunting system found no new bugs after the fix. SonarQube quality gate passed. The cosign loops handle the empty-artifact case explicitly (exit 1 on no matches), and the file globs feeding both the GitHub Release and the GCP upload are consistent with the existing patterns in each workflow. My prior concern was the only blocker and it's resolved.

@pratikspatil024 pratikspatil024 added the squash and merge This PR will be squashed and merged label May 29, 2026
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Previously flagged uppercase IMAGE_NAME issue has been fixed by lowercasing the env var; remaining changes are mechanical CI/CD additions (cosign signing, GCS mirroring, runner alignment).

Extended reasoning...

Overview

This PR consolidates release-side GitHub Actions workflows. Across six workflow files it (a) adds keyless cosign sign-blob signing of .deb artifacts in amoy_deb_profiles.yml, mainnet_deb_profiles.yml, and packager_deb.yml; (b) adds GCP OIDC auth + gcloud storage cp mirroring of debs and Docker image tarballs in packager_deb.yml and release_ghcr.yml; (c) switches the kurtosis e2e jobs to the same self-hosted runner already used by GHCR; and (d) lowercases IMAGE_NAME from 0xPolygon/bor to 0xpolygon/bor in release_ghcr.yml.

Security risks

The added third-party actions (sigstore/cosign-installer, google-github-actions/auth, google-github-actions/setup-gcloud) are all pinned by full commit SHA, which is the right hygiene. Authentication to GCP uses short-lived OIDC tokens with workload identity federation — no long-lived credentials live in repo secrets. Cosign signing is keyless using the GitHub OIDC provider. All artifact globs in signing/upload steps are scoped to packaging/deb/bor-*.deb or bor-${{ github.ref_name }}-*.tar.gz, so there is no risk of accidentally signing/uploading unrelated files.

Level of scrutiny

Low. These are CI/CD workflow files only — no production code, no runtime behavior change to the binaries or images that get shipped. The cosign additions are supply-chain-positive (additive metadata next to existing .deb + .deb.checksum), the GCS mirroring is additive (the existing GitHub Release upload is unchanged), and the runner alignment is a performance tweak. The only previously load-bearing concern was the uppercase IMAGE_NAME interaction with docker pull in the new export steps, and that has been resolved.

Other factors

My prior inline comment on release_ghcr.yml line 74 — that docker pull ghcr.io/0xPolygon/bor:... would fail OCI reference parsing — has been addressed by lowercasing IMAGE_NAME at the env var level, which is the cleanest fix and also keeps the existing build-and-push step working (metadata-action was already normalizing it). SonarQube quality gate passed and Codecov shows full coverage on modified lines (trivially true since these are YAML).

@sonarqubecloud
Copy link
Copy Markdown

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

Labels

squash and merge This PR will be squashed and merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants