From f9ad099021fbdfb91d63eb44b5470bcb7d4d4de1 Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Fri, 23 Oct 2026 11:45:57 -0700 Subject: [PATCH 1/5] Harden Node tooling for October 2026 security releases Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- .github/workflows/codeql-analysis.yml | 5 +++++ .nvmrc | 1 + CONTRIBUTING.md | 25 ++++++++++++++++++++++--- SECURITY.md | 26 ++++++++++++++++++++++++++ package.json | 7 +++++++ 6 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a52c432..43d3b97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [ 20.x, 22.x ] + node-version: [ '22.23.4', '24.22.1' ] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 503abc6..51d7405 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -41,6 +41,11 @@ jobs: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Use repository Node.js version + uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version-file: .nvmrc + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..ce62013 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24.22.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d1b9fe..6d8aaeb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,19 +22,38 @@ We strongly welcome and encourage contributions to this project. If making a lar ## Clone, Setup, Build & Test this repo 1. Clone the repository and create a new branch -2. Install all dependencies +2. Select a patched Node.js runtime before installing dependencies or running any + build, test, documentation, development-server, or packaging tools. The default + is Node.js **24.22.1**, recorded in `.nvmrc`. With nvm, run `nvm install` and + `nvm use`; with nvm-windows, run `nvm install 24.22.1` and `nvm use 24.22.1`. + Check `node --version` and use the npm bundled with the selected runtime. + + The minimum supported tooling versions are **22.23.4**, **24.22.1**, and + **26.12.1**, including later stable releases within each of those major lines. + CI covers Node.js 22.23.4 and 24.22.1. Older, odd-numbered, and prerelease Node.js + versions are not supported for repository tooling. npm's root `devEngines` + constraint rejects unsupported runtimes for installs and `npm run` commands; + older npm versions that do not implement `devEngines`, direct tool invocations, + and commands inside `lib` or `rollup` still require selecting the runtime first. + Do not bypass the check with `--force`. + + These are development-tooling requirements, not new runtime requirements for + consumers of the published browser library or Rollup plugin. See + [Node.js tooling security](SECURITY.md#nodejs-tooling-security) for scope. + +3. Install all dependencies ```sh npm install ``` -3. Build and create docs +4. Build and create docs ```sh npm run build ``` -4. Run tests +5. Run tests ```sh npm run test diff --git a/SECURITY.md b/SECURITY.md index 03a0d50..4a2dff9 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -39,3 +39,29 @@ We prefer all communications to be in English. Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). + +## Node.js tooling security + +Repository development, CI, builds, tests, documentation, and packaging use the +[October 21, 2026 Node.js security baseline](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases): +Node.js 22.23.4, 24.22.1, or 26.12.1, or a later stable release within one of those +major lines. `.nvmrc` selects 24.22.1 by default; the root `package.json` uses +`devEngines` to check the runtime used by npm tooling without adding an `engines` +requirement to the published packages. Keep these settings and the CI matrix in +sync when raising the baseline. + +Updating Node.js addresses the applicable DNS, TLS, HTTP, crypto snapshot, +filesystem-permission, Brotli decoder, and Node.js 26 ZIP fixes, plus bundled +c-ares, CA certificate, OpenSSL, SQLite, and Undici updates where included in each +release line. It also hardens encoding-only tooling as a precaution, including +the Node.js zlib runtime used by compression dependencies and packaging tools +such as `npm pack`. CVE-2026-111497 affects Brotli **decoding**; this does not +classify encoding as vulnerable or change the library API or compression behavior. + +The published library does not select or ship a Node.js runtime. Consumers must +update their own runtimes. GitHub-hosted runner images, JavaScript action runtimes +embedded in checkout/setup-node/CodeQL, and externally managed build agents or +pipeline tasks must be patched by their owners; `setup-node` selects the runtime +for subsequent shell commands, not those embedded runtimes. The shared +DynamicProto release pipeline is maintained in the separate 1DS repository and +must retain its own patched runtime selection and guard. diff --git a/package.json b/package.json index da5ed43..3c09c81 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,13 @@ "url": "https://github.com/microsoft/DynamicProto-JS/issues" }, "homepage": "https://github.com/microsoft/DynamicProto-JS#readme", + "devEngines": { + "runtime": { + "name": "node", + "version": "^22.23.4 || ^24.22.1 || ^26.12.1", + "onFail": "error" + } + }, "overrides": { "minimatch": "~3.1.2", "brace-expansion": "^1.1.18", From 62562f939fcd49ff12cffced9a738db680307db1 Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Fri, 23 Oct 2026 12:31:27 -0700 Subject: [PATCH 2/5] Preserve Actions coverage in the advanced CodeQL workflow Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 51d7405..c1d12b7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -32,8 +32,8 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript-typescript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + language: [ 'javascript-typescript', 'actions' ] + # Retain Actions coverage when switching from default to advanced setup. # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed From e32fd5f84a8de86db1327cf0c71c6944825d3361 Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Fri, 23 Oct 2026 12:50:15 -0700 Subject: [PATCH 3/5] Remove the development runtime file and pin CodeQL directly Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 2 +- .nvmrc | 1 - CONTRIBUTING.md | 4 +--- SECURITY.md | 8 ++++---- 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 .nvmrc diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c1d12b7..6fbd275 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,7 +44,7 @@ jobs: - name: Use repository Node.js version uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - node-version-file: .nvmrc + node-version: '24.22.1' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index ce62013..0000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -24.22.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d8aaeb..97583a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,9 +23,7 @@ We strongly welcome and encourage contributions to this project. If making a lar 1. Clone the repository and create a new branch 2. Select a patched Node.js runtime before installing dependencies or running any - build, test, documentation, development-server, or packaging tools. The default - is Node.js **24.22.1**, recorded in `.nvmrc`. With nvm, run `nvm install` and - `nvm use`; with nvm-windows, run `nvm install 24.22.1` and `nvm use 24.22.1`. + build, test, documentation, development-server, or packaging tools. Check `node --version` and use the npm bundled with the selected runtime. The minimum supported tooling versions are **22.23.4**, **24.22.1**, and diff --git a/SECURITY.md b/SECURITY.md index 4a2dff9..0f3e981 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -45,10 +45,10 @@ Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https: Repository development, CI, builds, tests, documentation, and packaging use the [October 21, 2026 Node.js security baseline](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases): Node.js 22.23.4, 24.22.1, or 26.12.1, or a later stable release within one of those -major lines. `.nvmrc` selects 24.22.1 by default; the root `package.json` uses -`devEngines` to check the runtime used by npm tooling without adding an `engines` -requirement to the published packages. Keep these settings and the CI matrix in -sync when raising the baseline. +major lines. CI pins 22.23.4 and 24.22.1, and CodeQL tooling pins 24.22.1 directly. +The root `package.json` uses `devEngines` to check the runtime used by npm tooling +without adding an `engines` requirement to the published packages. Keep this +constraint and the workflow pins in sync when raising the baseline. Updating Node.js addresses the applicable DNS, TLS, HTTP, crypto snapshot, filesystem-permission, Brotli decoder, and Node.js 26 ZIP fixes, plus bundled From 6ea2a71693fdf292b351d7b798266797d5678d9a Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Fri, 23 Oct 2026 12:53:50 -0700 Subject: [PATCH 4/5] Use managed CodeQL scanning instead of the duplicate workflow Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 79 --------------------------- SECURITY.md | 3 +- 2 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 6fbd275..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,79 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ main, master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main, master ] - schedule: - - cron: '39 23 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript-typescript', 'actions' ] - # Retain Actions coverage when switching from default to advanced setup. - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Use repository Node.js version - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - with: - node-version: '24.22.1' - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 - with: - languages: ${{ matrix.language }} - config-file: ./.github/codeql/codeql-config.yml - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 - with: - category: "/language:${{matrix.language}}" diff --git a/SECURITY.md b/SECURITY.md index 0f3e981..8f66443 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -45,7 +45,8 @@ Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https: Repository development, CI, builds, tests, documentation, and packaging use the [October 21, 2026 Node.js security baseline](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases): Node.js 22.23.4, 24.22.1, or 26.12.1, or a later stable release within one of those -major lines. CI pins 22.23.4 and 24.22.1, and CodeQL tooling pins 24.22.1 directly. +major lines. Node.js CI pins 22.23.4 and 24.22.1; CodeQL uses managed default +scanning without the repository's custom query configuration. The root `package.json` uses `devEngines` to check the runtime used by npm tooling without adding an `engines` requirement to the published packages. Keep this constraint and the workflow pins in sync when raising the baseline. From b56f48b351739426cf12bc0dd3d51f8c61fa2516 Mon Sep 17 00:00:00 2001 From: Jackson Weber Date: Fri, 23 Oct 2026 13:29:29 -0700 Subject: [PATCH 5/5] Preserve required Node build check names with patched runtime pins Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43d3b97..99bb649 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,11 +12,16 @@ on: jobs: build: + name: build (${{ matrix.node-line }}) runs-on: ubuntu-latest strategy: matrix: - node-version: [ '22.23.4', '24.22.1' ] + include: + - node-line: '22.x' + node-version: '22.23.4' + - node-line: '24.x' + node-version: '24.22.1' steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1