Skip to content

feat(ng-dev/release): migrate release publishing from Wombat to OSS Exit Gate - #4124

Open
alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:feat/migrate-wombat-to-exit-gate
Open

alan-agius4 wants to merge 1 commit into
angular:mainfrom
alan-agius4:feat/migrate-wombat-to-exit-gate

Conversation

@alan-agius4

Copy link
Copy Markdown
Contributor

Summary

Migrates release publishing across CI (reusable-release.yml and github-actions/release/publish), local release tooling (ng-dev release publish), and CI publish recovery (ng-dev release recover-ci-publish) from Wombat Dressing Room to OSS Exit Gate (staging packages to Google Artifact Registry and uploading a publishing manifest to GCS).

Key Changes

  • Release Config (ng-dev/release/config)
    • Added ReleaseConfig.exitGate?: { projectName: string } with strict project name validation and mutual exclusivity against publishRegistry.
    • Added unit tests in ng-dev/release/config/test/config.spec.ts.
  • Shared OSS Exit Gate & NPM Utilities (ng-dev/release/versioning)
    • Added exit-gate.ts (ExitGateCommand + AR/GCS/manifest/validation helpers) with isolated ar.npmrc env-var indirection (:_authToken=${EXIT_GATE_AR_TOKEN}, provenance=false, no raw tokens on disk) and CLOUDSDK_AUTH_ACCESS_TOKEN forwarding for local ADC runs.
    • Added optional env forwarding to NpmCommand.publish, checkVersionExists, and deprecate.
  • Reusable Workflow (.github/workflows/reusable-release.yml)
    • Removed wombot-token secret and added optional exit-gate-project input.
    • Consolidated environment: npm-publish onto the publish job so dual-approval is cryptographically bound in the GitHub OIDC environment claim for GCP Workload Identity Federation.
    • Added SHA-pinned google-github-actions/auth@v3.0.0 (WIF) and google-github-actions/setup-gcloud@v3.0.1, persist-credentials: false on all checkouts, and explicit permissions on build.
  • Publish Action (github-actions/release/publish)
    • Replaced wombot-token with optional exit-gate-project input in action.yml and lib/main.ts, loading config before token minting, deleting INPUT_ANGULAR-ROBOT-KEY after minting, and masking dynamically acquired GCP tokens via core.setSecret.
    • Updated PublishCiTool and PublishSummary to check existing versions against public https://registry.npmjs.org/ via isolated empty.npmrc, clean stale AR packages, stage unpublished tarballs to AR, gate GCS manifest upload on 0 failures and >=1 staged package, warn on pkg.deprecated manual follow-ups, and enforce symlink/path-traversal checks on .tgz inputs.
    • Regenerated checked-in github-actions/release/publish/main.js and updated main.spec.ts / publish-ci.spec.ts.
  • Local Release & CI Recovery (ng-dev/release/publish, ng-dev/release/recover-ci-publish)
    • Removed Wombat login workarounds; added --exit-gate-project and local GCP ADC publishing support.
    • Fixed --stage-only skipping publish auth checks and npm logout.
    • Migrated recover-ci-publish to GCP ADC + OSS Exit Gate, fixed the release-packages artifact name mismatch, and added expired-artifact detection.
  • Security Hardening (ng-dev/utils, ng-dev/release/build)
    • Expanded ChildProcess token/secret sanitization (ya29.*, Authorization: Bearer/Basic, :_authToken=/:_password=, JWTs, error sanitization, and sensitiveOutput).
    • Expanded sensitive env var scrubbing in BuildWorker (build/index.ts and build-worker.ts).

Verification

  • pnpm bazel test //github-actions/release/publish/... //ng-dev/release/... //ng-dev/utils/... — 44/44 targets pass (including :main_test, :main_prettierignore_test, and strict-deps tests)
  • pnpm bazel build //ng-dev:npm_package — pass
  • pnpm lint — pass
  • pnpm ng-dev format changed --check — pass
  • zizmor on .github/workflows/reusable-release.yml — 0 findings

Follow-Up / Onboarding Checklist (Before Taking Out of Draft)

  • Onboard target repositories to OSS Exit Gate and verify WIF builder identities
  • Smoke-test Artifact Registry _authToken publishing and scoped package cleanup/retry behavior under npm 11
  • Configure release.exitGate.projectName in downstream repos' .ng-dev/release.mjs and drop wombot-token from caller workflows

@angular-robot angular-robot Bot added the detected: feature PR contains a feature commit label Nov 23, 2026
@alan-agius4
alan-agius4 force-pushed the feat/migrate-wombat-to-exit-gate branch 3 times, most recently from 47fbf65 to 1fbdc3b Compare November 24, 2026 09:04
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 24, 2026
@alan-agius4
alan-agius4 marked this pull request as ready for review November 24, 2026 14:12

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request replaces the Wombat (NPM) publishing flow with OSS Exit Gate publishing, staging pre-built packages to Google Cloud Artifact Registry and uploading a release manifest to GCS. It introduces ExitGateCommand to manage gcloud operations, updates the release and recovery tools, and hardens process sanitization in child-process.ts to redact sensitive credentials. Feedback from the review suggests expanding glob validation to prevent brace expansion, setting sensitiveOutput: true when spawning commands with GCP access tokens, and adding redaction patterns for GitHub tokens to further harden sanitization.

Comment thread ng-dev/release/versioning/exit-gate.ts Resolved
Comment thread ng-dev/release/versioning/exit-gate.ts Resolved
Comment thread ng-dev/utils/child-process.ts Resolved
…xit Gate

Migrates CI release publishing, local release publishing, and CI publish
recovery from Wombat Dressing Room to OSS Exit Gate (staging packages to
Google Artifact Registry and uploading a publishing manifest to GCS):

- Add `ReleaseConfig.exitGate` (`{projectName}`) configuration and validation
  with mutual exclusivity against `publishRegistry`.
- Add shared `ExitGateCommand` and Artifact Registry / GCS manifest helpers
  in `ng-dev/release/versioning/exit-gate.ts` plus scoped `env` support on
  `NpmCommand`.
- Update `reusable-release.yml` to authenticate via Workload Identity
  Federation (`google-github-actions/auth@v3.0.0` + `setup-gcloud@v3.0.1`),
  bind `environment: npm-publish` directly to the `publish` job, remove
  `wombot-token`, and add `persist-credentials: false` on checkouts.
- Update `github-actions/release/publish` (`action.yml`, `main.ts`,
  `publish-ci.ts`, `publish-summary.ts`, and checked-in `main.js`) to stage
  packages to Artifact Registry using an isolated ephemeral `ar.npmrc`, check
  existing versions against public `registry.npmjs.org`, trigger Exit Gate
  via GCS manifest upload, and log manual deprecation follow-ups.
- Migrate `ng-dev release publish` and `ng-dev release recover-ci-publish`
  from Wombat to Google Cloud ADC + OSS Exit Gate, fix `--stage-only`
  skipping publish auth/logout, and fix the `release-packages` artifact name
  mismatch in recovery.
- Harden token sanitization in `ChildProcess`, env scrubbing in build
  workers, and symlink/path-traversal checks for release tarballs.
@alan-agius4
alan-agius4 force-pushed the feat/migrate-wombat-to-exit-gate branch from 1fbdc3b to b554a2c Compare November 24, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant