Skip to content

fix(ng-dev): scrub GitHub tokens from build worker child process environment - #4023

Merged
josephperrott merged 1 commit into
angular:mainfrom
josephperrott:fix/build-worker-token-scrubbing
Oct 12, 2026
Merged

josephperrott merged 1 commit into
angular:mainfrom
josephperrott:fix/build-worker-token-scrubbing

Conversation

@josephperrott

@josephperrott josephperrott commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Scrub GITHUB_TOKEN, TOKEN, GH_TOKEN, and SNAPSHOT_BUILDS_GITHUB_TOKEN from the child process environment when spawning the release build worker, and delete GITHUB_TOKEN and TOKEN from process.env after configuring AuthenticatedGitClient while tracking the source environment variable name for push URL hints.

@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 enhances security and robustness around GitHub tokens by scrubbing sensitive environment variables (such as GITHUB_TOKEN, TOKEN, GH_TOKEN, and SNAPSHOT_BUILDS_GITHUB_TOKEN) from process.env after configuring the authenticated git client and before invoking build workers. It also updates AuthenticatedGitClient to track the specific token environment variable name dynamically. Feedback on the changes includes a recommendation to remove an unused named import fork in ng-dev/release/build/index.ts.

Comment thread ng-dev/release/build/index.ts Outdated
@josephperrott
josephperrott force-pushed the fix/build-worker-token-scrubbing branch from 26fd72e to 06a883c Compare October 9, 2026 18:33
@josephperrott josephperrott changed the title fix(release): scrub GITHUB_TOKEN from build worker child process environment fix(ng-dev): scrub GitHub tokens from build worker child process environment Oct 9, 2026
@josephperrott
josephperrott force-pushed the fix/build-worker-token-scrubbing branch from 06a883c to 3e4ab7a Compare October 9, 2026 18:55
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Oct 12, 2026
@josephperrott
josephperrott force-pushed the fix/build-worker-token-scrubbing branch 3 times, most recently from 83618dc to 02d582c Compare October 12, 2026 12:18
…ronment

Scrub GITHUB_TOKEN, TOKEN, GH_TOKEN, and SNAPSHOT_BUILDS_GITHUB_TOKEN from the child process environment when spawning the release build worker, and delete GITHUB_TOKEN and TOKEN from process.env after configuring AuthenticatedGitClient while tracking the source environment variable name for push URL hints.
@josephperrott
josephperrott force-pushed the fix/build-worker-token-scrubbing branch from 02d582c to 359d229 Compare October 12, 2026 13:57
@josephperrott
josephperrott merged commit 28ae58d into angular:main Oct 12, 2026
17 checks passed
@josephperrott

Copy link
Copy Markdown
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

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

Labels

action: merge The PR is ready for merge by the caretaker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants