Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-enm-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ jobs:
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node 20
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24.22.1'
cache: 'npm'
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
echo " $PUBLISHER" >> "$GITHUB_STEP_SUMMARY"

- name: Upload bundle artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: elastos-node-manager-${{ steps.version.outputs.version }}-linux-${{ matrix.arch }}
path: |
Expand All @@ -132,7 +132,7 @@ jobs:
# attached so `wget` from the deploy script can grab a stable URL.
- name: Attach to GitHub Release
if: startsWith(github.ref, 'refs/tags/enm-v')
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
with:
files: |
${{ steps.version.outputs.tarball }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,26 @@ on:
# branches:
# - main

permissions:
contents: write
pull-requests: write

jobs:
update-release-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@a37ce9120846195fa4ece8f58b268e6043cb2f26 # v3.7.0
- name: Setup Git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Check for existing PR
id: find-pr
uses: juliangruber/find-pull-request-action@v1
uses: juliangruber/find-pull-request-action@0d2ca757412e2742b5cd5ce4ff56757c65652605 # v1.12.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
branch: release
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
if: steps.find-pr.outputs.number == ''
with:
ref: release
Expand All @@ -32,7 +36,7 @@ jobs:
git reset --hard main
- name: Create/Update PR
if: steps.find-pr.outputs.number == ''
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update release branch
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pc2-node-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24.22.1'

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: ghcr.io/elacity/pc2-node
tags: |
Expand All @@ -57,7 +57,7 @@ jobs:
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
context: ./pc2-node
file: ./pc2-node/Dockerfile
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/publish-pc2-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ jobs:
runs-on: macos-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- uses: actions/setup-go@v5
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: '1.22'

Expand Down Expand Up @@ -361,7 +361,7 @@ jobs:

ls -la staging/

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: darwin-assets
path: staging/
Expand All @@ -382,9 +382,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- uses: actions/setup-go@v5
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: '1.22'

Expand All @@ -409,7 +409,7 @@ jobs:
cp pc2-node/bin/linux-x64/awg-quick staging/awg-quick-linux
ls -la staging/

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: linux-x64-assets
path: staging/
Expand All @@ -426,9 +426,9 @@ jobs:
runs-on: ubuntu-24.04-arm
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- uses: actions/setup-go@v5
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version: '1.22'

Expand All @@ -449,7 +449,7 @@ jobs:
cp pc2-node/bin/linux-arm64/awg staging/awg-linux-arm64
ls -la staging/

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: linux-arm64-assets
path: staging/
Expand All @@ -466,9 +466,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
path: downloaded

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
- uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1
with:
release-type: node
4 changes: 2 additions & 2 deletions .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout (full history for PR diff scan)
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0

- name: Run gitleaks
uses: gitleaks/gitleaks-action@v2
uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2.3.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Org-account license for gitleaks-action v2 (free key). Required
Expand Down
71 changes: 62 additions & 9 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
# error rather than an opaque clone failure), and we re-evaluate
# then with a `git config insteadOf` rewrite step.
- name: Checkout (without submodules — not needed by build:pc2)
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: false
fetch-depth: 1
Expand All @@ -170,15 +170,15 @@ jobs:
# declares engines.node >=20.18.0; we pick the latest 20.x to match
# what a fresh user install of nvm or Node-via-Homebrew would land on.
- name: Setup Node.js 24.22.1
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24.22.1'

# Cache npm + yarn at home dir level. Speeds up successive runs from
# ~6 min install down to ~90 s once the cache is warm. The cache key
# mixes OS + all known lockfiles so a dep change always invalidates.
- name: Cache npm + yarn caches
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.npm
Expand Down Expand Up @@ -612,7 +612,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 1

Expand Down Expand Up @@ -804,19 +804,19 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: false
fetch-depth: 1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0

# We don't push, but the gha cache lets a successful build on commit N
# reuse layers from commit N-1 to speed up the inner-loop iteration
# while we're stabilising this job.
- name: Build pc2-node Docker image (no push)
uses: docker/build-push-action@v5
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
context: .
file: ./pc2-node/Dockerfile
Expand Down Expand Up @@ -989,7 +989,7 @@ jobs:
# actions/checkout uses git which we just apt-installed above.
# No submodules — same rationale as the existing matrix's checkout step.
- name: Checkout (no submodules)
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: false
fetch-depth: 1
Expand Down Expand Up @@ -1107,7 +1107,7 @@ jobs:
# install-arm.sh will then do its OWN git clone of $PC2_BRANCH into
# $PC2_DIR — that's two clones, fine in CI, the realistic user flow.
- name: Checkout (for in-branch install-arm.sh)
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
submodules: false
fetch-depth: 1
Expand Down Expand Up @@ -1270,6 +1270,59 @@ jobs:
exit 1
fi

# ---------------------------------------------------------------------------
# install-node-script: the Node step update.sh runs (scripts/install-node.sh)
# against a NodeSource Node 20 + global pm2 install, which is how most
# Linux nodes were set up.
# ---------------------------------------------------------------------------
install-node-script:
name: install-node.sh upgrade (${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- arch: x64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
timeout-minutes: 15
container:
image: ubuntu:22.04
defaults:
run:
shell: bash
steps:
- name: NodeSource Node 20 + pm2 (existing node)
run: |
set -euo pipefail
apt-get update
apt-get install -y --no-install-recommends ca-certificates curl gnupg
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
npm install -g pm2
node -v && pm2 -v

- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 1

- name: Upgrade to the patched Node
run: |
set -euo pipefail
bash scripts/install-node.sh
hash -r
test "$(command -v node)" = /usr/local/bin/node
test "$(node -v)" = v24.22.1
npm -v
pm2 -v
npm install -g pm2 >/dev/null
test -x /usr/local/bin/pm2

- name: Second run leaves it alone
run: bash scripts/install-node.sh | grep -q "already has the October 2026 security fixes"

# ---------------------------------------------------------------------------
# summary: roll up matrix results into a single "ok / not ok" output so the
# status badge + branch protection rule have one thing to point at.
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@

---

## [v1.4.5] - 2026-10-22 - Node.js upgrade on update, TLS clean-up

Running `scripts/update.sh` on a Linux node now moves it to the patched Node.js release, and the remaining places that skipped certificate checks verify them.

- `update.sh` installs Node.js 24.22.1 from nodejs.org (SHA-256 checked) when the node runs an unpatched Node, then restarts pm2 onto it and rebuilds native modules. Nodes on nvm, macOS or 32-bit OS are left as they are, with the command to upgrade printed. Set `PC2_SKIP_NODE_UPGRADE=1` to skip. The ARM installer and the supernode bootstrap use the same installer.
- pc2-node ignores a leftover `NODE_TLS_REJECT_UNAUTHORIZED=0` (copied into `pc2-node/.env` by older updates) and logs a warning. `update.sh` removes it from `.env` and no longer copies it. The pm2 config always sets it to `1`.
- The web gateway's DHT, gossip and registry-sync requests no longer decompress responses, and verify the Elacity supernodes' certificates. Gossip between the supernodes had been failing on certificate checks.
- The gateway writes `registry.json` atomically, keeping the previous copy as `.bak`, and recovers from `.bak` if the file is truncated. This was already running on InterServer and was missing from the repo.
- The supernode bootstrap, deploy, WireGuard setup and diagnose scripts no longer use `curl -k`. The cluster backfill and supernode verify scripts no longer turn verification off.
- GitHub Actions are pinned to commit SHAs. The release-PR workflow declares its permissions.

---

## [v1.4.4] - 2026-10-21 - Node.js October security release

Node.js fixed a HIGH-severity Brotli decoder out-of-bounds write (CVE-2026-111497) that any Brotli-encoded `fetch` response can reach. The fix is only in Node 24.22.1, 22.23.4 and 26.12.1; Node 20, which most PC2 nodes run, gets none. This release protects nodes on any Node version and moves new installs to Node 24.
Expand Down
Loading
Loading