Skip to content

Commit 7d82041

Browse files
fix(security): upgrade Remix packages 2.1.0 → 2.17.4 (#3372)
## Summary Upgrades all `@remix-run/*` packages in `apps/webapp` from **2.1.0 → 2.17.4** to address security vulnerabilities. Recreation of #2951 on a fresh checkout of `main`. **Updated packages (`apps/webapp/package.json`):** - `@remix-run/express`, `@remix-run/node`, `@remix-run/react`, `@remix-run/serve`, `@remix-run/server-runtime`: 2.1.0 → 2.17.4 - `@remix-run/router`: ^1.15.3 → ^1.23.2 - `@remix-run/dev`, `@remix-run/eslint-config`, `@remix-run/testing`: 2.1.0 → 2.17.4 **Root `package.json` overrides:** - `@remix-run/dev@2.17.4>tar-fs`: 2.1.3 → 2.1.4 - `testcontainers@10.28.0>tar-fs`: 3.0.9 → 3.1.1 **Documentation:** Updated Remix version references in `CLAUDE.md`, `apps/webapp/CLAUDE.md`, and `.cursor/rules/webapp.mdc`. **Server changes:** Added `.server-changes/upgrade-remix-security.md` for release tracking per `CONTRIBUTING.md`. No application code changes — only `package.json` files, documentation, a server-changes entry, and the regenerated `pnpm-lock.yaml`. ### Updates since last revision Addressed all 3 Devin Review findings: 1. **Missing `.server-changes/` file** — added `.server-changes/upgrade-remix-security.md` (commit ce22a0b) 2. **Sentry Remix patch (`@sentry/remix@9.46.0`)** — verified the patch at `patches/@sentry__remix@9.46.0.patch` applies cleanly against 2.17.4. The patch modifies Sentry's own `RemixInstrumentation` wrapper (removing `request.clone()` and form data attributes), not Remix internals. The underlying Remix APIs it hooks into (`callRouteAction`, `callRouteLoader`) are stable across 2.1→2.17. 3. **`remix-typedjson@0.3.1` compatibility** — peer deps declare `@remix-run/react: ^1.16.0 || ^2.0`, covering 2.17.4. Confirmed working at runtime across all 22 tested pages that use it (root.tsx, hooks, route loaders). ### Verification performed during this session - **Runtime:** Express+Remix integration, magic link login, client-side routing, MetaFunction rendering - **Operational:** hello-world task triggered via API, runs list, run detail, tasks page - **Comprehensive UI:** 22 pages, 11 filter types, environment/project switchers, interactive elements - **Docker:** Production Dockerfile (`docker/webapp/Dockerfile`) builds successfully - **Changelog audit:** All 16 minor versions reviewed — every breaking change is behind opt-in future flags the webapp doesn't enable ## Review & Testing Checklist for Human - [ ] **Verify auth flows in staging** — `remix-auth`, `remix-auth-email-link`, and `remix-auth-github` declare peer deps on `@remix-run/server-runtime@^1.x`, which is now 2.17.4. Login (magic link + OAuth) should be tested in a staging environment since local dev testing may not exercise all auth code paths. - [ ] **Verify tar-fs override versions** resolve the targeted security advisories (2.1.4 and 3.1.1) - [ ] **Review new transitive dependencies** added by the upgrade: `turbo-stream@2.4.1`, `undici@6.25.0`, `valibot@1.3.1`, `ws@7.5.10` Recommended test plan: deploy to staging and exercise core webapp flows — login (email magic link + GitHub OAuth), dashboard navigation, task triggering/viewing, and API endpoints — to catch runtime regressions not covered by local testing. ### Notes - Peer dependency warnings for `remix-auth-*` packages (expecting `@remix-run/server-runtime@^1.x`) were present in the original PR #2951 as well and appear to be pre-existing - The lockfile diff is large (~1200 lines) but mechanical — driven by the Remix version bump cascading through transitive dependencies - CI failures (`audit`, `units/internal/1-of-8`) are unrelated: `audit` is a `claude-code-action` bot permissions issue; the internal test failure is a ClickHouse testcontainers `Failed to connect to Reaper` flake Link to Devin session: https://app.devin.ai/sessions/d9fa9953b9bf40e5a8d12b8f5ba5b86b Requested by: @ericallam --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Eric Allam <eallam@icloud.com>
1 parent 73ea586 commit 7d82041

File tree

7 files changed

+441
-629
lines changed

7 files changed

+441
-629
lines changed

.cursor/rules/webapp.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ globs: apps/webapp/**/*.tsx,apps/webapp/**/*.ts
44
alwaysApply: false
55
---
66

7-
The main trigger.dev webapp, which powers it's API and dashboard and makes up the docker image that is produced as an OSS image, is a Remix 2.1.0 app that uses an express server, written in TypeScript. The following subsystems are either included in the webapp or are used by the webapp in another part of the monorepo:
7+
The main trigger.dev webapp, which powers it's API and dashboard and makes up the docker image that is produced as an OSS image, is a Remix 2.17.4 app that uses an express server, written in TypeScript. The following subsystems are either included in the webapp or are used by the webapp in another part of the monorepo:
88

99
- `@trigger.dev/database` exports a Prisma 6.14.0 client that is used extensively in the webapp to access a PostgreSQL instance. The schema file is [schema.prisma](mdc:internal-packages/database/prisma/schema.prisma)
1010
- `@trigger.dev/core` is a published package and is used to share code between the `@trigger.dev/sdk` and the webapp. It includes functionality but also a load of Zod schemas for data validation. When importing from `@trigger.dev/core` in the webapp, we never import the root `@trigger.dev/core` path, instead we favor one of the subpath exports that you can find in [package.json](mdc:packages/core/package.json)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Upgrade Remix packages from 2.1.0 to 2.17.4 to address security vulnerabilities in React Router

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ User API call -> Webapp routes -> Services -> RunEngine -> Redis Queue -> Superv
9292

9393
### Apps
9494

95-
- **apps/webapp**: Remix 2.1.0 app - main API, dashboard, orchestration. Uses Express server.
95+
- **apps/webapp**: Remix 2.17.4 app - main API, dashboard, orchestration. Uses Express server.
9696
- **apps/supervisor**: Manages task execution containers (Docker/Kubernetes).
9797

9898
### Public Packages

apps/webapp/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Webapp
22

3-
Remix 2.1.0 app serving as the main API, dashboard, and orchestration engine. Uses an Express server (`server.ts`).
3+
Remix 2.17.4 app serving as the main API, dashboard, and orchestration engine. Uses an Express server (`server.ts`).
44

55
## Verifying Changes
66

apps/webapp/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@
104104
"@react-aria/datepicker": "^3.9.1",
105105
"@react-stately/datepicker": "^3.9.1",
106106
"@react-types/datepicker": "^3.7.1",
107-
"@remix-run/express": "2.1.0",
108-
"@remix-run/node": "2.1.0",
109-
"@remix-run/react": "2.1.0",
110-
"@remix-run/router": "^1.15.3",
111-
"@remix-run/serve": "2.1.0",
112-
"@remix-run/server-runtime": "2.1.0",
107+
"@remix-run/express": "2.17.4",
108+
"@remix-run/node": "2.17.4",
109+
"@remix-run/react": "2.17.4",
110+
"@remix-run/router": "^1.23.2",
111+
"@remix-run/serve": "2.17.4",
112+
"@remix-run/server-runtime": "2.17.4",
113113
"@remix-run/v1-meta": "^0.1.3",
114114
"@s2-dev/streamstore": "^0.22.5",
115115
"@sentry/remix": "9.46.0",
@@ -237,9 +237,9 @@
237237
"@internal/clickhouse": "workspace:*",
238238
"@internal/replication": "workspace:*",
239239
"@internal/testcontainers": "workspace:*",
240-
"@remix-run/dev": "2.1.0",
241-
"@remix-run/eslint-config": "2.1.0",
242-
"@remix-run/testing": "^2.1.0",
240+
"@remix-run/dev": "2.17.4",
241+
"@remix-run/eslint-config": "2.17.4",
242+
"@remix-run/testing": "^2.17.4",
243243
"@sentry/cli": "2.50.2",
244244
"@swc/core": "^1.3.4",
245245
"@swc/helpers": "^0.4.11",

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
"typescript": "5.5.4",
9090
"@types/node": "20.14.14",
9191
"express@^4>body-parser": "1.20.3",
92-
"@remix-run/dev@2.1.0>tar-fs": "2.1.3",
93-
"testcontainers@10.28.0>tar-fs": "3.0.9",
92+
"@remix-run/dev@2.17.4>tar-fs": "2.1.4",
93+
"testcontainers@10.28.0>tar-fs": "3.1.1",
9494
"form-data@^2": "2.5.4",
9595
"form-data@^3": "3.0.4",
9696
"form-data@^4": "4.0.4",
@@ -120,4 +120,4 @@
120120
"turbo"
121121
]
122122
}
123-
}
123+
}

0 commit comments

Comments
 (0)