Repository navigation
fix(functions-compiler): report Node v22.23.4 as process.version - #675
Merged
Merged
Conversation
…he shim workerd's nodejs_compat pins process.version to v22.19.0. stripe-node sends it as lang_version in X-Stripe-Client-User-Agent, and Stripe now warns customers that their Node is affected by CVE-2026-111497, patched in 22.23.4. Set it before user code loads. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DSAVJCkPcs1gz2QDpBQZQZ
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.2.2-pr.675.788aed1Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.2.2-pr.675.788aed1"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.2.2-pr.675.788aed1"
}
}
Preview published to npm registry — try new features instantly! |
yurynix
marked this pull request as ready for review
October 23, 2026 16:14
yurynix
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
Compiled backend functions run on workerd, which hardcodes
process.versiontov22.19.0. SDKs forward that value — stripe-node (v14 through v22.0.0) sends it aslang_versionin theX-Stripe-Client-User-Agentheader — and Stripe now emails customers that their Node version is affected by CVE-2026-111497, patched in 22.23.4. This PR makes the Deno shim setprocess.versiontov22.23.4(the first patched 22.x) before any user module loads, so the reported version is accurate for the patched surface and the false-positive alerts stop. Nothing else about the runtime changes.Related Issue
None (reported via Slack thread by Yury Michurin)
Type of Change
Changes Made
packages/functions-compiler/src/shim/entry.ts: one guarded line alongside the existingDeno/Bufferglobals assignment that overwritesprocess.versionwithv22.23.4, with a comment explaining why. Guarded bytypeof process !== \"undefined\"so non-workerd/no-process environments are unaffected.packages/functions-compiler/test/process-version.e2e.test.ts: new e2e test that bundles a function readingprocess.versionat module-import time and again inside the request handler, runs it in workerd, and asserts both reportv22.23.4.Testing
Verified in workerd with `npm:stripe@20.4.1`: the client user-agent sent `"lang_version":"v22.19.0"` before the change and `"lang_version":"v22.23.4"` after it. The new e2e test covers both the import-time and request-time read. Full suite results left to CI.
Checklist
Additional Notes
The shim files under `src/` are compile-time assets embedded as strings by `build:shim`, so this reaches apps only after a new `@base44/functions-compiler` release (for apper's bundler pin) and a CLI preview/release (for the sandbox publish lane). No docs or architecture changes were needed — the change is a single line in an existing shim.
🤖 Generated by Claude | 2026-10-23 15:02 UTC | 788aed1