Repository navigation
fix(ci): restore cloud and main checks during pnpm registry outages - #31793
Conversation
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
6573ad85-8865-46d0-8789-d3f94c4aeeea
📒 Files selected for processing: 20
.github/actions/install-node-dependencies/action.yml.github/actions/setup-pnpm/action.yml.github/workflows/cloud-deploy-relay-production-capacity-job.yml.github/workflows/cloud-deploy-relay-production-capacity.yml.github/workflows/cloud-deploy-relay-production-multi-target.yml.github/workflows/cloud-deploy-relay-production-same-cap-job.yml.github/workflows/cloud-deploy-relay-production.yml.github/workflows/cloud-monitor-relay-production-job.yml.github/workflows/cloud-operate-relay-asia-admission.yml.github/workflows/cloud-operate-relay-production-rehome-job.yml.github/workflows/cloud-prove-relay-asia-staging.yml.github/workflows/cloud-verify.yml.github/workflows/hourly-mac-build.yml.github/workflows/mobile.yml.github/workflows/pr.ymlcloud/apps/push/Dockerfilecloud/apps/relay-fence-broker/Dockerfilecloud/apps/relay/Dockerfileconfig/scripts/pr-code-change-scope.mjsconfig/scripts/setup-pnpm-action.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
| RUN npm install --prefix /opt/pnpm --ignore-scripts --no-audit --no-fund "$(node -p 'require("./package.json").packageManager.split("+")[0]')" \ | ||
| && npm audit signatures --prefix /opt/pnpm |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Verify the manifest checksum before running pnpm.
Line 5 discards the +sha512 value pinned in package.json. npm audit signatures verifies registry signatures, but it does not compare the installed tarball with that manifest checksum. A differently signed artifact for the same version can therefore pass this check and run during the build. Compare the installed pnpm tarball integrity with the manifest checksum before the first pnpm command. Apply the same check in the relay and relay-fence-broker Dockerfiles. (docs.npmjs.com)
Cloud Verify, Mobile Checks, and hourly template qualification fail before tests because npm's version-specific pnpm metadata endpoint stalls even while package catalogs and tarballs remain available. Add a shared fallback that installs the exact pinned pnpm through npm with lifecycle scripts disabled, verifies registry signatures and the manifest checksum, and only then executes it. Use it in desktop, mobile, and cloud CI.
Cloud images bootstrap pnpm through the working catalog path and verify signatures before use. Upgrade the broker's Alpine packages to fix CVE-2026-107891 in musl; keep all existing vulnerability gates and remove build tools from runtime images.
Validation: live fallback installation with registry signature, attestation, checksum, and version verification; full cloud test command; 191 focused CI/routing tests; changed-code quality and formatting checks; all three linux/amd64 cloud image builds and runtime smoke checks. Trivy found zero fixable vulnerabilities in all three rebuilt images. The full PR workflow is checked before merge.