Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: addressed review comments

=f9ee25295df6
diff --git a/.github/workflows/check-be-ts-and-lint.yml b/.github/workflows/check-be-ts-and-lint.yml
index f11688d134..b228c8e51a 100644
--- a/.github/workflows/check-be-ts-and-lint.yml
+++ b/.github/workflows/check-be-ts-and-lint.yml
@@ -28,7 +28,7 @@ jobs:
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: backend/node_modules
- key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json') }}
+ key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json', 'backend/package.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
@@ -63,7 +63,7 @@ jobs:
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: backend/node_modules
- key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json') }}
+ key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json', 'backend/package.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
diff --git a/.github/workflows/run-backend-bdd-tests.yml b/.github/workflows/run-backend-bdd-tests.yml
index cf0cf84a0d..98e300003b 100644
--- a/.github/workflows/run-backend-bdd-tests.yml
+++ b/.github/workflows/run-backend-bdd-tests.yml
@@ -57,7 +57,7 @@ jobs:
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: backend/node_modules
- key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json') }}
+ key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json', 'backend/package.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
diff --git a/.github/workflows/run-backend-tests.yml b/.github/workflows/run-backend-tests.yml
index f164e86128..dd2a68aeaa 100644
--- a/.github/workflows/run-backend-tests.yml
+++ b/.github/workflows/run-backend-tests.yml
@@ -52,7 +52,7 @@ jobs:
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: backend/node_modules
- key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json') }}
+ key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json', 'backend/package.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
diff --git a/CLAUDE.md b/CLAUDE.md
index f2c076cadc..73cdd10755 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -62,6 +62,8 @@ file and the `ARG` defaults together.
Both `backend/` and `frontend/` enforce a minimum release age of 7 days for npm packages (configured via `.npmrc` in each directory). This means `npm install` will only resolve package versions published at least 7 days ago, as a supply-chain security measure.
+The backend installs with the npm bundled in Node 26 (11.x), which skips dependency install scripts unless `allowScripts` in `backend/package.json` approves them. The install still succeeds when a script is skipped, so a native addon that was not approved fails only when it is first `require`d. When adding or bumping a dependency with an install script, run `npm install-scripts ls` and approve or deny what it lists (`npm install-scripts approve <pkg>`).
+
## Cross-Cutting Patterns
### Backend Code Quality
diff --git a/Dockerfile.fips.standalone-infisical b/Dockerfile.fips.standalone-infisical
index 92a7704229..0ea32f3d39 100644
--- a/Dockerfile.fips.standalone-infisical
+++ b/Dockerfile.fips.standalone-infisical
@@ -6,12 +6,6 @@ ARG INFISICAL_CLI_VERSION=0.43.136
FROM node:26.10.0-trixie-slim AS base
-# The base image ships npm 10.9.8, whose bundled tar 7.5.11 carries CVE-2026-59873;
-# 10.9.9 fixes it. package.json declares npm >= 11.10.0, but the committed lockfile
-# does not install under npm 11, which requires every optional platform entry to be
-# present. Regenerating the lockfile is a separate change; until then this stays on 10.x.
-RUN npm install -g [email protected]
-
FROM base AS frontend-dependencies
WORKDIR /app
@@ -114,7 +108,6 @@ RUN npm ci
COPY /backend .
COPY --chown=non-root-user:nodejs standalone-entrypoint.sh standalone-entrypoint.sh
-RUN npm i -g tsconfig-paths
RUN npm run build
# Bake in-app announcements + their images at build time so self-hosted / air-gapped
diff --git a/Dockerfile.standalone-infisical b/Dockerfile.standalone-infisical
index 8f011d1675..067a982247 100644
--- a/Dockerfile.standalone-infisical
+++ b/Dockerfile.standalone-infisical
@@ -6,12 +6,6 @@ ARG INFISICAL_CLI_VERSION=0.43.136
FROM node:26.10.0-trixie-slim AS base
-# The base image ships npm 10.9.8, whose bundled tar 7.5.11 carries CVE-2026-59873;
-# 10.9.9 fixes it. package.json declares npm >= 11.10.0, but the committed lockfile
-# does not install under npm 11, which requires every optional platform entry to be
-# present. Regenerating the lockfile is a separate change; until then this stays on 10.x.
-RUN npm install -g [email protected]
-
FROM base AS frontend-dependencies
WORKDIR /app
@@ -114,7 +108,6 @@ RUN npm ci
COPY /backend .
COPY --chown=non-root-user:nodejs standalone-entrypoint.sh standalone-entrypoint.sh
-RUN npm i -g tsconfig-paths
ENV NODE_OPTIONS="--max-old-space-size=8192"
RUN npm run build
diff --git a/backend/Dockerfile b/backend/Dockerfile
index 7d0094143a..50f767543d 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -3,9 +3,6 @@ ARG INFISICAL_CLI_VERSION=0.43.136
FROM node:26.10.0-trixie-slim AS build
-# Pinned to match the runtime image; see Dockerfile.standalone-infisical.
-RUN npm install -g [email protected]
-
WORKDIR /app
# Required for pkcs11js and TDS driver (SAP ASE dynamic secrets)
@@ -51,9 +48,6 @@ RUN ARCH=$(dpkg --print-architecture) && \
# Production dependencies (runs in parallel with build)
FROM node:26.10.0-trixie-slim AS prod-deps
-# Pinned to match the runtime image; see Dockerfile.standalone-infisical.
-RUN npm install -g [email protected]
-
WORKDIR /app
# Build tools needed to compile native modules during npm ci
@@ -74,9 +68,6 @@ RUN npm ci --omit=dev
# Production stage
FROM node:26.10.0-trixie-slim
-# Pinned to match the runtime image; see Dockerfile.standalone-infisical.
-RUN npm install -g [email protected]
-
WORKDIR /app
ENV npm_config_cache /home/node/.npm
diff --git a/backend/Dockerfile.dev b/backend/Dockerfile.dev
index f7321c2872..44535b7f2c 100644
--- a/backend/Dockerfile.dev
+++ b/backend/Dockerfile.dev
@@ -26,9 +26,6 @@ RUN ARCH=$(dpkg --print-architecture) && \
FROM node:26.10.0-trixie-slim
-# Pinned to match the runtime image; see Dockerfile.standalone-infisical.
-RUN npm install -g [email protected]
-
# ? Setup a test SoftHSM module. In production a real HSM is used.
ARG SOFTHSM2_VERSION=2.5.0
diff --git a/backend/Dockerfile.fips-toolchain b/backend/Dockerfile.fips-toolchain
index 52397b1471..300b6eb202 100644
--- a/backend/Dockerfile.fips-toolchain
+++ b/backend/Dockerfile.fips-toolchain
@@ -48,9 +48,6 @@ RUN ARCH=$(dpkg --print-architecture) && \
FROM node:26.10.0-trixie-slim
-# Pinned to match the runtime image; see Dockerfile.standalone-infisical.
-RUN npm install -g [email protected]
-
ARG SOFTHSM2_VERSION=2.5.0
ARG SOFTHSM2_COMMIT=369df0383d101bc8952692c2a368ac8bc887d1b4
diff --git a/backend/package.json b/backend/package.json
index 2dfe18c1b8..2e51728ad3 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -308,5 +308,26 @@
"uuid": "^11.1.1",
"zod": "^3.22.4",
"zod-to-json-schema": "^3.24.5"
+ },
+ "allowScripts": {
+ "core-js": false,
+ "core-js-pure": false,
+ "protobufjs": false
}
}