The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
Patch desktop dependency advisories with parser regression proof
David525b582e5ef1
diff --git a/e2e/document-import-proof.html b/e2e/document-import-proof.htmlnew file mode 100644index 00000000..9b84ea24--- /dev/null+++ b/e2e/document-import-proof.html@@ -0,0 +1,17 @@+<!doctype html>+<html lang="en">+<head><meta charset="utf-8"><title>Document extraction proof</title></head>+<body>+<label>Document <input id="document" type="file"></label>+<output id="result" aria-live="polite"></output>+<script type="module">+import { extractText } from '/src/api/rag.ts';+document.querySelector('#document').addEventListener('change', async (event) => {+ const file = event.target.files?.[0];+ if (!file) return;+ try { document.querySelector('#result').textContent = await extractText(file); }+ catch { document.querySelector('#result').textContent = 'Document extraction failed.'; }+});+</script>+</body>+</html>diff --git a/e2e/document-import-security.spec.ts b/e2e/document-import-security.spec.tsnew file mode 100644index 00000000..9257a88a--- /dev/null+++ b/e2e/document-import-security.spec.ts@@ -0,0 +1,15 @@+import { test, expect } from '@playwright/test'+import JSZip from 'jszip'++test('real browser DOCX extraction still works after the XML parser security update', async ({ page }) => {+ const zip = new JSZip()+ zip.file('[Content_Types].xml', '<?xml version="1.0"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/></Types>')+ zip.file('_rels/.rels', '<?xml version="1.0"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/></Relationships>')+ zip.file('word/document.xml', '<?xml version="1.0"?><w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:body><w:p><w:r><w:t>Local & private document proof.</w:t></w:r></w:p></w:body></w:document>')+ await page.goto('/e2e/document-import-proof.html')+ await page.getByLabel('Document', { exact: true }).setInputFiles({+ name: 'fixture.docx', mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',+ buffer: await zip.generateAsync({ type: 'nodebuffer' }),+ })+ await expect(page.locator('#result')).toHaveText('Local & private document proof.')+})diff --git a/e2e/trainer-error-readable.spec.ts b/e2e/trainer-error-readable.spec.tsindex 0e6b3dca..01fff933 100644--- a/e2e/trainer-error-readable.spec.ts+++ b/e2e/trainer-error-readable.spec.ts@@ -8,7 +8,9 @@ for (const ready of [false, true]) {assistantReply: DEFAULT_ASSISTANT_REPLY, modelName: DEFAULT_MODEL_NAME, platform: 'windows' as const,})await page.addInitScript(({ ready }) => {- const bridge = (window as any).__TAURI_INTERNALS__+ const bridge = (window as unknown as {+ __TAURI_INTERNALS__: { invoke: (cmd: string, args: unknown) => Promise<unknown> }+ }).__TAURI_INTERNALS__const invoke = bridge.invokebridge.invoke = async (cmd: string, args: unknown) => {if (cmd === 'character_trainer_status') return {diff --git a/package-lock.json b/package-lock.jsonindex 80862abf..fdd55dd9 100644--- a/package-lock.json+++ b/package-lock.json@@ -57,7 +57,7 @@"typescript": "~5.9.3","typescript-eslint": "^8.57.0","vite": "^8.0.1",- "vitest": "^4.1.2"+ "vitest": "^4.1.11"},"engines": {"node": ">=22"@@ -755,29 +755,43 @@}},"node_modules/@humanfs/core": {- "version": "0.19.1",- "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",- "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==",+ "version": "0.19.2",+ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",+ "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==","dev": true,"license": "Apache-2.0",+ "dependencies": {+ "@humanfs/types": "^0.15.0"+ },"engines": {"node": ">=18.18.0"}},"node_modules/@humanfs/node": {- "version": "0.16.7",- "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",- "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",+ "version": "0.16.8",+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz",+ "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==","dev": true,"license": "Apache-2.0","dependencies": {- "@humanfs/core": "^0.19.1",+ "@humanfs/core": "^0.19.2",+ "@humanfs/types": "^0.15.0","@humanwhocodes/retry": "^0.4.0"},"engines": {"node": ">=18.18.0"}},+ "node_modules/@humanfs/types": {+ "version": "0.15.0",+ "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz",+ "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=18.18.0"+ }+ },"node_modules/@humanwhocodes/module-importer": {"version": "1.0.1","resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",@@ -2699,16 +2713,16 @@}},"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {- "version": "5.0.6",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",- "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",+ "version": "5.0.9",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",+ "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==","dev": true,"license": "MIT","dependencies": {"balanced-match": "^4.0.2"},"engines": {- "node": "18 || 20 || >=22"+ "node": "20 || >=22"}},"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {@@ -2846,16 +2860,16 @@}},"node_modules/@vitest/expect": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.2.tgz",- "integrity": "sha512-gbu+7B0YgUJ2nkdsRJrFFW6X7NTP44WlhiclHniUhxADQJH5Szt9mZ9hWnJPJ8YwOK5zUOSSlSvyzRf0u1DSBQ==",+ "version": "4.1.11",+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz",+ "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==","dev": true,"license": "MIT","dependencies": {"@standard-schema/spec": "^1.1.0","@types/chai": "^5.2.2",- "@vitest/spy": "4.1.2",- "@vitest/utils": "4.1.2",+ "@vitest/spy": "4.1.11",+ "@vitest/utils": "4.1.11","chai": "^6.2.2","tinyrainbow": "^3.1.0"},@@ -2864,13 +2878,13 @@}},"node_modules/@vitest/mocker": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.2.tgz",- "integrity": "sha512-Ize4iQtEALHDttPRCmN+FKqOl2vxTiNUhzobQFFt/BM1lRUTG7zRCLOykG/6Vo4E4hnUdfVLo5/eqKPukcWW7Q==",+ "version": "4.1.11",+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz",+ "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==","dev": true,"license": "MIT","dependencies": {- "@vitest/spy": "4.1.2",+ "@vitest/spy": "4.1.11","estree-walker": "^3.0.3","magic-string": "^0.30.21"},@@ -2891,9 +2905,9 @@}},"node_modules/@vitest/pretty-format": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.2.tgz",- "integrity": "sha512-dwQga8aejqeuB+TvXCMzSQemvV9hNEtDDpgUKDzOmNQayl2OG241PSWeJwKRH3CiC+sESrmoFd49rfnq7T4RnA==",+ "version": "4.1.11",+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz",+ "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==","dev": true,"license": "MIT","dependencies": {@@ -2904,13 +2918,13 @@}},"node_modules/@vitest/runner": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.2.tgz",- "integrity": "sha512-Gr+FQan34CdiYAwpGJmQG8PgkyFVmARK8/xSijia3eTFgVfpcpztWLuP6FttGNfPLJhaZVP/euvujeNYar36OQ==",+ "version": "4.1.11",+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz",+ "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==","dev": true,"license": "MIT","dependencies": {- "@vitest/utils": "4.1.2",+ "@vitest/utils": "4.1.11","pathe": "^2.0.3"},"funding": {@@ -2918,14 +2932,14 @@}},"node_modules/@vitest/snapshot": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.2.tgz",- "integrity": "sha512-g7yfUmxYS4mNxk31qbOYsSt2F4m1E02LFqO53Xpzg3zKMhLAPZAjjfyl9e6z7HrW6LvUdTwAQR3HHfLjpko16A==",+ "version": "4.1.11",+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz",+ "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==","dev": true,"license": "MIT","dependencies": {- "@vitest/pretty-format": "4.1.2",- "@vitest/utils": "4.1.2",+ "@vitest/pretty-format": "4.1.11",+ "@vitest/utils": "4.1.11","magic-string": "^0.30.21","pathe": "^2.0.3"},@@ -2934,9 +2948,9 @@}},"node_modules/@vitest/spy": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.2.tgz",- "integrity": "sha512-DU4fBnbVCJGNBwVA6xSToNXrkZNSiw59H8tcuUspVMsBDBST4nfvsPsEHDHGtWRRnqBERBQu7TrTKskmjqTXKA==",+ "version": "4.1.11",+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz",+ "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==","dev": true,"license": "MIT","funding": {@@ -2944,13 +2958,13 @@}},"node_modules/@vitest/utils": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.2.tgz",- "integrity": "sha512-xw2/TiX82lQHA06cgbqRKFb5lCAy3axQ4H4SoUFhUsg+wztiet+co86IAMDtF6Vm1hc7J6j09oh/rgDn+JdKIQ==",+ "version": "4.1.11",+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz",+ "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==","dev": true,"license": "MIT","dependencies": {- "@vitest/pretty-format": "4.1.2",+ "@vitest/pretty-format": "4.1.11","convert-source-map": "^2.0.0","tinyrainbow": "^3.1.0"},@@ -3053,9 +3067,9 @@"license": "BSD-3-Clause"},"node_modules/@xmldom/xmldom": {- "version": "0.8.13",- "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.13.tgz",- "integrity": "sha512-KRYzxepc14G/CEpEGc3Yn+JKaAeT63smlDr+vjB8jRfgTBBI9wRj/nkQEO+ucV8p8I9bfKLWp37uHgFrbntPvw==",+ "version": "0.8.15",+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.15.tgz",+ "integrity": "sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA==","license": "MIT","engines": {"node": ">=10.0.0"@@ -3217,9 +3231,9 @@"license": "MIT"},"node_modules/baseline-browser-mapping": {- "version": "2.10.38",- "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.38.tgz",- "integrity": "sha512-31/02mVB4yuQU6adKk5SlY6m+mxDwUq5KZkyYgnLrrKl7TEm1+3PyDtDBz2kOv/wxZz41GHsvV1A/u6RmiyBvw==",+ "version": "2.11.21",+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz",+ "integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==","devOptional": true,"license": "Apache-2.0","bin": {@@ -3303,9 +3317,9 @@"license": "MIT"},"node_modules/brace-expansion": {- "version": "1.1.13",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",- "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",+ "version": "1.1.18",+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",+ "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==","dev": true,"license": "MIT","dependencies": {@@ -3314,9 +3328,9 @@}},"node_modules/browserslist": {- "version": "4.28.2",- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz",- "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==",+ "version": "4.28.9",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.9.tgz",+ "integrity": "sha512-EWazOblFYUvlGZcfGhPUPmYh3nikUxBVb+y9MJun5f3hBi812X+8MSQTujLBtgK3cf51fJWbWfOjyeO954d+Eg==","devOptional": true,"funding": [{@@ -3334,11 +3348,11 @@],"license": "MIT","dependencies": {- "baseline-browser-mapping": "^2.10.12",- "caniuse-lite": "^1.0.30001782",- "electron-to-chromium": "^1.5.328",- "node-releases": "^2.0.36",- "update-browserslist-db": "^1.2.3"+ "baseline-browser-mapping": "^2.11.20",+ "caniuse-lite": "^1.0.30001810",+ "electron-to-chromium": "^1.5.420",+ "node-releases": "^2.0.54",+ "update-browserslist-db": "^1.3.2"},"bin": {"browserslist": "cli.js"@@ -3395,9 +3409,9 @@}},"node_modules/caniuse-lite": {- "version": "1.0.30001799",- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001799.tgz",- "integrity": "sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw==",+ "version": "1.0.30001810",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",+ "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==","devOptional": true,"funding": [{@@ -4173,9 +4187,9 @@}},"node_modules/electron-to-chromium": {- "version": "1.5.376",- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.376.tgz",- "integrity": "sha512-cUVA7/RvbFTEuw/i3obUwDTRIXojaxkResf+ibByPFxjc6XK3VNtcQXV0NSbAlJ0FMjcJGgftVVB4Qo184EXvA==",+ "version": "1.5.425",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.425.tgz",+ "integrity": "sha512-QvPtl41EUOnuT1HBvMKgxXRIaHNcagBPs50u7VULzhZXaGfqTbZyE16LQsctZ/RQHlGu+FOWeDTR4mY6YbeF1g==","devOptional": true,"license": "ISC"},@@ -4561,9 +4575,9 @@}},"node_modules/fflate": {- "version": "0.8.2",- "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz",- "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",+ "version": "0.8.3",+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz",+ "integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==","license": "MIT"},"node_modules/file-entry-cache": {@@ -5395,9 +5409,9 @@"license": "MIT"},"node_modules/js-yaml": {- "version": "4.2.0",- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",- "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",+ "version": "4.3.2",+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz",+ "integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==","dev": true,"funding": [{@@ -7122,9 +7136,9 @@"license": "MIT"},"node_modules/node-releases": {- "version": "2.0.48",- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.48.tgz",- "integrity": "sha512-1uz8041X6LoI6ZSdZacM9lVY28vuzDlSKitnpbSNK0RfKoIJkX29NBPVEFXhnuSuEOA9Ww0xnPJ+ILWbGAv8DA==",+ "version": "2.0.55",+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.55.tgz",+ "integrity": "sha512-mIrE/Cw9y+9Au6dS5vDKDhQza9YvG6w+ZrS6X+ZzA7yFW/soAeaups4Qzn1bL6g5FVy8WtP79+0j82oPIbqRjQ==","devOptional": true,"license": "MIT","engines": {@@ -8466,9 +8480,9 @@}},"node_modules/three-stdlib/node_modules/fflate": {- "version": "0.6.10",- "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.6.10.tgz",- "integrity": "sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg==",+ "version": "0.6.11",+ "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.6.11.tgz",+ "integrity": "sha512-3JyEFWGjFn7zHmoa9+zG1BmW7X2okcmAB+0Cnu9UFbVs/jCBnl2A8o065ZlXiw145K3eBM3uLuzrYXC0RK7eDg==","license": "MIT"},"node_modules/tinybench": {@@ -8505,9 +8519,9 @@}},"node_modules/tinyrainbow": {- "version": "3.1.0",- "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz",- "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==",+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz",+ "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==","dev": true,"license": "MIT","engines": {@@ -8906,9 +8920,9 @@}},"node_modules/update-browserslist-db": {- "version": "1.2.3",- "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",- "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",+ "version": "1.3.2",+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",+ "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==","devOptional": true,"funding": [{@@ -9103,19 +9117,19 @@}},"node_modules/vitest": {- "version": "4.1.2",- "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.2.tgz",- "integrity": "sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg==",+ "version": "4.1.11",+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz",+ "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==","dev": true,"license": "MIT","dependencies": {- "@vitest/expect": "4.1.2",- "@vitest/mocker": "4.1.2",- "@vitest/pretty-format": "4.1.2",- "@vitest/runner": "4.1.2",- "@vitest/snapshot": "4.1.2",- "@vitest/spy": "4.1.2",- "@vitest/utils": "4.1.2",+ "@vitest/expect": "4.1.11",+ "@vitest/mocker": "4.1.11",+ "@vitest/pretty-format": "4.1.11",+ "@vitest/runner": "4.1.11",+ "@vitest/snapshot": "4.1.11",+ "@vitest/spy": "4.1.11",+ "@vitest/utils": "4.1.11","es-module-lexer": "^2.0.0","expect-type": "^1.3.0","magic-string": "^0.30.21",@@ -9143,10 +9157,12 @@"@edge-runtime/vm": "*","@opentelemetry/api": "^1.9.0","@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",- "@vitest/browser-playwright": "4.1.2",- "@vitest/browser-preview": "4.1.2",- "@vitest/browser-webdriverio": "4.1.2",- "@vitest/ui": "4.1.2",+ "@vitest/browser-playwright": "4.1.11",+ "@vitest/browser-preview": "4.1.11",+ "@vitest/browser-webdriverio": "4.1.11",+ "@vitest/coverage-istanbul": "4.1.11",+ "@vitest/coverage-v8": "4.1.11",+ "@vitest/ui": "4.1.11","happy-dom": "*","jsdom": "*","vite": "^6.0.0 || ^7.0.0 || ^8.0.0"@@ -9170,6 +9186,12 @@"@vitest/browser-webdriverio": {"optional": true},+ "@vitest/coverage-istanbul": {+ "optional": true+ },+ "@vitest/coverage-v8": {+ "optional": true+ },"@vitest/ui": {"optional": true},diff --git a/package.json b/package.jsonindex 2991cda1..9ae835db 100644--- a/package.json+++ b/package.json@@ -31,6 +31,7 @@"typecheck": "tsc -b --force","cycles": "madge --circular --extensions ts,tsx src","test": "vitest run",+ "test:security-deps": "node --test scripts/security-dependencies.test.mjs","preview": "vite preview","tauri": "tauri","tauri:dev": "tauri dev",@@ -86,6 +87,6 @@"typescript": "~5.9.3","typescript-eslint": "^8.57.0","vite": "^8.0.1",- "vitest": "^4.1.2"+ "vitest": "^4.1.11"}}diff --git a/scripts/security-dependencies.test.mjs b/scripts/security-dependencies.test.mjsnew file mode 100644index 00000000..cb40431a--- /dev/null+++ b/scripts/security-dependencies.test.mjs@@ -0,0 +1,60 @@+// Regression probes for the dependency security patch. No network or private files.+import { test } from 'node:test'+import assert from 'node:assert/strict'+import { createRequire } from 'node:module'+import { dirname } from 'node:path'+import { spawnSync } from 'node:child_process'++const require = createRequire(import.meta.url)+const copies = [+ ['root', require.resolve('fflate')],+ ['three-stdlib', require.resolve('fflate', { paths: [dirname(require.resolve('three-stdlib'))] })],+]++for (const [label, modulePath] of copies) {+ test(`${label} ZIP64 parser finishes a missing extra field without looping`, () => {+ // A tiny central directory requests ZIP64 sizes but omits its extra field.+ // Isolate the synchronous parser: a regression cannot hang the test runner.+ const result = spawnSync(process.execPath, ['--max-old-space-size=64', '-e', `+ const { unzipSync } = require(${JSON.stringify(modulePath)});+ const data = new Uint8Array(200);+ const view = new DataView(data.buffer);+ view.setUint32(0, 0x06064b50, true);+ view.setUint32(32, 1, true);+ view.setUint32(48, 64, true);+ view.setUint32(64, 0x02014b50, true);+ view.setUint32(84, 0xffffffff, true);+ view.setUint32(158, 0x07064b50, true);+ view.setUint32(178, 0x06054b50, true);+ view.setUint16(186, 0xffff, true);+ view.setUint32(194, 0xffffffff, true);+ try { unzipSync(data); process.stdout.write('completed'); }+ catch { process.stdout.write('rejected'); }+ `], { timeout: 2000, maxBuffer: 4096, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] })+ assert.equal(result.error, undefined, 'Malformed ZIP64 must finish within the isolated deadline')+ assert.equal(result.status, 0)+ // The maintained branches differ on recovery versus rejection. Both must+ // finish; strict archive validation is not this upstream patch's contract.+ assert.match(result.stdout, /^(completed|rejected)$/)+ })+ test(`${label} ZIP parser still round-trips valid files`, () => {+ const { zipSync, unzipSync, strToU8, strFromU8 } = require(modulePath)+ const archive = zipSync({ 'fixture.txt': strToU8('Local archive regression') })+ assert.equal(strFromU8(unzipSync(archive)['fixture.txt']), 'Local archive regression')+ })+}++test('XML parser reports malformed end tags and accepts well-formed text', () => {+ const { DOMParser } = require('@xmldom/xmldom')+ for (const suffix of ['\njunk', ' junk']) {+ const errors = []+ const parser = new DOMParser({ errorHandler: { warning() {}, error: (message) => errors.push(message), fatalError: (message) => errors.push(message) } })+ parser.parseFromString(`<fixture></fixture${suffix}>`, 'text/xml')+ assert.ok(errors.length > 0, 'Malformed end tag must not be silently accepted')+ }+ const errors = []+ const parser = new DOMParser({ errorHandler: (message) => errors.push(message) })+ const doc = parser.parseFromString('<fixture>Local & valid</fixture>', 'text/xml')+ assert.equal(doc.documentElement.textContent, 'Local & valid')+ assert.deepEqual(errors, [])+})