Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6f70fb0
Initial patch
JackStrohm-asana Feb 3, 2026
a8d4c9b
s3 staging script
JackStrohm-asana Feb 4, 2026
0c1288a
script to build locally instead of using docker containers which don'…
JackStrohm-asana Feb 4, 2026
5e0424e
update github actions to build node fibers
JackStrohm-asana Feb 4, 2026
2d64ee8
fix node-fibers branchname
JackStrohm-asana Feb 4, 2026
b9b6b32
update staging directory
JackStrohm-asana Feb 4, 2026
b577cda
Add fips build workflow
JackStrohm-asana Feb 10, 2026
ba48e86
change fiber and package build triggers
JackStrohm-asana Feb 10, 2026
9977ae6
try to fix network errors on apt-get
JackStrohm-asana Feb 10, 2026
2118248
working on apt-get failures
JackStrohm-asana Feb 10, 2026
5122fc2
removed push trigger
JackStrohm-asana Feb 10, 2026
9260bf1
another test
JackStrohm-asana Feb 10, 2026
cf4884d
switch FIPS Dockerfile to Ubuntu 20.04
JackStrohm-asana Feb 10, 2026
3814757
revert FIPS Dockerfile to Ubuntu 22.04
JackStrohm-asana Feb 10, 2026
0824123
add robust retry logic to FIPS Dockerfile apt-get
JackStrohm-asana Feb 10, 2026
39bd639
consolidate all apt-get commands into single retry block
JackStrohm-asana Feb 10, 2026
18a6979
add robust retry logic to regular Node Dockerfile
JackStrohm-asana Feb 10, 2026
99fede0
rename build workflows for clarity
JackStrohm-asana Feb 10, 2026
0f26935
added fips to the staging script to make sure we don't have cache issues
JackStrohm-asana Feb 11, 2026
829e1c9
make staging do fips and update asana codez codebase
JackStrohm-asana Feb 11, 2026
6dad6fe
update lockfile instructions
JackStrohm-asana Feb 11, 2026
ab57e94
fix staging script: validate fibers archive and fix node_setup.bzl up…
JackStrohm-asana Mar 2, 2026
bd560ee
Untested support for profiler
JackStrohm-asana Mar 5, 2026
d2b5f7f
Install node-gyp before rebuilding pprof native binding
JackStrohm-asana Mar 5, 2026
17f3b44
Fix pprof native build: use --build-from-source and find .node output
JackStrohm-asana Mar 5, 2026
c0bc534
deps: brotli: cherry-pick 0ed4268a4401abcb44720963
eustas Feb 27, 2026
c4fecfb
src: expose `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH`
aduh95 Oct 12, 2026
d3cff29
Merge pull request #25 from jrsells/cve-2026-111497
jrsells Oct 23, 2026
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
74 changes: 74 additions & 0 deletions .github/workflows/build-node-fibers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build Custom Fibers

on:
workflow_dispatch:
workflow_run:
workflows: ["Build Node (Standard)"]
types:
- completed
branches:
- v22.21.1

jobs:
build-fibers:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
include:
- platform: linux
arch: x64
runs_on: ubuntu-22.04
- platform: linux
arch: arm64
runs_on: ubuntu-22.04-arm
runs-on: ${{ matrix.runs_on }}

env:
NODE_VERSION: v22.21.1

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Debug Matrix Values
run: |
echo "Matrix platform: ${{ matrix.platform }}"
echo "Matrix arch: ${{ matrix.arch }}"

- name: Download Node archive
run: |
gh release download node-${{ env.NODE_VERSION }}-release \
--repo asana/node \
--pattern "node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST.tar.xz"
mv node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST.tar.xz node.tar.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Execute the Dockerfile
run: |
pwd
docker build -t node22_fibers_build -f Dockerfile.Fibers .

- name: Extract resources
run: |
docker create --name temp_node_fibers_extract node22_fibers_build
docker cp temp_node_fibers_extract:/usr/src/node/node-fibers $GITHUB_WORKSPACE/node-fibers
docker rm temp_node_fibers_extract

- name: Find and archive fibers.node
run: |
# Find the directory under bin/ that contains fibers.node
FIBERS_PATH=$(find ./node-fibers/bin -type f -name fibers.node | head -n1)
FIBERS_DIR=$(dirname "$FIBERS_PATH")
ARCHIVE_NAME=$(basename "$FIBERS_DIR").tar.gz
echo "ARCHIVE_NAME=$ARCHIVE_NAME" >> $GITHUB_ENV
tar -czf "$ARCHIVE_NAME" -C "$(dirname "$FIBERS_DIR")" "$(basename "$FIBERS_DIR")"

- name: Upload archive to release
uses: softprops/action-gh-release@v1
with:
name: node-${{ env.NODE_VERSION }}-LATEST
tag_name: node-${{ env.NODE_VERSION }}-release
files: ${{ env.ARCHIVE_NAME }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98 changes: 98 additions & 0 deletions .github/workflows/build-node-openssl-fips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build Node (FIPS)

on:
workflow_dispatch:
inputs:
BUILD_REF:
description: 'Git ref to build Node.js from'
required: true
default: 'v22.21.1'
type: string
DOCKER_FILE:
description: 'Dockerfile to use for building Node.js'
required: true
default: 'Dockerfile.Node22fips'
type: string

jobs:
build-node:
name: Build ${{ matrix.platform }}-${{ matrix.arch }} with FIPS OpenSSL
strategy:
matrix:
include:
- platform: linux
arch: x64
runs_on: ubuntu-22.04
- platform: linux
arch: arm64
runs_on: ubuntu-22.04-arm
runs-on: ${{ matrix.runs_on }}

steps:
- name: Checkout Node fork
uses: actions/checkout@v3
with:
repository: Asana/node
path: node
ref: ${{ inputs.BUILD_REF }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Node Version
id: extract-node-version
run: |
NODE_MAJOR_VERSION=$(grep '#define NODE_MAJOR_VERSION' node/src/node_version.h | awk '{print $3}')
NODE_MINOR_VERSION=$(grep '#define NODE_MINOR_VERSION' node/src/node_version.h | awk '{print $3}')
NODE_PATCH_VERSION=$(grep '#define NODE_PATCH_VERSION' node/src/node_version.h | awk '{print $3}')
NODE_VERSION="v${NODE_MAJOR_VERSION}.${NODE_MINOR_VERSION}.${NODE_PATCH_VERSION}"
echo "NODE_VERSION=${NODE_VERSION}" >> $GITHUB_ENV

- name: Set build metadata
id: meta
working-directory: node
run: |
TIMESTAMP=$(date -u +%Y-%m-%dT%H-%M)
SHORT_SHA=$(git rev-parse --short HEAD)
echo "BUILD_ID=${TIMESTAMP}-${SHORT_SHA}" >> $GITHUB_ENV
echo "build_id=${TIMESTAMP}-${SHORT_SHA}" >> $GITHUB_OUTPUT

- name: Execute the Dockerfile
working-directory: node
run: |
docker build -t node22_fips_build -f ./${{ inputs.DOCKER_FILE }} .

Comment on lines +60 to +62

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High severity blocking issue identified in your code:
Using variable interpolation ${{...}} with github context data in a run: step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. github context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".

To resolve this comment:

🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by run-shell-injection.

Please reach out to Security (go/sec-inbox) if you need help with this.

You can view more details about this finding in the Semgrep AppSec Platform.

- name: Extract resources
run: |
docker create --name temp_node_extract node22_fips_build
docker cp temp_node_extract:/usr/src/node/node-install $GITHUB_WORKSPACE/node-install
docker rm temp_node_extract

- name: Archive Node
run: |
mkdir -p artifacts
FILENAME=node-${NODE_VERSION}-fips-${{ matrix.platform }}-${{ matrix.arch }}-${{ steps.meta.outputs.build_id }}.tar.xz
FILENAME_LATEST=node-${NODE_VERSION}-fips-${{ matrix.platform }}-${{ matrix.arch }}-LATEST.tar.xz
tar -C node-install -cJf artifacts/$FILENAME .
cp artifacts/$FILENAME artifacts/$FILENAME_LATEST
echo "NODE_ARCHIVE=$FILENAME" >> $GITHUB_ENV
echo "NODE_ARCHIVE_LATEST=$FILENAME_LATEST" >> $GITHUB_ENV

- name: Upload Node archive
uses: actions/upload-artifact@v4
with:
name: node-${{ env.NODE_VERSION }}-fips-${{ matrix.platform }}-${{ matrix.arch }}-${{ steps.meta.outputs.build_id }}
path: artifacts/${{ env.NODE_ARCHIVE }}

- name: Upload Node archive latest
uses: actions/upload-artifact@v4
with:
name: node-${{ env.NODE_VERSION }}-fips-${{ matrix.platform }}-${{ matrix.arch }}-LATEST
path: artifacts/${{ env.NODE_ARCHIVE_LATEST }}

- name: Upload Node archive to release
uses: softprops/action-gh-release@v1
with:
name: node-${{ env.NODE_VERSION }}-fips-LATEST
tag_name: node-${{ env.NODE_VERSION }}-fips-release
files: ./artifacts/${{ env.NODE_ARCHIVE_LATEST }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77 changes: 77 additions & 0 deletions .github/workflows/build-node-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Build Node-Packages

on:
workflow_dispatch:
workflow_run:
workflows: ["Build Node (Standard)"]
types:
- completed
branches:
- v22.21.1

jobs:
build-packages:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
include:
- platform: linux
arch: x64
runs_on: ubuntu-22.04
- platform: linux
arch: arm64
runs_on: ubuntu-22.04-arm
runs-on: ${{ matrix.runs_on }}

env:
NODE_VERSION: v22.21.1

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Debug Matrix Values
run: |
echo "Matrix platform: ${{ matrix.platform }}"
echo "Matrix arch: ${{ matrix.arch }}"

- name: Download Node archive
run: |
gh release download node-${{ env.NODE_VERSION }}-release \
--repo asana/node \
--pattern "node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST.tar.xz"
mv node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST.tar.xz node.tar.xz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Execute the Dockerfile
run: |
pwd
docker build -t node22_packages_build -f Dockerfile.Packages .

- name: Extract resources
run: |
docker create --name temp_node_packages_extract node22_packages_build
docker cp temp_node_packages_extract:/usr/src/node/node_modules $GITHUB_WORKSPACE/node_modules
docker rm temp_node_packages_extract

- name: Tar node-packages
run: |
mkdir -p ./bcrypt@5.1.0/node_modules
mkdir -p ./cld@2.9.1/node_modules
mkdir -p ./unix-dgram@2.0.6/node_modules
mkdir -p "./@datadog+pprof@5.8.0/node_modules/@datadog"
mv node_modules/bcrypt ./bcrypt@5.1.0/node_modules/
mv node_modules/cld ./cld@2.9.1/node_modules/
mv node_modules/unix-dgram ./unix-dgram@2.0.6/node_modules/
mv "node_modules/@datadog/pprof" "./@datadog+pprof@5.8.0/node_modules/@datadog/"
tar --hard-dereference -cvzf packages_${{matrix.arch}}.tar.gz bcrypt@5.1.0 cld@2.9.1 unix-dgram@2.0.6 "@datadog+pprof@5.8.0"

- name: Upload archive to release
uses: softprops/action-gh-release@v1
with:
name: node-${{ env.NODE_VERSION }}-LATEST
tag_name: node-${{ env.NODE_VERSION }}-release
files: packages_${{matrix.arch}}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91 changes: 91 additions & 0 deletions .github/workflows/build-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Build Node (Standard)

on:
workflow_dispatch:

jobs:
build-node:
name: Build ${{ matrix.platform }}-${{ matrix.arch }}
strategy:
matrix:
include:
- platform: linux
arch: x64
runs_on: ubuntu-22.04
- platform: linux
arch: arm64
runs_on: ubuntu-22.04-arm
runs-on: ${{ matrix.runs_on }}

env:
S3_BUCKET: your-bucket-name
AWS_REGION: us-east-1

steps:
- name: Checkout Node fork
uses: actions/checkout@v3
with:
repository: Asana/node
path: node
ref: ${{ github.event_name == 'pull_request' && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Node Version
id: extract-node-version
run: |
NODE_MAJOR_VERSION=$(grep '#define NODE_MAJOR_VERSION' node/src/node_version.h | awk '{print $3}')
NODE_MINOR_VERSION=$(grep '#define NODE_MINOR_VERSION' node/src/node_version.h | awk '{print $3}')
NODE_PATCH_VERSION=$(grep '#define NODE_PATCH_VERSION' node/src/node_version.h | awk '{print $3}')
NODE_VERSION="v${NODE_MAJOR_VERSION}.${NODE_MINOR_VERSION}.${NODE_PATCH_VERSION}"
echo "NODE_VERSION=${NODE_VERSION}" >> $GITHUB_ENV

- name: Set build metadata
id: meta
working-directory: node
run: |
TIMESTAMP=$(date -u +%Y-%m-%dT%H-%M)
SHORT_SHA=$(git rev-parse --short HEAD)
echo "BUILD_ID=${TIMESTAMP}-${SHORT_SHA}" >> $GITHUB_ENV
echo "build_id=${TIMESTAMP}-${SHORT_SHA}" >> $GITHUB_OUTPUT

- name: Execute the Dockerfile
working-directory: node
run: |
docker build -t node22_build -f ./Dockerfile.Node22 .

- name: Extract resources
run: |
docker create --name temp_node_extract node22_build
docker cp temp_node_extract:/usr/src/node/node-install $GITHUB_WORKSPACE/node-install
docker rm temp_node_extract

- name: Archive Node
run: |
mkdir -p artifacts
FILENAME=node-${NODE_VERSION}-${{ matrix.platform }}-${{ matrix.arch }}-${{ steps.meta.outputs.build_id }}.tar.xz
FILENAME_LATEST=node-${NODE_VERSION}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST.tar.xz
tar -C node-install -cJf artifacts/$FILENAME .
cp artifacts/$FILENAME artifacts/$FILENAME_LATEST
echo "NODE_ARCHIVE=$FILENAME" >> $GITHUB_ENV
echo "NODE_ARCHIVE_LATEST=$FILENAME_LATEST" >> $GITHUB_ENV

- name: Upload Node archive
uses: actions/upload-artifact@v4
with:
name: node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ steps.meta.outputs.build_id }}
path: artifacts/${{ env.NODE_ARCHIVE }}

- name: Upload Node archive latest
uses: actions/upload-artifact@v4
with:
name: node-${{ env.NODE_VERSION }}-${{ matrix.platform }}-${{ matrix.arch }}-LATEST
path: artifacts/${{ env.NODE_ARCHIVE_LATEST }}

- name: Upload Node archive to release
uses: softprops/action-gh-release@v1
with:
name: node-${{ env.NODE_VERSION }}-LATEST
tag_name: node-${{ env.NODE_VERSION }}-release
files: ./artifacts/${{ env.NODE_ARCHIVE_LATEST }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions Dockerfile.Fibers
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Stage 1
FROM ubuntu:20.04 AS base

# Set non-interactive mode to avoid prompts during installation
ENV DEBIAN_FRONTEND=noninteractive

# Install necessary dependencies
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
RUN apt-get update
RUN apt-get install -y build-essential python3 python3-distutils g++-10 make curl git pkg-config libssl-dev libffi-dev libgmp-dev libtool autoconf automake cmake wget xz-utils unzip vim

# Copy local Node.js source into the image
WORKDIR /usr/src/node
COPY node.tar.xz .

RUN mkdir -p node-install && tar -C node-install -xJf node.tar.xz

ENV PATH="/usr/src/node/node-install/usr/local/bin:$PATH"

RUN which node
RUN node -v
RUN node -p "process.arch"
RUN echo -------------------
RUN git clone --branch jackstrohm_node20_fibers --depth 1 https://github.com/asana/node-fibers.git node-fibers

WORKDIR /usr/src/node/node-fibers
RUN npm install --nodedir="/usr/src/node/node-install/usr/local"
RUN npm test || true
RUN rm bin/repl
RUN find .


CMD ["bash"]
Loading
Loading