Skip to content

fix(functions-compiler): report Node v22.23.4 as process.version - #675

Merged
yurynix merged 1 commit into
mainfrom
fix/shim-process-version
Oct 23, 2026
Merged

yurynix merged 1 commit into
mainfrom
fix/shim-process-version

Conversation

@claude

@claude claude Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Note

Description

Compiled backend functions run on workerd, which hardcodes process.version to v22.19.0. SDKs forward that value — stripe-node (v14 through v22.0.0) sends it as lang_version in the X-Stripe-Client-User-Agent header — 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 set process.version to v22.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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • packages/functions-compiler/src/shim/entry.ts: one guarded line alongside the existing Deno/Buffer globals assignment that overwrites process.version with v22.23.4, with a comment explaining why. Guarded by typeof 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 reading process.version at module-import time and again inside the request handler, runs it in workerd, and asserts both report v22.23.4.

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (`npm test`)

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

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated `docs/` (AGENTS.md) if I made architectural changes

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

…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
@claude claude Bot assigned yurynix Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.2.2-pr.675.788aed1

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.2.2-pr.675.788aed1"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.2.2-pr.675.788aed1"
  }
}

Preview published to npm registry — try new features instantly!

@yurynix
yurynix marked this pull request as ready for review October 23, 2026 16:14
@yurynix
yurynix merged commit af15940 into main Oct 23, 2026
16 checks passed
@yurynix
yurynix deleted the fix/shim-process-version branch October 23, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants