diff --git a/.gitattributes b/.gitattributes index 6faff18ce8..7a309ffa4e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,7 @@ # Shell gates must stay LF even when maintainers work from Windows with # core.autocrlf=true; CRLF makes WSL/Linux bash fail before validation starts. scripts/* text eol=lf +scripts/fixtures/** text eol=lf *.sh text eol=lf # Security smoke tests pin these vendored browser assets by SHA-256. Keep their diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f9b2390a2d..e30b3a0045 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -134,7 +134,7 @@ jobs: test "$(node --version)" = v24.22.3 test "$(npm --version)" = 12.0.2 npm ci --ignore-scripts --no-audit --no-fund - node scripts/apply-minimatch-security-backport.cjs + node scripts/prepare-ui-build-dependencies.cjs if [[ "$VALIDATION_SCOPE" = dependency-security || "$VALIDATION_SCOPE" = host-disk || "$VALIDATION_SCOPE" = lb-upgrade ]]; then bash scripts/check-ui-critical-high-dependencies node --test scripts/check-ui-handlebars-security.js scripts/test-ui-npm-audit.js scripts/test-ui-build-module-boundary.js @@ -178,7 +178,8 @@ jobs: "web-console-${package_version}-artifact-manifest.json" \ "web-console-${package_version}-webmcp.json" \ "web-console-${package_version}-sbom.sha256" \ - browser-webpack-modules.json browser-concat-stats.tar.gz \ + browser-webpack-modules.json browser-sass-dependencies.json browser-concat-stats.tar.gz \ + browser-build-npm-audit-raw.json browser-build-npm-audit-qualification.json \ builder-brotli-security.json \ builder-container-inventory-before.json builder-container-inventory-after.json; do test -s "$producer_output/$asset" @@ -223,10 +224,13 @@ jobs: ${{ runner.temp }}/web-console-${{ steps.build.outputs.package_version }}-webmcp.json ${{ runner.temp }}/web-console-${{ steps.build.outputs.package_version }}-sbom.sha256 ${{ runner.temp }}/builder-host-inventory.json + ${{ runner.temp }}/browser-build-npm-audit-raw.json + ${{ runner.temp }}/browser-build-npm-audit-qualification.json ${{ runner.temp }}/builder-brotli-security.json ${{ runner.temp }}/builder-container-inventory-before.json ${{ runner.temp }}/builder-container-inventory-after.json ${{ runner.temp }}/browser-webpack-modules.json + ${{ runner.temp }}/browser-sass-dependencies.json ${{ runner.temp }}/browser-concat-stats.tar.gz ${{ runner.temp }}/browser-advisory-report/ ${{ runner.temp }}/lb-upgrade-tests.tap diff --git a/README.md b/README.md index 8612889c86..6526f8ad22 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ history, authorship, licenses, and dependency notices. ## Current component -[Web Console **1.6.249**](https://github.com/PastureStack/web-console/releases/tag/1.6.249) +[Web Console **1.6.250**](https://github.com/PastureStack/web-console/releases/tag/1.6.250) uses exact managed image versions and the packaged upgrade recommendation. A stale creation default cannot offer a downgrade or conceal a newer packaged release. Image-only submissions re-read the current service before persistence @@ -23,8 +23,11 @@ The optional [Bridge **0.2.37**](https://github.com/PastureStack/web-console/rel keeps its existing wire contract. Deploy through the [Server guide](https://github.com/PastureStack/server#quick-start). -See the [release note](docs/releases/web-console-1.6.249.md) for the affected -native lifecycle and the focused test scope. +This release updates the affected build dependencies and records actual Sass, +Webpack and embedded noVNC source ownership in the artifact SBOM. Source +inventory and advisory-index completeness remain separate claims. +See the [release note](docs/releases/web-console-1.6.250.md) and +[browser coverage boundaries](docs/security/browser-advisories.md). ## Features and operator guides @@ -122,7 +125,7 @@ Use the supported toolchain in [COMPATIBILITY.md](COMPATIBILITY.md): ```sh npm ci --ignore-scripts -node scripts/apply-minimatch-security-backport.cjs +node scripts/prepare-ui-build-dependencies.cjs npm run build -- --environment=production npm test ``` diff --git a/docs/baselines/npm-package-lock.sass-replacement.node24-ignore-scripts.json b/docs/baselines/npm-package-lock.sass-replacement.node24-ignore-scripts.json index 14981d3057..a29172a973 100644 --- a/docs/baselines/npm-package-lock.sass-replacement.node24-ignore-scripts.json +++ b/docs/baselines/npm-package-lock.sass-replacement.node24-ignore-scripts.json @@ -1,12 +1,12 @@ { "name": "@pasturestack/web-console", - "version": "1.6.249", + "version": "1.6.250", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@pasturestack/web-console", - "version": "1.6.249", + "version": "1.6.250", "license": "Apache-2.0", "dependencies": { "sass": "1.103.1" @@ -56,7 +56,7 @@ "ember-truth-helpers": "5.0.0", "exists-sync": "file:vendor/exists-sync-compat/exists-sync-1.0.0-rc16.0.tgz", "express": "5.2.1", - "glob": "file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz", + "glob": "14.0.6", "http-proxy": "1.18.1", "identicon.js": "2.3.3", "inflight": "file:vendor/inflight-compat/inflight-1.1.0-rc16.0.tgz", @@ -3796,77 +3796,12 @@ } } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } + "license": "BlueOak-1.0.0" }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", @@ -4235,17 +4170,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@pnpm/constants": { "version": "1001.3.1", "resolved": "https://registry.npmjs.org/@pnpm/constants/-/constants-1001.3.1.tgz", @@ -5380,109 +5304,6 @@ "resolve": "^1.22.8" } }, - "node_modules/babel-plugin-module-resolver/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/glob": { - "version": "9.3.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", - "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/path-scurry/node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.17", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", @@ -9446,13 +9267,6 @@ "node": ">= 0.4" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/editions": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", @@ -11998,13 +11812,6 @@ "@embroider/addon-shim": "^1.8.9" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, "node_modules/emojis-list": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", @@ -13149,23 +12956,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -13538,26 +13328,15 @@ } }, "node_modules/glob": { - "version": "13.0.6", - "resolved": "file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz", - "integrity": "sha512-LPCb+0dVinDNlDIYxngHSXy3GGZNRaBvwh1LiSSPc6BAplz2TsnfcorhtuM9UrG+XN8cGPiNSrGybF54pn6MiA==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob-real": "npm:glob@13.0.6" - } - }, - "node_modules/glob-real": { - "name": "glob", - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "version": "14.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-14.0.6.tgz", + "integrity": "sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "minimatch": "^10.2.2", + "minimatch": "^11.0.5", "minipass": "^7.1.3", - "path-scurry": "^2.0.2" + "path-scurry": "^3.0.0" }, "engines": { "node": "18 || 20 || >=22" @@ -13566,7 +13345,7 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-real/node_modules/balanced-match": { + "node_modules/glob/node_modules/balanced-match": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", @@ -13576,7 +13355,7 @@ "node": "18 || 20 || >=22" } }, - "node_modules/glob-real/node_modules/brace-expansion": { + "node_modules/glob/node_modules/brace-expansion": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", @@ -13589,17 +13368,18 @@ "node": "20 || >=22" } }, - "node_modules/glob-real/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "node_modules/glob/node_modules/minimatch": { + "version": "11.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.10.tgz", + "integrity": "sha512-L3/cjhQ5E6lft0VCp/2mO3Ic74RnutKy3rz7iGwp/6w1hKcO262g2rbfacFyw6eBig5OdI0nu5PpuA0/WQs9Tw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.8" + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -14820,22 +14600,6 @@ "node": ">=0.12" } }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/jake": { "version": "10.9.4", "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", @@ -16414,9 +16178,9 @@ } }, "node_modules/path-scurry": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", - "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.3.tgz", + "integrity": "sha512-Ie3c3F+7WJOUCr0r8V8uEunY5Sj4PGFDoBZvFw7JmHJs/+H5GZK+GsIM8tHMcZy7c27Zj+U1NOcVzqlC7tBJpg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -16431,9 +16195,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.5.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", - "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", + "version": "11.5.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.4.tgz", + "integrity": "sha512-B8nJCTi8JuSaDBg0tBdnImV6j5O2CXaqKfdj24ZTCFbyivN8KZ2Z+RL3aHjwJAfLutD9cNnObG4SIgW4gMufiw==", "dev": true, "license": "BlueOak-1.0.0", "engines": { @@ -16951,91 +16715,6 @@ "underscore.string": "~3.3.6" } }, - "node_modules/quick-temp/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/quick-temp/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/quick-temp/node_modules/glob": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", - "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/quick-temp/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/quick-temp/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/quick-temp/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/quick-temp/node_modules/rimraf": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", @@ -18456,55 +18135,6 @@ "node": ">=4" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/string-width/node_modules/strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -18619,30 +18249,6 @@ "node": ">=6" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi/node_modules/ansi-regex": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", @@ -18905,9 +18511,9 @@ } }, "node_modules/terser": { - "version": "5.49.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.49.0.tgz", - "integrity": "sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA==", + "version": "5.51.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.51.3.tgz", + "integrity": "sha512-j5jPZZ6Sz0Eg2unusKhdRzUhUlHXJ3Bw2AkIXyJ6AqajWwihUlZOdJS+KSnZzmtVk6mFGdm3hHg0+M2sgyEz5Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -20160,194 +19766,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/docs/releases/web-console-1.6.250.md b/docs/releases/web-console-1.6.250.md new file mode 100644 index 0000000000..0db8f8dcbc --- /dev/null +++ b/docs/releases/web-console-1.6.250.md @@ -0,0 +1,26 @@ +# Web Console 1.6.250 + +The build dependency update uses official Glob 14.0.6 and Terser 5.51.3 fixes. +Minimatch 10.2.6 retains its consumer API with reproducible source backports of +the official fixes for CVE-2026-118764 and CVE-2026-140006. Six installed copies +are verified by exact source bytes; npm's raw version findings remain intact. +No installed package is patched at runtime. Ember is not downgraded to satisfy +npm's automatic remediation suggestions. + +The source producer records the actual Sass compiler dependency trace and four +final theme/RTL CSS outputs, identifies Webpack-generated source owners, resolves +the overridden pagination template from its actual compiled block, and models +all eleven retained noVNC source modules with their distinct license notices. +The original archive, compiler evidence and runtime/build BOMs remain bound by +SHA-256. An unknown source or ambiguous owner must not become a complete result. + +Focused checks cover native dependency consumers, official security cases, +inventory tampering, schema validation and two deterministic production builds. +Full advisory-index coverage is still distinct: Lato has no supported automated +advisory ecosystem and an exact PositionCalculator Git query cannot attest that +the upstream repository is exhaustively indexed. These are coverage boundaries, +not unpatched CVEs. AWS/KVM and unrelated lifecycle evidence are not requalified. + +Deploy through a compatible Server release and retain its preceding image and +data volumes for rollback. Login, authorization and service-upgrade contracts +are unchanged. Do not alter a production Server while validating this component. diff --git a/docs/security/browser-advisories.md b/docs/security/browser-advisories.md index 54ca35b2e1..78401c4fd3 100644 --- a/docs/security/browser-advisories.md +++ b/docs/security/browser-advisories.md @@ -59,7 +59,7 @@ and one exact Git commit. All raw findings remain in the report. | Bootswatch Cosmo | Modified 3.3.1 Sass; integrity-verified upstream npm archive | Local Sass adaptations are not the entire upstream package | | Lucide outlines | lucide-static 1.25.0 source manifest; upstream npm lookup | Generated font also includes first-party artwork | | PositionCalculator | 1.1.2, exact upstream dist file, Git commit query | OSV does not attest exhaustive repository indexing | -| noVNC | Modified 0.5.1 core; related upstream advisory lookup | Embedded-module BOM/license composition remains incomplete; KVM acceptance remains separate | +| noVNC | Modified 0.5.1 core; related upstream advisory lookup | New producers model all eleven retained source modules and licenses; KVM acceptance remains separate | | Lato | All six fonts identify 1.104 and SIL OFL | Automated vulnerability-index coverage is unknown | The generator now records the established noVNC, Cosmo and Lato identities for @@ -78,14 +78,21 @@ scoped applicability conclusions, not patched package versions or a blanket exception for future JavaScript changes. Preserve the raw matches and check the exact delivered module/source evidence before reusing a disposition. -## Open inventory work - -Full coverage remains **incomplete**. Besides the vendor boundaries above, -the original producer still uses fixed reviewed Sass inputs rather than a -compiler import trace, retains a generated/first-party Webpack sentinel, and -conservatively attributes shared addon app-tree modules to multiple owners. -These require producer instrumentation and new artifact evidence. They are not -closed by a fresh advisory query or by changing a composition flag to complete. +## Instrumented producers + +From 1.6.250 the producer traces actual Dart Sass loaded sources and binds both +themes and RTL final CSS files, identifies actual Webpack entry/runtime owners, +and compares the real compiled template block to select a unique addon owner. +The noVNC source-module BOM includes module hashes, upstream commit and retained +MPL, Zlib and DES notices. The compiler sidecar is retained as +`browser-sass-dependencies.json`; unknown sources still fail or retain an explicit +inventory limitation. Historical BOMs and their incomplete status are immutable. + +`pasturestack:coverage` describes source inventory only. Advisory-index gaps stay +in `coverage.json.remainingGaps`; `fullCoverage` remains false when any exist, +even if the actual archive's source inventory is complete. Lato and exhaustive +PositionCalculator repository indexing remain external lookup boundaries. +No zero-match query is a blanket safety claim. No runtime JavaScript, styles, login/session behavior, API authorization or service image is changed by these lookup tools and provenance corrections. diff --git a/docs/security/browser-vendor-advisory-map.json b/docs/security/browser-vendor-advisory-map.json index 93706b2b39..91fac0a13a 100644 --- a/docs/security/browser-vendor-advisory-map.json +++ b/docs/security/browser-vendor-advisory-map.json @@ -76,7 +76,7 @@ "ref": "vendor:novnc", "sourceSetSha256": "41240ff304707acd1283f3867fedb2b3710b9632a06c6c0288e5d137dc5763ab", "upstreamVersion": "0.5.1", - "scope": "Historical browser core derived from official v0.5.1: nine embedded files match after boundary trimming, util.js log redaction and webutil.js newline handling are the only two module diffs. Related npm advisory lookup does not assert an npm archive was installed.", + "scope": "Historical browser core derived from official v0.5.1: nine embedded files match after boundary trimming, util.js log redaction and webutil.js newline handling are the only two module diffs. Related npm advisory lookup does not assert an npm archive was installed. New producers model the eleven retained source modules and distinct licenses; immutable historical BOM inventory limits remain unchanged. KVM runtime acceptance is separate and deferred.", "upstreamEvidence": [ "https://github.com/novnc/noVNC/tree/fc00821eba469641c6c94706726c3d78e46460a2", "https://github.com/novnc/noVNC/commit/6048299a138e078aed210f163111698c8c526a13" @@ -88,8 +88,7 @@ }, "version": "0.5.1" }, - "kind": "related-upstream-npm", - "remainingGap": "The old combined core still lacks separate embedded-module BOM identities/license composition. KVM runtime acceptance is deferred; package lookup does not close that gap." + "kind": "related-upstream-npm" }, { "ref": "vendor:lato", diff --git a/docs/security/ui-vendor-components.json b/docs/security/ui-vendor-components.json index ecf6f51af6..ea8e2b9c12 100644 --- a/docs/security/ui-vendor-components.json +++ b/docs/security/ui-vendor-components.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "description": "Reviewed browser source ownership; hashes use LF-normalized text and raw binary. Snapshot identifiers are not asserted upstream releases.", "guards": { - "ember-cli-build.js": "e101dad98a75c9f7a146244837ab039294dbbe49857042eda4425c9203312ff7", + "ember-cli-build.js": "371bd6472debe337b24c75586128db007b845b7bd95ec2f1ad2a2aec4c94bbcf", "app/styles/app-light.scss": "5135dcf2d7257ba4ae59676243fbd46dc50f0e71e048f9ad83f9f3879d1eeb67", "app/styles/app-dark.scss": "2a7df97325751ab28c9ba439b46a67407b24107e9f588eb7d6d478f319bd42d0" }, @@ -115,7 +115,7 @@ "vendor/novnc.js": "536fcf482b2c30d9368d4cb5aaf0b049200fc7a5c51817d34d53e47dbe0b8ca4" }, "provenance": "The 11 embedded core files are derived from noVNC v0.5.1 (fc00821eba469641c6c94706726c3d78e46460a2). Nine match after boundary trimming; util.js log redaction and webutil.js newline handling are the two reviewed differences. See docs/security/browser-vendor-provenance.json.", - "coverage": "The upstream core release is identified, but separate embedded-module identities and license composition remain incomplete; related-upstream advisory lookup is not an installed npm-package identity.", + "advisoryCoverage": "Related-upstream advisory lookup does not assert an unmodified installed npm package. Eleven embedded source modules have independent hashes, upstream evidence and retained license declarations.", "version": "0.5.1-pasturestack-snapshot", "modified": true }, @@ -141,7 +141,7 @@ "vendor/lato/lato-v11-latin-regular.woff2": "47a3e3b64cffe3ff820ebe554ac4df940da5ed469eaddbbc13bdd3b0b1eb4479" }, "provenance": "All six shipped WOFF/WOFF2 name tables identify Version 1.104; Western+Polish opensource and the SIL OFL license URL. Official Lato FONTLOG/OFL confirm the font family license. The inherited directory Apache notice does not apply to the font bytes. See docs/security/browser-vendor-provenance.json.", - "coverage": "Version and font license are established, but no supported automated vulnerability-index identity is established for the font bytes.", + "advisoryCoverage": "Version and font license are established, but no supported automated vulnerability-index identity is established for the font bytes.", "version": "1.104", "license": "OFL-1.1" }, diff --git a/ember-cli-build.js b/ember-cli-build.js index 88d996832f..1f75030287 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -1,7 +1,7 @@ /* global require, module */ // Verify the explicit source-build preparation before loading build plugins, // including direct Ember CLI invocations outside npm's prebuild hook. -require('./scripts/apply-minimatch-security-backport.cjs').applyProject(__dirname, true); +require('./scripts/prepare-ui-build-dependencies.cjs').prepareProject(__dirname, true); var EmberApp = require('ember-cli/lib/broccoli/ember-app'); var BroccoliFunnel = require('broccoli-funnel'); var BroccoliMergeTrees = require('broccoli-merge-trees'); @@ -10,6 +10,9 @@ var mergeTrees = BroccoliMergeTrees.default || BroccoliMergeTrees; var util = require('util'); var env = EmberApp.env(); var dartSass = require('sass'); +if (process.env.PASTURESTACK_MODULE_INVENTORY === '1') { + dartSass = require('./lib/security-sass-inventory').trackedSass(dartSass, __dirname); +} var TranslationJsonTree = require('./lib/translation-json-tree'); var RtlCssTree = require('./lib/rtl-css-tree'); var NormalizeTemplateModuleNameWebpackPlugin = require('./lib/normalize-template-module-name-webpack-plugin'); diff --git a/lib/glob-callback-default-entry.cjs.template b/lib/glob-callback-default-entry.cjs.template new file mode 100644 index 0000000000..87e11af63a --- /dev/null +++ b/lib/glob-callback-default-entry.cjs.template @@ -0,0 +1,19 @@ +"use strict"; +// Prepared inside the official Glob package; use its observable raw modules. +const modernGlob = require("./dist/commonjs/index.js"); +const source = modernGlob && modernGlob.default && typeof modernGlob.default.hasMagic === "function" + ? modernGlob.default : modernGlob; +function api(pattern, options, callback) { + if (typeof options === "function") { callback = options; options = undefined; } + const promise = source.glob(pattern, options); + if (typeof callback === "function") { + return promise.then(matches => { callback(null, matches); return matches; }, + error => { callback(error); throw error; }); + } + return promise; +} +for (const key of Reflect.ownKeys(source)) { + if (key !== "__esModule") Object.defineProperty(api, key, Object.getOwnPropertyDescriptor(source, key)); +} +Object.defineProperty(api, "default", {enumerable:false, configurable:true, value:api}); +module.exports = api; diff --git a/lib/security-module-inventory-webpack-plugin.js b/lib/security-module-inventory-webpack-plugin.js index 9b36297e75..f7b9dab935 100644 --- a/lib/security-module-inventory-webpack-plugin.js +++ b/lib/security-module-inventory-webpack-plugin.js @@ -5,34 +5,49 @@ const fs = require('node:fs'); const path = require('node:path'); const assert = require('node:assert/strict'); -function visit(module, modules) { +function visit(module, modules, entries, generated) { if (module.resource) { const file = module.resource.split('?')[0].replace(/\\/g, '/'); const index = file.indexOf('/node_modules/'); - modules.add(index >= 0 ? file.slice(index + 1) : ''); + if(index>=0)modules.add(file.slice(index+1)); + else { + assert.ok(entries.has(path.resolve(file)), 'Unknown non-package Webpack source: '+path.basename(file)); + const name=path.basename(file); + assert.match(name,/^[a-zA-Z0-9_.-]+\.cjs$/,'Named Auto Import entrypoint required'); + const ref='generated:entry/'+name; + const row={owner:'ember-auto-import',name,sha256:crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'),hashKind:'entry-source'}; + assert.ok(!generated[ref]||JSON.stringify(generated[ref])===JSON.stringify(row),'Conflicting generated module'); + generated[ref]=row;modules.add(ref); + } } - for (const child of module.modules || []) visit(child, modules); + for (const child of module.modules || []) visit(child, modules, entries, generated); } -function collectInventory(compilation) { +function collectInventory(compilation, entryFiles=[]) { + const entries=new Set(entryFiles.map(file=>path.resolve(file))),generatedSources={}; const modules = new Set(), byAsset = new Map(), assetSHA256 = {}; - for (const module of compilation.modules) visit(module, modules); + for (const module of compilation.modules) visit(module, modules, entries, generatedSources); for (const chunk of compilation.chunks) { const selected = new Set(); - for (const module of compilation.chunkGraph.getChunkModulesIterable(chunk)) visit(module, selected); + for (const module of compilation.chunkGraph.getChunkModulesIterable(chunk)) visit(module, selected, entries, generatedSources); for (const file of chunk.files) { assert.ok(!file.startsWith('/') && !file.split('/').includes('..'), 'unsafe emitted asset name'); const asset = compilation.getAsset(file); assert.ok(asset && asset.source, 'emitted chunk asset source is missing'); const content = asset.source.source(); assetSHA256[file] = crypto.createHash('sha256').update(content).digest('hex'); + const runtimeRef='generated:webpack-runtime/'+file; + generatedSources[runtimeRef]={owner:'webpack',name:file,sha256:assetSHA256[file],hashKind:'compilation-asset'}; + modules.add(runtimeRef); if (!byAsset.has(file)) byAsset.set(file, new Set()); for (const resource of selected) byAsset.get(file).add(resource); + byAsset.get(file).add(runtimeRef); } } assert.ok(byAsset.size > 0, 'emitted chunk inventory is empty'); return { modules: [...modules].sort(), + generatedSources:Object.fromEntries(Object.entries(generatedSources).sort(([a],[b])=>a.localeCompare(b,'en'))), assetModules: Object.fromEntries([...byAsset].sort(([a], [b]) => a.localeCompare(b, 'en')).map(([file, values]) => [file, [...values].sort()])), assetSHA256: Object.fromEntries(Object.entries(assetSHA256).sort(([a], [b]) => a.localeCompare(b, 'en'))) }; @@ -48,7 +63,10 @@ class SecurityModuleInventoryWebpackPlugin { compilation.hooks.processAssets.tap({ name: 'SecurityModuleInventory', stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT - }, () => captured.set(compilation, collectInventory(compilation))); + }, () => { + const entries=Object.values(compiler.options.entry).flatMap(entry=>entry.import||[]); + captured.set(compilation, collectInventory(compilation,entries)); + }); }); compiler.hooks.done.tap('SecurityModuleInventory', stats => { if (stats.hasErrors()) return; diff --git a/lib/security-sass-inventory.js b/lib/security-sass-inventory.js new file mode 100644 index 0000000000..96a6ad219e --- /dev/null +++ b/lib/security-sass-inventory.js @@ -0,0 +1,68 @@ +'use strict'; +const fs=require('node:fs'); +const path=require('node:path'); +const crypto=require('node:crypto'); +const {fileURLToPath}=require('node:url'); +const assert=require('node:assert/strict'); +const hash=bytes=>crypto.createHash('sha256').update(bytes).digest('hex'); +const textHash=file=>hash(fs.readFileSync(file,'utf8').replace(/\r\n/g,'\n')); + +function trackedSass(implementation,root) { + root=path.resolve(root); const records=new Map(); let candidates; + function sourceFile(file) { + const actual=fs.realpathSync(file),relative=path.relative(root,actual).replace(/\\/g,'/'); + if(/^(app|vendor|node_modules)\//.test(relative) && !relative.split('/').includes('..')) return relative; + if(!candidates) { + candidates=new Map(); + function walk(directory) { + if(!fs.existsSync(directory))return; + for(const item of fs.readdirSync(directory,{withFileTypes:true})) { + if(item.name==='.git'||item.name==='.cache')continue; + const full=path.join(directory,item.name); + if(item.isSymbolicLink())continue; + if(item.isDirectory())walk(full); + else if(item.isFile() && /\.(scss|sass|css)$/.test(item.name)) { + if(!candidates.has(item.name))candidates.set(item.name,[]); + candidates.get(item.name).push(full); + } + } + } + for(const name of ['app/styles','vendor','node_modules'])walk(path.join(root,name)); + } + const expected=textHash(actual); + const matches=(candidates.get(path.basename(actual))||[]).filter(file=>textHash(file)===expected); + assert.equal(matches.length,1,'Sass compiler input must have one exact source owner: '+path.basename(actual)); + return path.relative(root,matches[0]).replace(/\\/g,'/'); + } + function record(result,entry) { + const inputs=result.loadedUrls ? result.loadedUrls.map(url=>fileURLToPath(url)) : result.stats?.includedFiles; + assert.ok(Array.isArray(inputs)&&inputs.length,'Actual Sass compiler dependency trace is required'); + const files=new Map(); + for(const file of inputs) { + const source=sourceFile(file),sha256=textHash(file); + assert.ok(!files.has(source)||files.get(source)===sha256,'Conflicting Sass source identity'); + files.set(source,sha256); + } + const name=path.basename(entry); + assert.match(name,/^[a-zA-Z0-9_.-]+\.(scss|sass)$/,'Named Sass entrypoint required'); + const row={entry:name,cssSha256:hash(result.css),sources:[...files].sort(([a],[b])=>a.localeCompare(b,'en')).map(([path,sha256])=>({path,sha256}))}; + assert.ok(!records.has(name)||JSON.stringify(records.get(name))===JSON.stringify(row),'Conflicting Sass compilation output'); + records.set(name,row); + const directory=path.join(root,'build/security-browser');fs.mkdirSync(directory,{recursive:true}); + fs.writeFileSync(path.join(directory,'sass-dependencies.json'),JSON.stringify({schemaVersion:1, + lockSha256:hash(fs.readFileSync(path.join(root,'package-lock.json'))), + compiler:implementation.info,compilations:[...records.values()].sort((a,b)=>a.entry.localeCompare(b.entry,'en'))},null,2)+'\n'); + } + return new Proxy(implementation,{get(target,key) { + if(key==='compileAsync')return async(file,options)=>{const result=await target.compileAsync(file,options);record(result,file);return result;}; + if(key==='compile')return(file,options)=>{const result=target.compile(file,options);record(result,file);return result;}; + if(key==='render')return(options,callback)=>target.render(options,(error,result)=>{ + if(error)return callback(error); + try{record(result,options.file);}catch(error){return callback(error);} + return callback(null,result); + }); + if(key==='renderSync')return options=>{const result=target.renderSync(options);record(result,options.file);return result;}; + return Reflect.get(target,key); + }}); +} +module.exports={trackedSass}; diff --git a/package-lock.json b/package-lock.json index 14981d3057..a29172a973 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@pasturestack/web-console", - "version": "1.6.249", + "version": "1.6.250", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@pasturestack/web-console", - "version": "1.6.249", + "version": "1.6.250", "license": "Apache-2.0", "dependencies": { "sass": "1.103.1" @@ -56,7 +56,7 @@ "ember-truth-helpers": "5.0.0", "exists-sync": "file:vendor/exists-sync-compat/exists-sync-1.0.0-rc16.0.tgz", "express": "5.2.1", - "glob": "file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz", + "glob": "14.0.6", "http-proxy": "1.18.1", "identicon.js": "2.3.3", "inflight": "file:vendor/inflight-compat/inflight-1.1.0-rc16.0.tgz", @@ -3796,77 +3796,12 @@ } } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } + "license": "BlueOak-1.0.0" }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", @@ -4235,17 +4170,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@pnpm/constants": { "version": "1001.3.1", "resolved": "https://registry.npmjs.org/@pnpm/constants/-/constants-1001.3.1.tgz", @@ -5380,109 +5304,6 @@ "resolve": "^1.22.8" } }, - "node_modules/babel-plugin-module-resolver/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/glob": { - "version": "9.3.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", - "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/babel-plugin-module-resolver/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/babel-plugin-module-resolver/node_modules/path-scurry/node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.17", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", @@ -9446,13 +9267,6 @@ "node": ">= 0.4" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/editions": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", @@ -11998,13 +11812,6 @@ "@embroider/addon-shim": "^1.8.9" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, "node_modules/emojis-list": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", @@ -13149,23 +12956,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -13538,26 +13328,15 @@ } }, "node_modules/glob": { - "version": "13.0.6", - "resolved": "file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz", - "integrity": "sha512-LPCb+0dVinDNlDIYxngHSXy3GGZNRaBvwh1LiSSPc6BAplz2TsnfcorhtuM9UrG+XN8cGPiNSrGybF54pn6MiA==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob-real": "npm:glob@13.0.6" - } - }, - "node_modules/glob-real": { - "name": "glob", - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "version": "14.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-14.0.6.tgz", + "integrity": "sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "minimatch": "^10.2.2", + "minimatch": "^11.0.5", "minipass": "^7.1.3", - "path-scurry": "^2.0.2" + "path-scurry": "^3.0.0" }, "engines": { "node": "18 || 20 || >=22" @@ -13566,7 +13345,7 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/glob-real/node_modules/balanced-match": { + "node_modules/glob/node_modules/balanced-match": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", @@ -13576,7 +13355,7 @@ "node": "18 || 20 || >=22" } }, - "node_modules/glob-real/node_modules/brace-expansion": { + "node_modules/glob/node_modules/brace-expansion": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", @@ -13589,17 +13368,18 @@ "node": "20 || >=22" } }, - "node_modules/glob-real/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "node_modules/glob/node_modules/minimatch": { + "version": "11.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.10.tgz", + "integrity": "sha512-L3/cjhQ5E6lft0VCp/2mO3Ic74RnutKy3rz7iGwp/6w1hKcO262g2rbfacFyw6eBig5OdI0nu5PpuA0/WQs9Tw==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.8" + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -14820,22 +14600,6 @@ "node": ">=0.12" } }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/jake": { "version": "10.9.4", "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", @@ -16414,9 +16178,9 @@ } }, "node_modules/path-scurry": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", - "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.3.tgz", + "integrity": "sha512-Ie3c3F+7WJOUCr0r8V8uEunY5Sj4PGFDoBZvFw7JmHJs/+H5GZK+GsIM8tHMcZy7c27Zj+U1NOcVzqlC7tBJpg==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -16431,9 +16195,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.5.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", - "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==", + "version": "11.5.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.4.tgz", + "integrity": "sha512-B8nJCTi8JuSaDBg0tBdnImV6j5O2CXaqKfdj24ZTCFbyivN8KZ2Z+RL3aHjwJAfLutD9cNnObG4SIgW4gMufiw==", "dev": true, "license": "BlueOak-1.0.0", "engines": { @@ -16951,91 +16715,6 @@ "underscore.string": "~3.3.6" } }, - "node_modules/quick-temp/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/quick-temp/node_modules/brace-expansion": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", - "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/quick-temp/node_modules/glob": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", - "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", - "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/quick-temp/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/quick-temp/node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.8" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/quick-temp/node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/quick-temp/node_modules/rimraf": { "version": "5.0.10", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", @@ -18456,55 +18135,6 @@ "node": ">=4" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/string-width/node_modules/strip-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", @@ -18619,30 +18249,6 @@ "node": ">=6" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi/node_modules/ansi-regex": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", @@ -18905,9 +18511,9 @@ } }, "node_modules/terser": { - "version": "5.49.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.49.0.tgz", - "integrity": "sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA==", + "version": "5.51.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.51.3.tgz", + "integrity": "sha512-j5jPZZ6Sz0Eg2unusKhdRzUhUlHXJ3Bw2AkIXyJ6AqajWwihUlZOdJS+KSnZzmtVk6mFGdm3hHg0+M2sgyEz5Q==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -20160,194 +19766,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", - "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.2.2" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index 011c3516ee..8a4198d2c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pasturestack/web-console", - "version": "1.6.249", + "version": "1.6.250", "private": true, "description": "PastureStack browser console for the compatible control platform.", "repository": { @@ -14,15 +14,15 @@ "test": "tests" }, "scripts": { - "prebuild": "node scripts/apply-minimatch-security-backport.cjs --check", + "prebuild": "node scripts/prepare-ui-build-dependencies.cjs --check", "build": "ember build", "build-static": "./scripts/build-static", - "preember": "node scripts/apply-minimatch-security-backport.cjs --check", + "preember": "node scripts/prepare-ui-build-dependencies.cjs --check", "ember": "ember", "legacy-dependencies": "./scripts/update-dependencies", - "prestart": "node scripts/apply-minimatch-security-backport.cjs --check", + "prestart": "node scripts/prepare-ui-build-dependencies.cjs --check", "start": "ember server", - "pretest": "node scripts/apply-minimatch-security-backport.cjs --check", + "pretest": "node scripts/prepare-ui-build-dependencies.cjs --check", "test": "ember test --ssl=false --host 127.0.0.1 --config-file testem.js" }, "overrides": { @@ -44,6 +44,7 @@ "engine.io": "6.6.13", "fast-uri": "3.1.9", "follow-redirects": "1.16.2", + "glob@>=9.0.0 <14.0.6": "$glob", "@xmldom/xmldom": "0.9.12", "js-yaml": "4.3.2", "morgan": "1.12.1", @@ -55,6 +56,7 @@ "sane": "5.0.1", "serialize-javascript": "7.1.3", "testem": "3.20.0", + "terser": "5.51.3", "tmp": "0.2.7", "uuid": "$uuid", "websocket-driver": "0.8.3", @@ -111,7 +113,7 @@ "ember-truth-helpers": "5.0.0", "exists-sync": "file:vendor/exists-sync-compat/exists-sync-1.0.0-rc16.0.tgz", "express": "5.2.1", - "glob": "file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz", + "glob": "14.0.6", "http-proxy": "1.18.1", "identicon.js": "2.3.3", "inflight": "file:vendor/inflight-compat/inflight-1.1.0-rc16.0.tgz", diff --git a/scripts/apply-minimatch-security-backport.cjs b/scripts/apply-minimatch-security-backport.cjs index a16f099b0c..fb901f26bb 100644 --- a/scripts/apply-minimatch-security-backport.cjs +++ b/scripts/apply-minimatch-security-backport.cjs @@ -6,24 +6,32 @@ const path = require('node:path'); const zlib = require('node:zlib'); const crypto = require('node:crypto'); -const ARCHIVE = 'vendor/minimatch-security-backport/minimatch-10.2.6-pasturestack.1.tgz'; -const ARCHIVE_SHA = '7f503bfe66c1dc9bef69b3a42ff29438b54397ee801c5fd1af5e62fe61e28c00'; +const ARCHIVE = 'vendor/minimatch-security-backport/minimatch-10.2.6-pasturestack.2.tgz'; +const ARCHIVE_SHA = '592383262d3b5b6ac09372dcdd4306e90df73b5112020fa92a0968d5e3c65ae9'; const INTEGRITY = 'sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A=='; const RESOLVED = 'https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz'; const PACKAGE_SHA = 'bb847ba240909c9a36d4eaeb4e0efdc3e31182aeef208c1611259a48f282ea75'; const ORIGINAL = Object.freeze({ + 'dist/commonjs/escape.js': '54b57f8f50c8e834f35a30c1848ac3f79acf8dd85894505f046afaf3965e63a0', + 'dist/esm/escape.js': '8418e37c202bcd247e76b1c205d4eff9474f15fb76c1db1ef0688cb6a8ec3c94', + 'dist/commonjs/unescape.js': 'bec1bb4483a2c325599949dd6668b5b7daa2dcbe046c5a09899bc8c5b51c08c1', + 'dist/esm/unescape.js': '2cd61ba96e616969f152445c61ec2ca129a0afd2028ea71309b862a4222304d6', 'dist/commonjs/index.js': 'd224f71f20d7c206fcc5b7e9f747324c7698345a0b2c28d717dd9cf698306783', 'dist/esm/index.js': '59821ec2ce0d3df968292036e5c831ad322b33e9c33a949ecbc9dfe125d165be', 'dist/commonjs/index.d.ts': '4a3fbf9bb0ebcae246f172ba1f5df33404a4dc0fde03a5241434889b1ca595a5', 'dist/esm/index.d.ts': '4a3fbf9bb0ebcae246f172ba1f5df33404a4dc0fde03a5241434889b1ca595a5', }); const MAPS = Object.freeze({ + 'dist/commonjs/escape.js.map': 'b5f20d5a880214494df8a92d7cdec4e4d68b8b3470b81e4bf3c55f058bac6d28', + 'dist/esm/escape.js.map': 'd167494c1bc002ba3b3ae18bb41bc18b13a9f20631a3c24efe21f6394e107515', + 'dist/commonjs/unescape.js.map': '7a386a679c12ea329eca1c76d10db048489d3292c9a5658574e9307b89392b1b', + 'dist/esm/unescape.js.map': '11dca08b65b198c0a72baba3d8a866ff32f4875366e76d7205ca54b428bf39cf', 'dist/commonjs/index.js.map': '4345abdf627c9208d8c34f654a03a3ee3378a10c5241c7e434f8048db21b8240', 'dist/esm/index.js.map': '5c3e65c473cad1e082a2bcf0c8d40c63d4b72efe239906380515b33a5023a384', 'dist/commonjs/index.d.ts.map': '17bddd11b7c36d9588648943fc18fc17578d09226b14db02b4a12fb74178f1d1', 'dist/esm/index.d.ts.map': '17bddd11b7c36d9588648943fc18fc17578d09226b14db02b4a12fb74178f1d1', }); -const ADDED = ['src/index.ts', 'backport.json', 'BACKPORT.md']; +const ADDED = ['src/index.ts', 'src/escape.ts', 'src/unescape.ts', 'backport.json', 'BACKPORT.md']; const DEPLOY = [...Object.keys(ORIGINAL), ...ADDED]; const need = (ok, code) => { if (!ok) throw Error(code); }; const sha = (raw) => crypto.createHash('sha256').update(raw).digest('hex'); @@ -95,11 +103,13 @@ function regular(root, relative) { function archiveFiles(root) { const compressed = regular(root, ARCHIVE); need(sha(compressed) === ARCHIVE_SHA, 'EXACT_VENDOR_BACKPORT_ARCHIVE_REQUIRED'); const files = parseTar(zlib.gunzipSync(compressed, {maxOutputLength: 2 * 1024 * 1024})); - need(files.size === 52 && DEPLOY.every((name) => files.has(name)) && files.has('package.json'), 'EXACT_BACKPORT_INVENTORY_REQUIRED'); + need(files.size === 50 && DEPLOY.every((name) => files.has(name)) && files.has('package.json'), 'EXACT_BACKPORT_INVENTORY_REQUIRED'); const pkg = JSON.parse(files.get('package.json')); const proof = JSON.parse(files.get('backport.json')); - need(pkg.name === 'minimatch' && pkg.version === '10.2.6-pasturestack.1' - && proof.cve === 'CVE-2026-118764' && proof.upstreamVersion === '10.2.6' && proof.runtimePatch === false, 'EXACT_SOURCE_BACKPORT_IDENTITY_REQUIRED'); + need(pkg.name === 'minimatch' && pkg.version === '10.2.6-pasturestack.2' + && proof.cve === 'CVE-2026-118764' && JSON.stringify(proof.cves) === JSON.stringify(['CVE-2026-118764','CVE-2026-140006']) + && proof.escapeFixCommit === '784603e09641970d2ba2caf8c73a95d1015cc67d' + && proof.upstreamVersion === '10.2.6' && proof.runtimePatch === false, 'EXACT_SOURCE_BACKPORT_IDENTITY_REQUIRED'); for (const name of Object.keys(ORIGINAL)) need(!files.get(name).includes(Buffer.from('sourceMappingURL=')), 'STALE_INDEX_MAP_REFERENCE_FORBIDDEN'); return files; } @@ -175,7 +185,7 @@ function applyProject(projectRoot, check = false) { const fd = fs.openSync(file, flags, 0o644); try { fs.ftruncateSync(fd, 0); fs.writeFileSync(fd, files.get(name)); } finally { fs.closeSync(fd); } } - // The sole deletion allowlist: four original, hash-checked upstream index maps. + // Only the eight original, hash-checked maps for changed sources are removed. for (const [name, digest] of Object.entries(MAPS)) { const file = safePath(root, state.location + '/' + name); need(stat(file).isFile() && sha(fs.readFileSync(file)) === digest, 'EXACT_ORIGINAL_MAP_BEFORE_UNLINK_REQUIRED'); @@ -184,7 +194,7 @@ function applyProject(projectRoot, check = false) { } need(locations.every((location) => !preflight(root, location, files).original), 'COMPLETE_SOURCE_BACKPORT_VERIFICATION_REQUIRED'); return {status: check ? 'MINIMATCH_SOURCE_BACKPORT_VERIFIED' : 'MINIMATCH_SOURCE_BACKPORT_APPLIED', - upstreamVersion: '10.2.6', archiveSha256: ARCHIVE_SHA, packages: locations, + upstreamVersion: '10.2.6', cves: ['CVE-2026-118764','CVE-2026-140006'], archiveSha256: ARCHIVE_SHA, packages: locations, changedPackages: check ? 0 : states.filter((state) => state.original).length, runtimePatch: false}; } diff --git a/scripts/build-minimatch-security-backport.py b/scripts/build-minimatch-security-backport.py index 04897e635f..009c3c06d4 100644 --- a/scripts/build-minimatch-security-backport.py +++ b/scripts/build-minimatch-security-backport.py @@ -9,17 +9,21 @@ import hashlib import io import json +import re from pathlib import Path import tarfile ROOT = Path(__file__).resolve().parents[1] VENDOR = ROOT / 'vendor/minimatch-security-backport' -VERSION = '10.2.6-pasturestack.1' +VERSION = '10.2.6-pasturestack.2' ARCHIVE = VENDOR / ('minimatch-' + VERSION + '.tgz') UPSTREAM_SHA256 = '5a3d2c8074a28229665727e47b8a1090941856a7962905efe05d20d3760355f8' FIX_SOURCE_SHA256 = 'eff2f23257708f4bd102cf94d746c8f26f5887e993e6de0f3c139bdae924c37b' FIX_COMMIT = '47afe882784638ccdee8d30e0b7516aed2b589a9' -MAPS = {f'dist/{mode}/index.{kind}.map' for mode in ('commonjs', 'esm') for kind in ('js', 'd.ts')} +ESCAPE_ARCHIVE_SHA256 = '1dc838a033c6105308d3d49c1881f9304b2b6821683dfe4815c37f8e19e7956a' +ESCAPE_FIX_COMMIT = '784603e09641970d2ba2caf8c73a95d1015cc67d' +MAPS = ({f'dist/{mode}/index.{kind}.map' for mode in ('commonjs', 'esm') for kind in ('js', 'd.ts')} + | {f'dist/{mode}/{name}.js.map' for mode in ('commonjs', 'esm') for name in ('escape', 'unescape')}) def need(value, code): @@ -80,35 +84,65 @@ def candidate_files(): package['version'] = VERSION package['pasturestackSecurityBackport'] = {'cve': 'CVE-2026-118764', 'upstreamVersion': '10.2.6', 'upstreamFixCommit': FIX_COMMIT} - package['files'] += ['src/index.ts', 'BACKPORT.md', 'backport.json'] + package['files'] += ['src/index.ts', 'src/escape.ts', 'src/unescape.ts', 'BACKPORT.md', 'backport.json'] files['package.json'] = (json.dumps(package, indent=2) + '\n').encode() source = json.loads(original['dist/esm/index.js.map']) need(source['sources'] == ['../../src/index.ts'] and len(source['sourcesContent']) == 1, 'EXACT_UPSTREAM_TYPESCRIPT_SOURCE_REQUIRED') source = patch(source['sourcesContent'][0], typescript=True) + raw_fixed = (VENDOR / 'upstream-minimatch-11.0.8.tgz').read_bytes() + need(hashlib.sha256(raw_fixed).hexdigest() == ESCAPE_ARCHIVE_SHA256, 'EXACT_OFFICIAL_ESCAPE_FIX_ARCHIVE_REQUIRED') + with tarfile.open(fileobj=io.BytesIO(raw_fixed), mode='r:gz') as archive: + fixed = {row.name[8:]: archive.extractfile(row).read() for row in archive.getmembers() + if row.isfile() and row.name.startswith('package/') and '..' not in Path(row.name).parts} + fixed_source = json.loads(fixed['dist/esm/index.js.map'])['sourcesContent'][0] + + def expansion(text, reviewed): + # Official 11.0.8 brace preservation hunk. Version 10 exposes the same + # option under its public name rather than version 11's private symbol. + start = reviewed.index('// brace-expansion turns each') + start = reviewed.rfind('\n', 0, start) + 1 + end = re.search(r'(?m)^ *return .*\(p, \{ max: options.braceExpandMax \}\).*$', reviewed[start:]) + need(end is not None, 'OFFICIAL_ESCAPE_EXPANSION_HUNK_REQUIRED') + body = reviewed[start:start + end.end()].replace('options[AWE_KEY]', 'options.allowWindowsEscape') + pattern = r'(?m)^ *return (?:\(0, brace_expansion_1\.expand\)|expand)\(pattern, \{ max: options.braceExpandMax \}\);?$' + matches = list(re.finditer(pattern, text)) + need(len(matches) == 1, 'OFFICIAL_ESCAPE_EXPANSION_PREIMAGE_REQUIRED') + return text[:matches[0].start()] + body + text[matches[0].end():] + + source = expansion(source, fixed_source) files['src/index.ts'] = source.encode() for mode in ('commonjs', 'esm'): name = f'dist/{mode}/index.js' - files[name] = once(patch(original[name].decode()), '//# sourceMappingURL=index.js.map', + files[name] = once(expansion(patch(original[name].decode()), fixed[name].decode()), '//# sourceMappingURL=index.js.map', '// Patched source: ../../src/index.ts; stale upstream index map omitted.').encode() name = f'dist/{mode}/index.d.ts' files[name] = once(original[name].decode(), '//# sourceMappingURL=index.d.ts.map', '// Upstream declaration API retained; index source map omitted.').encode() + for module in ('escape', 'unescape'): + name = f'dist/{mode}/{module}.js' + files[name] = once(fixed[name].decode(), f'//# sourceMappingURL={module}.js.map', + f'// Official fixed source: ../../src/{module}.ts; stale index map omitted.').encode() + files[f'src/{module}.ts'] = json.loads(fixed[f'dist/esm/{module}.js.map'])['sourcesContent'][0].encode() for name in MAPS: need(name in files, 'EXACT_INDEX_MAP_OMISSION_REQUIRED') del files[name] files['BACKPORT.md'] = (VENDOR / 'UPSTREAM.md').read_bytes() files['backport.json'] = (json.dumps({ 'cve': 'CVE-2026-118764', 'version': VERSION, 'upstreamVersion': '10.2.6', + 'cves': ['CVE-2026-118764', 'CVE-2026-140006'], + 'escapeFixCommit': ESCAPE_FIX_COMMIT, 'escapeFixArchiveSha256': ESCAPE_ARCHIVE_SHA256, 'upstreamArchiveSha256': UPSTREAM_SHA256, 'officialFixCommit': FIX_COMMIT, 'officialFixSourceSha256': FIX_SOURCE_SHA256, 'sourceMapsOmitted': sorted(MAPS), 'runtimePatch': False, 'upstreamApiPreserved': ['matchOne', 'makeRe', 'set RegExp'], - 'patchedFiles': {name: hashlib.sha256(files[name]).hexdigest() for name in - ('src/index.ts', 'dist/commonjs/index.js', 'dist/esm/index.js')}, + 'patchedFiles': {name: hashlib.sha256(files[name]).hexdigest() for name in sorted(files) + if name.startswith('src/') or re.fullmatch(r'dist/(commonjs|esm)/(index|escape|unescape)\.js', name)}, }, indent=2) + '\n').encode() changed = {name for name in original if name not in files or files[name] != original[name]} need(changed == MAPS | {'package.json', 'dist/commonjs/index.js', 'dist/esm/index.js', - 'dist/commonjs/index.d.ts', 'dist/esm/index.d.ts'}, 'ONLY_DECLARED_BACKPORT_FILES_MAY_CHANGE') + 'dist/commonjs/index.d.ts', 'dist/esm/index.d.ts'} + | {f'dist/{mode}/{module}.js' for mode in ('commonjs', 'esm') for module in ('escape', 'unescape')}, + 'ONLY_DECLARED_BACKPORT_FILES_MAY_CHANGE') return files diff --git a/scripts/build-ui-release-candidate b/scripts/build-ui-release-candidate index 8e9095fa3e..ac3fab37a7 100644 --- a/scripts/build-ui-release-candidate +++ b/scripts/build-ui-release-candidate @@ -75,7 +75,7 @@ build_inside_container() { verifier_manifest_sha=$(sha256sum tools/sbom-verifier/package.json | awk '{print $1}') verifier_lock_sha=$(sha256sum tools/sbom-verifier/package-lock.json | awk '{print $1}') npm ci --ignore-scripts --no-audit --no-fund - node scripts/apply-minimatch-security-backport.cjs + node scripts/prepare-ui-build-dependencies.cjs npm ci --prefix tools/sbom-verifier --ignore-scripts --no-audit --no-fund npm audit --prefix tools/sbom-verifier --audit-level=low schema_dir="$PWD/tools/sbom-verifier/schemas" @@ -94,14 +94,16 @@ build_inside_container() { | sha256sum --check ) node --test scripts/test-ui-sbom.js scripts/test-ui-build-module-boundary.js scripts/test-ui-webpack-inventory.js scripts/test-ui-finalize-webpack-inventory.js scripts/test-ui-build-dependency-security.js + node --test scripts/test-ui-sass-inventory.cjs scripts/test-ui-compiled-template-owner.cjs scripts/test-ui-novnc-composition.cjs scripts/test-ui-terser-security.cjs scripts/test-ui-minimatch-compat.js node --test scripts/test-ui-ec2-proxy.mjs node scripts/test-ai-collaboration-ui.js --filter=initialization python3 -B scripts/test-ui-builder-inventory.py python3 -B scripts/test-ui-builder-boundary.py - if [[ "$VALIDATION_SCOPE" = sbom ]]; then - bash scripts/check-ui-critical-high-dependencies - node scripts/check-ui-npm-audit.js - fi + bash scripts/check-ui-critical-high-dependencies + node scripts/check-ui-npm-audit.js --retain-evidence + cp build/security-audit/npm-audit-raw.json "$output_dir/browser-build-npm-audit-raw.json" + cp build/security-audit/npm-audit-qualification.json "$output_dir/browser-build-npm-audit-qualification.json" + node --test scripts/test-ui-npm-audit.js build_candidate() { local output=$1 canonical_dist @@ -109,7 +111,7 @@ build_inside_container() { export CONCAT_STATS=1 export CONCAT_STATS_PATH="$PWD/build/security-browser/concat-stats" export PASTURESTACK_MODULE_INVENTORY=1 - node scripts/apply-minimatch-security-backport.cjs --check + node scripts/prepare-ui-build-dependencies.cjs --check ./node_modules/.bin/ember build --environment production write_webmcp_profile dist/webmcp-build.json node scripts/finalize-ui-webpack-inventory.js @@ -122,6 +124,7 @@ build_inside_container() { node scripts/generate-ui-sbom.js \ --dist "$canonical_dist" --archive "$output" \ --webpack-inventory build/security-browser/webpack-modules.json \ + --sass-inventory build/security-browser/sass-dependencies.json \ --concat-stats build/security-browser/concat-stats \ --verifier-root tools/sbom-verifier \ --verifier-manifest-sha256 "$verifier_manifest_sha" --verifier-lock-sha256 "$verifier_lock_sha" \ @@ -154,6 +157,7 @@ build_inside_container() { cp "$work_root/web-console-a.tar.gz.sbom/$document" "$output_dir/web-console-${package_version}-$document" done cp build/security-browser/webpack-modules.json "$output_dir/browser-webpack-modules.json" + cp build/security-browser/sass-dependencies.json "$output_dir/browser-sass-dependencies.json" tar -czf "$output_dir/browser-concat-stats.tar.gz" -C build/security-browser/concat-stats . local release_name release_name=$(basename "$release_asset") diff --git a/scripts/check-node24-lock-baseline b/scripts/check-node24-lock-baseline index 3c070db08a..3c12431c56 100755 --- a/scripts/check-node24-lock-baseline +++ b/scripts/check-node24-lock-baseline @@ -34,7 +34,10 @@ docker run --rm \ cp scripts/node24-lock-smoke.js "$tmpdir/node24-lock-smoke.js" mkdir -p "$tmpdir/scripts" "$tmpdir/vendor/minimatch-security-backport" cp scripts/apply-minimatch-security-backport.cjs "$tmpdir/scripts/apply-minimatch-security-backport.cjs" - cp vendor/minimatch-security-backport/minimatch-10.2.6-pasturestack.1.tgz "$tmpdir/vendor/minimatch-security-backport/" + cp scripts/prepare-ui-build-dependencies.cjs scripts/prepare-glob-security-entry.cjs "$tmpdir/scripts/" + mkdir -p "$tmpdir/lib" + cp lib/glob-callback-default-entry.cjs.template "$tmpdir/lib/" + cp vendor/minimatch-security-backport/minimatch-10.2.6-pasturestack.2.tgz "$tmpdir/vendor/minimatch-security-backport/" mkdir -p "$tmpdir/tests/unit/vendor" cp tests/unit/vendor/api-store-create-order-test.js "$tmpdir/tests/unit/vendor/api-store-create-order-test.js" mkdir -p "$tmpdir/public/licenses" @@ -70,7 +73,7 @@ docker run --rm \ npm install --global --ignore-scripts --no-audit --no-fund npm@12.0.2 >/dev/null test "$(npm --version)" = 12.0.2 npm ci --ignore-scripts --no-audit --no-fund - node scripts/apply-minimatch-security-backport.cjs + node scripts/prepare-ui-build-dependencies.cjs ./node_modules/.bin/ember --version ./node_modules/.bin/testem --version node node24-lock-smoke.js diff --git a/scripts/check-ui-browser-ember-test b/scripts/check-ui-browser-ember-test index 1d6467a27f..5b63c592d2 100755 --- a/scripts/check-ui-browser-ember-test +++ b/scripts/check-ui-browser-ember-test @@ -46,7 +46,7 @@ docker run --rm \ test "$(npm --version)" = 12.0.2 npm ci --ignore-scripts --no-audit --no-fund - node scripts/apply-minimatch-security-backport.cjs + node scripts/prepare-ui-build-dependencies.cjs if [[ "$PASTURESTACK_UI_TESTEM_LAUNCHER" = "chromium" ]]; then export CHROME_BIN="${CHROME_BIN:-/usr/bin/chromium}" fi diff --git a/scripts/check-ui-dev-server-dep-cleanup b/scripts/check-ui-dev-server-dep-cleanup index 1bbcdf9b09..2d898355b4 100755 --- a/scripts/check-ui-dev-server-dep-cleanup +++ b/scripts/check-ui-dev-server-dep-cleanup @@ -23,7 +23,7 @@ package = json.loads(Path("package.json").read_text(encoding="utf-8")) dev_deps = package.get("devDependencies", {}) or {} if "forever-agent" in dev_deps: fail("FOREVER_AGENT_STILL_DECLARED") -expected_glob = "file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz" +expected_glob = "14.0.6" if dev_deps.get("glob") != expected_glob: fail("GLOB_VERSION_UNEXPECTED", actual=dev_deps.get("glob"), expected=expected_glob) @@ -46,8 +46,8 @@ else: fail("SASS_REPLACEMENT_LOCK_DEV_DEPENDENCIES_DRIFT") packages = lock.get("packages", {}) or {} glob_pkg = packages.get("node_modules/glob", {}) - if glob_pkg.get("version") != "13.0.6": - fail("GLOB_LOCK_VERSION_UNEXPECTED", actual=glob_pkg.get("version"), expected="13.0.6") + if glob_pkg.get("version") != "14.0.6": + fail("GLOB_LOCK_VERSION_UNEXPECTED", actual=glob_pkg.get("version"), expected="14.0.6") for removed in ["node_modules/request", "node_modules/forever-agent"]: if removed in packages: fail("DEV_SERVER_REQUEST_RETIREMENT_PACKAGE_REMAINS", package=removed) @@ -57,7 +57,7 @@ if failures: print(f"failure_count={failures}") sys.exit(1) -print(f"UI_DEV_SERVER_DEP_CLEANUP_OK glob=13.0.6 direct_forever_agent=removed lockfile={lock_path} package_count={package_count}") +print(f"UI_DEV_SERVER_DEP_CLEANUP_OK glob=14.0.6 direct_forever_agent=removed lockfile={lock_path} package_count={package_count}") print("The no-publish Ember dev-server path no longer carries forever-agent/request in the active lock and uses the current glob sync API compatibility shim.") print("failure_count=0") PY diff --git a/scripts/check-ui-glob-cjs-default-compat b/scripts/check-ui-glob-cjs-default-compat index 129ce9f0e7..606ba9c1ab 100755 --- a/scripts/check-ui-glob-cjs-default-compat +++ b/scripts/check-ui-glob-cjs-default-compat @@ -1,76 +1,43 @@ #!/usr/bin/env bash set -euo pipefail - -repo_root=$(cd "$(dirname "$0")/.." && pwd) -cd "$repo_root" - -lock_path="docs/baselines/npm-package-lock.sass-replacement.node24-ignore-scripts.json" - +cd "$(dirname "$0")/.." python3 - <<'PY' import json -import re import sys -import tarfile from pathlib import Path - -package = json.loads(Path("package.json").read_text(encoding="utf-8")) -lock = json.loads(Path("docs/baselines/npm-package-lock.sass-replacement.node24-ignore-scripts.json").read_text(encoding="utf-8")) -packages = lock.get("packages", {}) +package = json.loads(Path('package.json').read_text(encoding='utf-8')) +lock = json.loads(Path('docs/baselines/npm-package-lock.sass-replacement.node24-ignore-scripts.json').read_text(encoding='utf-8')) failures = [] - -glob_dep = package.get("devDependencies", {}).get("glob") -if glob_dep != "file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz": - failures.append(f"root glob dependency is {glob_dep!r}") - -root_glob = packages.get("node_modules/glob", {}) -if root_glob.get("version") != "13.0.6": - failures.append(f"root glob version is {root_glob.get('version')!r}") -if root_glob.get("resolved") != "file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz": - failures.append(f"root glob resolved is {root_glob.get('resolved')!r}") - -glob_real = packages.get("node_modules/glob-real", {}) -if glob_real.get("version") != "13.0.6": - failures.append(f"glob-real version is {glob_real.get('version')!r}") - -# A source edit without repacking the installed wrapper must fail closed. -archive_path = Path("vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz") -with tarfile.open(archive_path, "r:gz") as archive: - rows = archive.getmembers() - if len(rows) != 3 or {row.name for row in rows} != {"package/index.js", "package/package.json", "package/UPSTREAM.md"} or not all(row.isfile() for row in rows): - failures.append("glob compatibility archive must contain the exact three regular source files") - else: - for name in ("index.js", "package.json", "UPSTREAM.md"): - if archive.extractfile("package/" + name).read() != Path("vendor/glob-cjs-default-compat", name).read_bytes().replace(b"\r\n", b"\n"): - failures.append(f"packed glob wrapper differs from reviewed source: {name}") -wrapper = Path("vendor/glob-cjs-default-compat/index.js").read_text(encoding="utf-8") -if 'const modernGlob = require("glob-real/raw");' not in wrapper: - failures.append("glob compatibility wrapper must use the official raw entry") -default_import = re.compile(r'''\b(?:require\s*\(\s*|import\s*\(\s*|import\s+|from\s*)["']glob-real["']''') -sources = list(Path('.').glob('*.js')) -for directory in ('app', 'config', 'server', 'scripts'): - sources.extend(path for path in Path(directory).rglob('*') if path.suffix in ('.js', '.mjs', '.cjs') - and 'node_modules' not in path.parts) -for source in sources: - if default_import.search(source.read_text(encoding='utf-8')): - failures.append(f"first-party default glob-real import bypasses the reviewed raw entry: {source}") -for name, row in packages.items(): - if name != "node_modules/glob" and "glob-real" in {**row.get('dependencies', {}), **row.get('optionalDependencies', {})}: - failures.append(f"unreviewed glob-real dependency edge: {name}") - -for retired_path in ( - "node_modules/ember-intl/node_modules/glob", - "node_modules/formatjs-extract-cldr-data/node_modules/glob", -): - if retired_path in packages: - failures.append(f"retired Ember Intl glob owner remains at {retired_path}") - +integrity = 'sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==' +if package.get('devDependencies', {}).get('glob') != '14.0.6': + failures.append('root glob must be official fixed 14.0.6') +if package.get('overrides', {}).get('glob@>=9.0.0 <14.0.6') != '$glob': + failures.append('affected transitive glob copies must use the fixed release') +selected = [] +for name, row in lock.get('packages', {}).items(): + if not (name.endswith('node_modules/glob') or row.get('name') == 'glob'): + continue + if int(row['version'].split('.')[0]) < 9: + continue + selected.append(name) + if (row.get('version') != '14.0.6' or row.get('integrity') != integrity + or row.get('resolved') != 'https://registry.npmjs.org/glob/-/glob-14.0.6.tgz'): + failures.append('unfixed or unverified glob identity: ' + name) +if selected != ['node_modules/glob']: + failures.append('reviewed lock must deduplicate affected copies to the official root') +if 'node_modules/glob-real' in lock.get('packages', {}): + failures.append('retired glob-real alias must not survive in the current lock') +adapter = Path('lib/glob-callback-default-entry.cjs.template').read_text(encoding='utf-8') +if adapter.count('require("./dist/commonjs/index.js")') != 1 or 'index.min.js' in adapter: + failures.append('compatibility entry must use the official raw CommonJS source') +for hook in ('prebuild', 'preember', 'prestart', 'pretest'): + if package.get('scripts', {}).get(hook) != 'node scripts/prepare-ui-build-dependencies.cjs --check': + failures.append('missing source-preparation check: ' + hook) +for failure in failures: + print('UI_GLOB_CJS_DEFAULT_COMPAT_FAIL ' + failure) +print('failure_count=' + str(len(failures))) if failures: - for failure in failures: - print(f"UI_GLOB_CJS_DEFAULT_COMPAT_FAIL {failure}") - print(f"failure_count={len(failures)}") sys.exit(1) - -print("UI_GLOB_CJS_DEFAULT_COMPAT_OK root=13.0.6 wrapper=file:vendor/glob-cjs-default-compat/glob-13.0.6-pasturestack.2.tgz glob_real=13.0.6 entry=raw") -print("The first-party tools resolve the reviewed CommonJS default wrapper; addon-owned deprecated glob paths are locked by the exact deprecation inventory gate.") -print("failure_count=0") +print('UI_GLOB_CJS_DEFAULT_COMPAT_OK official=14.0.6 affected_copies=1 entry=raw-with-callback-adapter') +print('Source/lock contract only; native dependency tests qualify installed entry and behavior.') PY diff --git a/scripts/check-ui-npm-audit.js b/scripts/check-ui-npm-audit.js index b27eaa5786..3b3e098450 100644 --- a/scripts/check-ui-npm-audit.js +++ b/scripts/check-ui-npm-audit.js @@ -311,7 +311,7 @@ function runNpm(invocation, options, runner, platform) { } } -function runAudit(repoRoot, runner = spawnSync, platform = process.platform, clock = () => new Date()) { +function runAudit(repoRoot, runner = spawnSync, platform = process.platform, clock = () => new Date(), onRaw = () => {}) { let lock, pending; try { lock = JSON.parse(fs.readFileSync(path.join(repoRoot, 'package-lock.json'), 'utf8')); @@ -337,14 +337,72 @@ function runAudit(repoRoot, runner = spawnSync, platform = process.platform, clo if (!result || result.error || result.signal || ![0, 1].includes(result.status)) return { ok: false, outcome: 'FAIL_CLOSED', totals: null, failureCode: 'NPM_EXIT_OR_NETWORK_ERROR' }; let audit; + onRaw(result.stdout); try { audit = JSON.parse(result.stdout); } catch (_) { return { ok: false, outcome: 'FAIL_CLOSED', totals: null, failureCode: 'NPM_JSON_INVALID' }; } - return evaluateAudit({ audit, lock, pending, now: clock(), npmExitCode: result.status }); + const decision = evaluateAudit({ audit, lock, pending, now: clock(), npmExitCode: result.status }); + if (!decision.ok) return decision; + try { + // Read and verify installed bytes independently of npm's raw report. A raw + // version match is retained, while only these exact official backports are + // qualified. New lower-severity advisories cannot borrow this decision. + const proof = require('./apply-minimatch-security-backport.cjs').applyProject(repoRoot, true); + return {...decision, lowerSeverityQualification: qualifyLowerAdvisories(audit, lock, proof)}; + } catch (error) { + return {...decision, ok:false, outcome:'FAIL_CLOSED', failureCode: + /^[A-Z0-9_]+$/.test(error.message) ? error.message : 'LOWER_ADVISORY_QUALIFICATION_FAILED'}; + } +} + +function qualifyLowerAdvisories(audit, lock, proof) { + const allowed = { + 'https://github.com/advisories/GHSA-g3hv-75wg-m249': '>=7.0.0 <11.0.1', + 'https://github.com/advisories/GHSA-c859-jr93-m5j4': '>=7.4.0 <=11.0.7', + }; + need(proof?.status === 'MINIMATCH_SOURCE_BACKPORT_VERIFIED' && proof.runtimePatch === false && + proof.archiveSha256 === '592383262d3b5b6ac09372dcdd4306e90df73b5112020fa92a0968d5e3c65ae9' && + sameSet(proof.cves || [], ['CVE-2026-118764','CVE-2026-140006']) && + strings(proof.packages) && proof.packages.length > 0, 'SOURCE_BACKPORT_PROOF_REQUIRED'); + const vulnerabilities = audit.vulnerabilities, visiting = new Set(), visited = new Set(), advisories = new Set(); + function verify(name) { + if (visited.has(name)) return; + need(!visiting.has(name), 'LOWER_ADVISORY_CYCLE'); visiting.add(name); + const item = vulnerabilities[name]; + need(plain(item) && LEVELS.indexOf(item.severity) < LEVELS.indexOf('high'), 'UNREGISTERED_LOWER_ADVISORY'); + for (const via of exactVia(item.via)) { + if (typeof via === 'string') { + need(item.nodes.every(from => vulnerabilities[via]?.nodes.includes(resolveDependency(lock.packages, from, via))), + 'LOWER_ADVISORY_LOCK_EDGE_MISMATCH'); + verify(via); + } else { + need(name === 'minimatch' && via.name === name && via.dependency === name && via.severity === 'moderate' && + allowed[via.url] === via.range && via.range !== undefined && + item.nodes.every(node => proof.packages.includes(node) && lock.packages[node]?.version === '10.2.6'), + 'UNREGISTERED_LOWER_ADVISORY'); + advisories.add(via.url); + } + } + visiting.delete(name); visited.add(name); + } + for (const [name, item] of Object.entries(vulnerabilities)) if (LEVELS.indexOf(item.severity) < LEVELS.indexOf('high')) verify(name); + return {rawTotalsUnchanged:true, qualifiedOfficialSourceBackports:[...advisories].sort(), + qualifiedMetaPackageCount:visited.size, sourceArchiveSha256:proof.archiveSha256, runtimeNotAffectedClaim:false}; } -module.exports = { exactVia, evaluateAudit, validatePending, validateReviewedImports, readReviewedSources, npmInvocation, runAudit }; +module.exports = { exactVia, evaluateAudit, qualifyLowerAdvisories, validatePending, validateReviewedImports, readReviewedSources, npmInvocation, runAudit }; if (require.main === module) { - const result = runAudit(path.resolve(__dirname, '..')); + const args=process.argv.slice(2); + const root=path.resolve(__dirname,'..'); + let directory; + if(args.length) { + if(args.length!==1||args[0]!=='--retain-evidence')throw Error('AUDIT_EVIDENCE_ARGUMENTS_REQUIRED'); + directory=path.join(root,'build/security-audit'); + fs.mkdirSync(path.join(root,'build'),{recursive:true});fs.mkdirSync(directory); + } + const result = runAudit(root,spawnSync,process.platform,()=>new Date(),raw=>{ + if(directory)fs.writeFileSync(path.join(directory,'npm-audit-raw.json'),raw,{flag:'wx'}); + }); + if(directory)fs.writeFileSync(path.join(directory,'npm-audit-qualification.json'),JSON.stringify(result,null,2)+'\n',{flag:'wx'}); console.log(JSON.stringify(result)); process.exitCode = result.ok ? 0 : 1; } diff --git a/scripts/ci b/scripts/ci index 4026d2d006..e44f93f4c8 100755 --- a/scripts/ci +++ b/scripts/ci @@ -8,8 +8,9 @@ else cd "$(dirname "$CWD")" fi -node scripts/apply-minimatch-security-backport.cjs --check +node scripts/prepare-ui-build-dependencies.cjs --check node --test scripts/test-ui-minimatch-compat.js +node --test scripts/test-ui-sass-inventory.cjs scripts/test-ui-compiled-template-owner.cjs scripts/test-ui-novnc-composition.cjs scripts/test-ui-terser-security.cjs node --test scripts/test-audit-object-display.mjs ./scripts/check-modernization-blockers ./scripts/check-ui-ember-api-store-fetch-upgrade diff --git a/scripts/finalize-ui-webpack-inventory.js b/scripts/finalize-ui-webpack-inventory.js index fdd48e6e36..29d8519bb2 100644 --- a/scripts/finalize-ui-webpack-inventory.js +++ b/scripts/finalize-ui-webpack-inventory.js @@ -59,6 +59,23 @@ function finalize(root = path.resolve(__dirname, '..')) { const finalized = { ...inventory, webpackAssetSHA256: { ...originalHashes }, assetSHA256: finalHashes, finalProductionStage: STAGE }; fs.writeFileSync(inventoryFile, JSON.stringify(finalized, null, 2) + '\n'); + const sassFile=path.join(root,'build/security-browser/sass-dependencies.json'); + let descriptor; + try {descriptor=fs.openSync(sassFile,fs.constants.O_RDWR|(fs.constants.O_NOFOLLOW||0));} + catch(error) {if(error.code!=='ENOENT')throw error;} + if(descriptor!==undefined) try { + assert.ok(fs.fstatSync(descriptor).isFile(),'Sass inventory must be a regular file'); + const sass=JSON.parse(fs.readFileSync(descriptor,'utf8')); + assert.equal(sass.lockSha256,inventory.lockSha256,'Sass inventory lock drift'); + sass.finalAssetSHA256={}; + for(const theme of ['light','dark'])for(const suffix of ['','.rtl']) { + const file='assets/ui-'+theme+suffix+'.css'; + sass.finalAssetSHA256[file]=hash(fs.readFileSync(checkedFile(root,'dist/'+file))); + } + sass.finalProductionStage=STAGE; + const bytes=Buffer.from(JSON.stringify(sass,null,2)+'\n'); + fs.ftruncateSync(descriptor,0);fs.writeSync(descriptor,bytes,0,bytes.length,0); + } finally {fs.closeSync(descriptor);} return finalized; } diff --git a/scripts/fixtures/browser-ownership/lacsso-page-numbers.js b/scripts/fixtures/browser-ownership/lacsso-page-numbers.js new file mode 100644 index 0000000000..074a9efcc4 --- /dev/null +++ b/scripts/fixtures/browser-ownership/lacsso-page-numbers.js @@ -0,0 +1,28 @@ +define("ui/templates/components/page-numbers", ["exports", "@ember/template-factory"], function (_exports, _templateFactory) { + "use strict"; + + Object.defineProperty(_exports, "__esModule", { + value: true + }); + _exports.default = void 0; + 0; //eaimeta@70e063a35619d71f0,"@ember/template-factory"eaimeta@70e063a35619d71f + var _default = _exports.default = (0, _templateFactory.createTemplateFactory)( + /* +
+
+ + +
{{if this.content.totalPages this.content.page 0}} / {{this.content.totalPages}}
+ + +
+
+ + */ + { + "id": null, + "block": "[[[10,0],[14,0,\"lacsso pagination-container\"],[12],[1,\"\\n \"],[10,0],[14,0,\"lacsso btn-group btn-group-sm\"],[12],[1,\"\\n \"],[11,3],[24,0,\"lacsso arrow prev enabled-arrow btn bg-default\"],[16,\"disabled\",[52,[51,[28,[37,3],[[30,0,[\"content\",\"page\"]],2],null]],\"disabled\"]],[4,[38,4],[[30,0],\"pageClicked\",1],null],[12],[10,1],[14,0,\"icon icon-chevron-beginning\"],[12],[13],[13],[1,\"\\n \"],[11,3],[24,0,\"lacsso arrow prev enabled-arrow btn bg-default\"],[16,\"disabled\",[52,[51,[30,0,[\"canStepBackward\"]]],\"disabled\"]],[4,[38,4],[[30,0],\"incrementPage\",-1],null],[12],[10,1],[14,0,\"icon icon-chevron-left\"],[12],[13],[13],[1,\"\\n \"],[10,0],[14,0,\"overview-text lacsso btn bg-default\"],[14,5,\"border: 0;\"],[12],[1,[52,[30,0,[\"content\",\"totalPages\"]],[30,0,[\"content\",\"page\"]],0]],[1,\" / \"],[1,[30,0,[\"content\",\"totalPages\"]]],[13],[1,\"\\n \"],[11,3],[24,0,\"lacsso arrow next enabled-arrow btn bg-default\"],[16,\"disabled\",[52,[51,[30,0,[\"canStepForward\"]]],\"disabled\"]],[4,[38,4],[[30,0],\"incrementPage\",1],null],[12],[10,1],[14,0,\"icon icon-chevron-right\"],[12],[13],[13],[1,\"\\n \"],[11,3],[24,0,\"lacsso arrow prev enabled-arrow btn bg-default\"],[16,\"disabled\",[52,[28,[37,3],[[30,0,[\"content\",\"page\"]],[30,0,[\"content\",\"totalPages\"]]],null],\"disabled\"]],[4,[38,4],[[30,0],\"pageClicked\",[30,0,[\"content\",\"totalPages\"]]],null],[12],[10,1],[14,0,\"icon icon-chevron-end\"],[12],[13],[13],[1,\"\\n \"],[13],[1,\"\\n\"],[13],[1,\"\\n\"]],[],[\"div\",\"a\",\"unless\",\"gte\",\"action\",\"span\",\"if\"]]", + "moduleName": "ui/templates/components/page-numbers.hbs", + "isStrictMode": false + }); +}); \ No newline at end of file diff --git a/scripts/fixtures/browser-ownership/provenance.json b/scripts/fixtures/browser-ownership/provenance.json new file mode 100644 index 0000000000..1b03c86cba --- /dev/null +++ b/scripts/fixtures/browser-ownership/provenance.json @@ -0,0 +1,8 @@ +{ + "producer": "25a2ec9d65a490a38905fe2f5f2e2f25b480e064", + "version": "1.6.249", + "artifactId": 15758636384, + "path": "./1-ui.js/ui/templates/components/page-numbers.js", + "sha256": "034b60cd42b3f92a108c3af5a922e52c6bad6a54b17a508d4ca89237b38650c2", + "scope": "Actual published producer template output; source-owner regression fixture only" +} diff --git a/scripts/generate-ui-sbom.js b/scripts/generate-ui-sbom.js index 8dd46d80de..b8a34d7cc6 100644 --- a/scripts/generate-ui-sbom.js +++ b/scripts/generate-ui-sbom.js @@ -157,11 +157,11 @@ function annotateBuildBackport(root, pkg, installed) { 'verified backport must identify its actual installed SBOM component'); const metadata = json(path.join(root, location, 'backport.json')); component.properties.push(property('locally-modified', 'true'), - property('security-backport', metadata.cve), property('security-backport-archive-sha256', proof.archiveSha256), + ...metadata.cves.map(cve => property('security-backport', cve)), property('security-backport-archive-sha256', proof.archiveSha256), property('security-backport-upstream-commit', metadata.officialFixCommit), property('security-backport-patched-files', JSON.stringify(metadata.patchedFiles))); } - return { cve: 'CVE-2026-118764', upstreamVersion: proof.upstreamVersion, + return { cve: 'CVE-2026-118764', cves: proof.cves, upstreamVersion: proof.upstreamVersion, archiveSha256: proof.archiveSha256, packages: proof.packages, originalNpmIdentityRetained: true, rawVulnerabilityReportsRewritten: false }; } @@ -232,13 +232,22 @@ function vendorComponents(root, manifest) { property('provenance', item.provenance), property('locally-modified', item.modified ? 'true' : 'not-established')] }; if (item.purl) component.purl = item.purl; if (item.coverage) component.properties.push(property('coverage-limitation', item.coverage)); + if (item.advisoryCoverage) component.properties.push(property('advisory-index-limitation', item.advisoryCoverage)); + if(item.id==='novnc') { + component.components=require('./novnc-source-components.cjs').components( + fs.readFileSync(path.join(root,'vendor/novnc.js'),'utf8'),json(path.join(root,'docs/security/browser-vendor-provenance.json'))); + } return { ...item, component }; }); } function sourcePackage(resource, installed) { const location = resource.match(/^(.*node_modules\/(?:@[^/]+\/)?[^/]+)(?:\/|$)/)?.[1]; - if (!location) return undefined; + if (!location) { + const linked=[...installed.values()].filter(item=>item.target!==item.location && resource.startsWith(item.target+'/')); + assert.ok(linked.length<=1,'ambiguous physical local-addon source'); + return linked[0]?.location; + } assert.ok(installed.has(location), 'browser source is absent from installed lock: ' + resource); return location; } @@ -369,6 +378,16 @@ function generate(options) { assert.match(commit, /^[a-f0-9]{40}$/i, 'exact source commit is required'); const installed = installedPackages(root, lock); const matcherBackport = annotateBuildBackport(root, pkg, installed); + const globPreparation = pkg.devDependencies?.glob === '14.0.6' + ? require('./prepare-glob-security-entry.cjs').prepareProject(root, true) : undefined; + if (globPreparation) for (const location of globPreparation.packages) { + const item = installed.get(location)?.component; + assert.ok(item?.name === 'glob' && item.version === '14.0.6', 'prepared glob must match its actual installed SBOM component'); + item.properties.push(property('locally-modified', 'source-entry-adapter-only'), + property('official-raw-sources', JSON.stringify(globPreparation.rawSources)), + property('source-entry-adapter-sha256', globPreparation.adapterSha256), + property('upstream-manifest-sha256', globPreparation.originalManifestSha256)); + } const allInstalled = new Set(installed.keys()); const buildEdges = dependencyGraph(installed, lock, allInstalled); const verifier = verifierClosure(root, options); @@ -387,7 +406,20 @@ function generate(options) { assert.equal(candidates.length, 1, 'ambiguous or missing addon package: ' + name); return candidates[0][0]; }; - function mapSource(raw, phase) { + function mapSource(raw, phase, emittedFile) { + if(raw.startsWith('generated:')) { + const generated=inventory.generatedSources?.[raw]; + assert.ok(generated && ['ember-auto-import','webpack'].includes(generated.owner) + && /^[a-f0-9]{64}$/.test(generated.sha256||'') + && ['entry-source','compilation-asset'].includes(generated.hashKind),'Unknown generated Webpack source identity'); + if(raw.startsWith('generated:webpack-runtime/')) { + const name=raw.slice('generated:webpack-runtime/'.length); + assert.ok(generated.owner==='webpack' && generated.hashKind==='compilation-asset' && generated.name===name + && generated.sha256===(inventory.webpackAssetSHA256||inventory.assetSHA256)[name],'Generated Webpack runtime asset binding mismatch'); + } else assert.ok(generated.owner==='ember-auto-import' && generated.hashKind==='entry-source' + && raw==='generated:entry/'+generated.name,'Generated Auto Import entry identity mismatch'); + addNpm(byName(generated.owner),raw+'#sha256='+generated.sha256);return; + } if (raw === '' && phase === 'webpack') { limitations.add('Webpack generated-or-owned sentinel does not identify individual generated source modules.'); return; } @@ -396,10 +428,11 @@ function generate(options) { if (npm) { addNpm(npm, source); return; } const addon = source.match(/^addon-tree-output\/((?:@[^/]+\/)?[^/]+)\//); if (addon) { addNpm(byName(addon[1]), source); return; } - const vendor = vendors.find(item => (item.inputs || []).includes(source)); + const vendor = vendors.find(item => (item.inputs || []).includes(source) || phase === 'sass' && Object.hasOwn(item.files,source)); if (vendor) { addVendor(vendor, source); return; } const generated = manifest.generatedInputs?.[source]; if (generated) { if (generated !== 'first-party') addNpm(byName(generated), source); return; } + if(phase === 'sass' && source.startsWith('app/') && fs.existsSync(path.join(root,source)))return; if (source.startsWith('ui/')) { const appPath = source.slice(3); if (['app/' + appPath, 'app/' + appPath.replace(/\.js$/, '.hbs')].some(file => fs.existsSync(path.join(root, file)))) return; @@ -411,6 +444,14 @@ function generate(options) { return files.some(file => fs.existsSync(path.join(root, item.target, file))); }); assert.ok(owners.length > 0, 'unknown application/addon source: ' + source); + if(owners.length>1) { + const resolved=require('./resolve-compiled-template-owner.cjs').resolve(root,appPath,owners,emittedFile); + if(resolved) { + addNpm(resolved.owner.location,source+'#emitted-sha256='+resolved.emittedSha256 + +'#source-sha256='+resolved.sourceSha256+'#compiled-block-sha256='+resolved.compiledBlockSha256); + return; + } + } for (const owner of owners) addNpm(owner.location, source); if (owners.length > 1) limitations.add('Multiple addon app-tree owners are conservatively included for a shared emitted module.'); return; @@ -434,14 +475,41 @@ function generate(options) { const file = retainedAsset(item.data.outputFile); if (!file) continue; retainedConcat.push({ outputFile: item.data.outputFile, path: file.path }); - for (const source of Object.keys(item.data.sizes).sort()) mapSource(source, 'concat'); + for (const source of Object.keys(item.data.sizes).sort()) { + const emitted=path.join(concatDirectory,relative(item.name.replace(/\.json$/,'')),relative(source)); + mapSource(source,'concat',emitted); + } } assert.ok(retainedConcat.some(item => /(?:^|\/)ui\.js$/.test(item.outputFile)) && retainedConcat.some(item => /(?:^|\/)vendor\.js$/.test(item.outputFile)), 'retained application and vendor concat inventories are required'); - // Styles and copied fonts bypass JavaScript bundlers. Fixed inputs are - // reviewed and source-hashed, and every copied font must match the archive. + const sassPath=options.sassInventory||path.join(root,'build/security-browser/sass-dependencies.json'); + const sass=fs.existsSync(sassPath)?json(sassPath):undefined; + if(options.sassInventory)assert.ok(sass,'Actual compiler Sass inventory is required'); + if(sass) { + assert.equal(sass.schemaVersion,1,'unsupported Sass inventory'); + assert.equal(sass.lockSha256,lockHash,'Sass inventory lock drift'); + assert.equal(sass.finalProductionStage,'ember-production-post-processing-before-packaging','Final Sass output binding required'); + const expectedCss=['assets/ui-dark.css','assets/ui-dark.rtl.css','assets/ui-light.css','assets/ui-light.rtl.css']; + assert.deepEqual(Object.keys(sass.finalAssetSHA256||{}).sort(),expectedCss,'Both themes and RTL outputs must be bound'); + for(const file of expectedCss)assert.equal(artifact.files.find(f=>f.path===file)?.sha256,sass.finalAssetSHA256[file],'Delivered CSS differs from compiler inventory'); + assert.ok(Array.isArray(sass.compilations)&&sass.compilations.length,'Empty Sass compiler inventory'); + const names=new Set(); + for(const compilation of sass.compilations) { + assert.ok(!names.has(compilation.entry),'Duplicate Sass entrypoint');names.add(compilation.entry); + assert.match(compilation.cssSha256||'',/^[a-f0-9]{64}$/,'Sass compiled-byte hash required'); + assert.ok(Array.isArray(compilation.sources)&&compilation.sources.length,'Sass compiler sources required'); + assert.ok(compilation.sources.some(source=>path.posix.basename(source.path)===compilation.entry),'Sass entry source must be included'); + for(const source of compilation.sources) { + assert.match(source.path,/\.(scss|sass|css)$/,'Sass source type required'); + assert.equal(sourceHash(path.join(root,relative(source.path))),source.sha256,'Actual Sass dependency changed after compilation'); + mapSource(source.path,'sass'); + } + } + assert.ok(names.has('app-light.scss')&&names.has('app-dark.scss'),'Both shipped Sass themes must be traced'); + } + // Copied fonts remain independently bound to delivered bytes. for (const item of vendors.filter(value => value.style || value.copied)) { - if (item.style) for (const file of item.style) { + if (item.style && !sass) for (const file of item.style) { const source = fs.readFileSync(path.join(root, relative(file)), 'utf8'); assert.ok(source.length > 0, 'style source missing'); addVendor(item, file); @@ -452,8 +520,10 @@ function generate(options) { addVendor(item, file); } } - for (const name of manifest.styleNpm || []) addNpm(byName(name), 'reviewed-sass-input:' + name); - limitations.add('Sass ownership uses reviewed fixed inputs; compiler dependency tracing is not available.'); + if(!sass) { + for (const name of manifest.styleNpm || []) addNpm(byName(name), 'reviewed-sass-input:' + name); + limitations.add('Sass ownership uses reviewed fixed inputs; compiler dependency tracing is not available.'); + } const archiveRef = 'artifact:web-console-' + pkg.version + '.tar.gz'; const component = { type: 'application', 'bom-ref': archiveRef, name: pkg.name, version: pkg.version, purl: purl(pkg.name, pkg.version), hashes: [{ alg: 'SHA-256', content: artifact.sha256 }], licenses: license(pkg.license) }; @@ -473,12 +543,17 @@ function generate(options) { components: components.sort((a, b) => a['bom-ref'].localeCompare(b['bom-ref'], 'en')), dependencies: dependencies.sort((a, b) => a.ref.localeCompare(b.ref, 'en')) }); const runtimeEdges = dependencyGraph(installed, lock, runtime); - for (const vendor of selectedVendors) runtimeEdges.push({ ref: vendor.component['bom-ref'], dependsOn: [] }); + for (const vendor of selectedVendors) { + const embedded=vendor.component.components||[]; + runtimeEdges.push({ ref: vendor.component['bom-ref'], dependsOn: embedded.map(c=>c['bom-ref']).sort() }); + for(const component of embedded)runtimeEdges.push({ref:component['bom-ref'],dependsOn:[]}); + } for (const file of fileComponents) runtimeEdges.push({ ref: file['bom-ref'], dependsOn: [] }); runtimeEdges.push({ ref: archiveRef, dependsOn: sort([...runtimeComponents, ...fileComponents].map(item => item['bom-ref'])) }); const runtimeBom = base('runtime', [...runtimeComponents, ...fileComponents], runtimeEdges); - runtimeBom.metadata.properties.push(property('coverage', 'incomplete'), property('coverage-limitations', JSON.stringify(sort(limitations)))); - runtimeBom.compositions = [{ aggregate: 'incomplete', assemblies: [archiveRef] }]; + const runtimeCoverage=limitations.size?'incomplete':'complete'; + runtimeBom.metadata.properties.push(property('coverage', runtimeCoverage), property('coverage-limitations', JSON.stringify(sort(limitations)))); + runtimeBom.compositions = [{ aggregate: runtimeCoverage, assemblies: [archiveRef] }]; const buildRoot = lock.packages[''], buildDirect = new Set(); for (const name of Object.keys({ ...buildRoot.dependencies, ...buildRoot.devDependencies, ...buildRoot.optionalDependencies })) { const location = resolveDependency(installed, '', name); @@ -505,9 +580,11 @@ function generate(options) { sourceDateEpoch: Number(epoch), lockSha256: lockHash, archive: { name: artifact.name, sha256: artifact.sha256 }, inventory: { webpackSha256: sha256(fs.readFileSync(inventoryPath)), retainedWebpack, retainedConcat, concat: stats.map(({ name, sha256: digest }) => ({ name, sha256: digest })) }, - files: artifact.files, coverage: 'incomplete', limitations: sort(limitations) }; + files: artifact.files, coverage: runtimeCoverage, limitations: sort(limitations) }; if (verifier) artifactManifest.buildInputs = { verifier: verifier.identity }; if (matcherBackport) artifactManifest.buildInputs = { ...artifactManifest.buildInputs, matcherBackport }; + if (globPreparation) artifactManifest.buildInputs = { ...artifactManifest.buildInputs, globPreparation }; + if (sass) artifactManifest.inventory.sassSha256=sha256(fs.readFileSync(sassPath)); const result = { 'runtime.cdx.json': runtimeBom, 'build.cdx.json': buildBom, 'artifact-manifest.json': artifactManifest }; for (const document of Object.values(result)) { const encoded = JSON.stringify(document); @@ -519,7 +596,7 @@ function generate(options) { function main(args) { const options = {}; const names = { '--dist': 'dist', '--archive': 'archive', '--archive-sha256': 'archiveSha256', - '--webpack-inventory': 'webpackInventory', '--concat-stats': 'concatStats', '--output-dir': 'outputDir', '--source-commit': 'sourceCommit', + '--webpack-inventory': 'webpackInventory', '--sass-inventory': 'sassInventory', '--concat-stats': 'concatStats', '--output-dir': 'outputDir', '--source-commit': 'sourceCommit', '--verifier-root': 'verifierRoot', '--verifier-manifest-sha256': 'verifierManifestSha256', '--verifier-lock-sha256': 'verifierLockSha256' }; for (let i = 0; i < args.length; i += 2) { assert.ok(names[args[i]] && args[i + 1], 'unknown or incomplete SBOM argument'); options[names[args[i]]] = args[i + 1]; } assert.ok(options.archive && options.outputDir, '--archive and --output-dir are required'); @@ -529,7 +606,7 @@ function main(args) { fs.mkdirSync(output, { recursive: true }); for (const [name, document] of Object.entries(documents)) fs.writeFileSync(path.join(output, name), JSON.stringify(document, null, 2) + '\n'); console.log(JSON.stringify({ outcome: 'PASS_UI_ARTIFACT_SBOM', runtimeComponents: documents['runtime.cdx.json'].components.length, - buildComponents: documents['build.cdx.json'].components.length, coverage: 'incomplete', archiveSha256: documents['artifact-manifest.json'].archive.sha256 })); + buildComponents: documents['build.cdx.json'].components.length, coverage: documents['artifact-manifest.json'].coverage, archiveSha256: documents['artifact-manifest.json'].archive.sha256 })); } module.exports = { generate, readTar, sourceHash, sourcePackage, purl, installedPackages, dependencyGraph, verifyArchive, annotateBuildBackport }; diff --git a/scripts/node24-lock-smoke.js b/scripts/node24-lock-smoke.js index 538723d221..a162bca655 100644 --- a/scripts/node24-lock-smoke.js +++ b/scripts/node24-lock-smoke.js @@ -73,7 +73,7 @@ function expectMissing(name) { } function expectModernGlobDevServerPath() { - expectPackageJsonVersion("glob", "13.0.6"); + expectPackageJsonVersion("glob", "14.0.6"); const glob = require("glob"); if (glob.__esModule) { fail("glob CJS compatibility wrapper must not expose __esModule"); @@ -90,15 +90,15 @@ function expectModernGlobDevServerPath() { if (!portableMatches.includes("vendor/novnc.js")) { fail("glob modern sync smoke did not find vendored UI files"); } - console.log("glob-dev-server-smoke-ok version=13.0.6"); + console.log("glob-dev-server-smoke-ok version=14.0.6"); } function expectModuleResolverGlobCompat() { const ownerDir = path.dirname(require.resolve("babel-plugin-module-resolver/package.json")); const globPath = require.resolve("glob", { paths: [ownerDir] }); const globInfo = packageInfoFromResolved(globPath, "babel-plugin-module-resolver glob"); - if (globInfo.version !== "9.3.5") { - fail(`babel-plugin-module-resolver declared glob version ${globInfo.version} != 9.3.5`); + if (globInfo.version !== "14.0.6") { + fail(`babel-plugin-module-resolver resolved glob version ${globInfo.version} != fixed 14.0.6`); } const glob = require(globPath); @@ -118,7 +118,7 @@ function expectModuleResolverGlobCompat() { fail(`babel-plugin-module-resolver glob normalize smoke failed: ${JSON.stringify(normalized)}`); } - console.log(`module-resolver-glob-smoke-ok version=9.3.5 roots=${normalized.root.length}`); + console.log(`module-resolver-glob-smoke-ok version=14.0.6 roots=${normalized.root.length}`); } function expectBodyRawBodyOverride() { diff --git a/scripts/novnc-source-components.cjs b/scripts/novnc-source-components.cjs new file mode 100644 index 0000000000..9e589e473f --- /dev/null +++ b/scripts/novnc-source-components.cjs @@ -0,0 +1,33 @@ +'use strict'; +const assert=require('node:assert/strict'); +const crypto=require('node:crypto'); +const hash=raw=>crypto.createHash('sha256').update(raw).digest('hex'); + +function components(source,provenance) { + const files=provenance.noVncModules; + assert.ok(Array.isArray(files)&&files.length===11,'Reviewed noVNC module composition required'); + const starts=[...source.matchAll(/^\/\/ bower_components\/no-vnc\/(include\/[a-z]+\.js)\r?$/gm)]; + assert.deepEqual(starts.map(m=>m[1]),files.map(f=>f.file),'Embedded noVNC source set differs from review'); + return files.map((file,index)=>{ + const start=starts[index].index+starts[index][0].length; + const endMarker='//End of bower_components/no-vnc/'+file.file; + const end=source.indexOf(endMarker,start); + assert.ok(end>start && source.indexOf(endMarker,end+endMarker.length)===-1,'Unique noVNC module boundary required'); + assert.ok(index===starts.length-1||end crypto.createHash('sha256').update(raw).digest('hex'); +const need = (ok, code) => { if (!ok) throw Error(code); }; +const INTEGRITY = 'sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw=='; +const ORIGINAL = '46065b223266140254eb17d347469ab824681beaa843516bc1e0008eec612157'; +const RAW = {'dist/commonjs/index.js':'be0581401dff74824abe8ecd4f177d96535fdc1fe1b6698a9b4a4a9c4448bb61', + 'dist/esm/index.js':'c1c6edeb1f365b61dba99c88592aba8bf36fde8bc6d9f7c515e78086d87e2380'}; + +function safe(root, name, missing = false) { + need(typeof name === 'string' && name && !/[\\:\x00-\x1f]/.test(name) + && name.split('/').every(p => p && p !== '.' && p !== '..'), 'GLOB_SOURCE_PATH_REQUIRED'); + let current=root; + for (const part of name.split('/')) { + current=path.join(current,part); + if (!fs.existsSync(current)) { need(missing,'GLOB_SOURCE_INPUT_MISSING'); continue; } + need(!fs.lstatSync(current).isSymbolicLink(),'GLOB_SOURCE_LINK_FORBIDDEN'); + } + return current; +} + +function prepareProject(projectRoot, check=false) { + const root=path.resolve(projectRoot); + need(path.resolve(fs.realpathSync(root)).toLowerCase()===root.toLowerCase(),'GLOB_REAL_PROJECT_REQUIRED'); + const lock=JSON.parse(fs.readFileSync(safe(root,'package-lock.json'),'utf8')); + const source=fs.readFileSync(safe(root,'lib/glob-callback-default-entry.cjs.template'),'utf8').replace(/\r\n/g,'\n'); + need(source.split('require("./dist/commonjs/index.js")').length===2,'GLOB_SINGLE_RAW_ADAPTER_SOURCE_REQUIRED'); + const adapter=Buffer.from(source); + const states=[]; + for (const [location,row] of Object.entries(lock.packages||{})) { + if (!(row.name==='glob'||location.endsWith('node_modules/glob')) || !/^\d+\./.test(row.version||'')) continue; + if (Number(row.version.split('.')[0])<9) continue; + need(row.version==='14.0.6' && row.resolved==='https://registry.npmjs.org/glob/-/glob-14.0.6.tgz' + && row.integrity===INTEGRITY && !row.link,'GLOB_ALL_AFFECTED_COPIES_MUST_BE_OFFICIAL_FIXED_RELEASE'); + const manifestFile=safe(root,location+'/package.json'); + const bytes=fs.readFileSync(manifestFile); const metadata=JSON.parse(bytes); + need(metadata.name==='glob' && metadata.version==='14.0.6','GLOB_INSTALLED_IDENTITY_REQUIRED'); + for (const [file,hash] of Object.entries(RAW)) need(sha(fs.readFileSync(safe(root,location+'/'+file)))===hash,'GLOB_OFFICIAL_RAW_SOURCE_REQUIRED'); + const original=sha(bytes)===ORIGINAL; + const prepared=metadata.pasturestackSourceEntry?.originalManifestSha256===ORIGINAL + && metadata.exports['.'].require.default==='./pasturestack-compat.cjs' + && metadata.exports['.'].import.default==='./dist/esm/index.js'; + if(prepared) { + const restored=structuredClone(metadata); + delete restored.pasturestackSourceEntry; + restored.exports['.'].require.default='./dist/commonjs/index.min.js'; + restored.exports['.'].import.default='./dist/esm/index.min.js'; + need(sha(Buffer.from(JSON.stringify(restored,null,2)+'\n'))===ORIGINAL + && metadata.pasturestackSourceEntry.adapterSha256===sha(adapter) + && JSON.stringify(metadata.pasturestackSourceEntry.rawSources)===JSON.stringify(RAW), + 'GLOB_PREPARED_MANIFEST_MUST_PRESERVE_ALL_OTHER_FIELDS'); + } + const adapterFile=safe(root,location+'/pasturestack-compat.cjs',true); + need(original && !fs.existsSync(adapterFile) || prepared && fs.existsSync(adapterFile) + && fs.readFileSync(adapterFile).equals(adapter),'GLOB_COMPLETE_ORIGINAL_OR_PREPARED_INPUT_REQUIRED'); + if(check)need(prepared,'GLOB_SOURCE_PREPARATION_REQUIRED'); + states.push({location,manifestFile,metadata,adapterFile,original}); + } + need(states.length>0,'GLOB_LOCKED_TARGETS_REQUIRED'); + // Finish every preflight before modifying any installed package. + if(!check)for(const state of states.filter(s=>s.original)) { + need(sha(fs.readFileSync(state.manifestFile))===ORIGINAL,'GLOB_MANIFEST_CHANGED_BEFORE_PREPARATION'); + fs.writeFileSync(state.adapterFile,adapter,{flag:'wx'}); + state.metadata.exports['.'].require.default='./pasturestack-compat.cjs'; + state.metadata.exports['.'].import.default='./dist/esm/index.js'; + state.metadata.pasturestackSourceEntry={originalManifestSha256:ORIGINAL,adapterSha256:sha(adapter),rawSources:RAW}; + fs.writeFileSync(state.manifestFile,JSON.stringify(state.metadata,null,2)+'\n'); + } + if(!check)return prepareProject(root,true); + return {packages:states.map(s=>s.location).sort(),version:'14.0.6',originalManifestSha256:ORIGINAL, + adapterSha256:sha(adapter),rawSources:RAW,runtimePatch:false}; +} +module.exports={prepareProject}; diff --git a/scripts/prepare-ui-build-dependencies.cjs b/scripts/prepare-ui-build-dependencies.cjs new file mode 100644 index 0000000000..e73fc2b589 --- /dev/null +++ b/scripts/prepare-ui-build-dependencies.cjs @@ -0,0 +1,12 @@ +'use strict'; +function prepareProject(root,check=false) { + const minimatch=require('./apply-minimatch-security-backport.cjs').applyProject(root,check); + const glob=require('./prepare-glob-security-entry.cjs').prepareProject(root,check); + return {minimatch,glob,runtimePatch:false}; +} +module.exports={prepareProject}; +if(require.main===module) { + const args=process.argv.slice(2); + if(args.length>1 || args.length===1 && args[0]!=='--check')throw Error('CLOSED_BUILD_PREPARATION_ARGUMENTS_REQUIRED'); + console.log(JSON.stringify(prepareProject(require('node:path').resolve(__dirname,'..'),args[0]==='--check'))); +} diff --git a/scripts/resolve-compiled-template-owner.cjs b/scripts/resolve-compiled-template-owner.cjs new file mode 100644 index 0000000000..ae925a8960 --- /dev/null +++ b/scripts/resolve-compiled-template-owner.cjs @@ -0,0 +1,27 @@ +'use strict'; +// Compare compiler data, never execute emitted browser JavaScript. +const fs=require('node:fs'); +const path=require('node:path'); +const crypto=require('node:crypto'); +const hash=raw=>crypto.createHash('sha256').update(raw).digest('hex'); +function resolve(root,appPath,owners,emittedFile) { + if(!emittedFile||!/^templates\/.*\.js$/.test(appPath)||!fs.existsSync(emittedFile))return null; + const bytes=fs.readFileSync(emittedFile); + if(bytes.length>2*1024*1024)throw Error('Bounded emitted template required'); + const matches=[...bytes.toString('utf8').matchAll(/(?:"block"|\bblock)\s*:\s*("(?:[^"\\]|\\[\s\S])*")/g)]; + if(matches.length!==1)return null; + let block; + try{block=JSON.parse(matches[0][1]);}catch{return null;} + const compiler=require(require.resolve('ember-source/ember-template-compiler/index.js',{paths:[root]})); + const selected=[]; + for(const owner of owners) { + const source=path.join(root,owner.target,'app',appPath.replace(/\.js$/,'.hbs')); + if(!fs.existsSync(source))continue; + const text=fs.readFileSync(source,'utf8').replace(/\r\n/g,'\n'); + let compiled; + try{compiled=JSON.parse(compiler.precompile(text,{moduleName:'ui/'+appPath.replace(/\.js$/,'.hbs')}));}catch{continue;} + if(compiled.block===block)selected.push({owner,sourceSha256:hash(text),compiledBlockSha256:hash(block),emittedSha256:hash(bytes)}); + } + return selected.length===1?selected[0]:null; +} +module.exports={resolve}; diff --git a/scripts/scan-browser-advisories.py b/scripts/scan-browser-advisories.py index 6a17bf8661..7b1d3ab54f 100644 --- a/scripts/scan-browser-advisories.py +++ b/scripts/scan-browser-advisories.py @@ -90,8 +90,30 @@ def verify_archive(sbom, archive): if not re.fullmatch(r'[a-f0-9]{64}', expected or '') or digest(archive.read_bytes()) != expected: raise ValueError('Archive does not match the browser BOM') expected_files = {} + embedded = {} + for parent in flatten(sbom['components']): + children = parent.get('components', []) + if any(c.get('bom-ref', '').startswith('embedded-source:') for c in children): + names = {'include/' + name + '.js' for name in + ('util', 'webutil', 'websock', 'des', 'keysymdef', 'keyboard', 'input', 'display', 'jsunzip', 'rfb', 'keysym')} + if (parent.get('bom-ref') != 'vendor:novnc' or len(children) != 11 + or {c.get('bom-ref') for c in children} != {'embedded-source:novnc:' + name for name in names}): + raise ValueError('Incomplete embedded source parent/composition') + embedded.update({c['bom-ref']: c for c in children}) for c in flatten(sbom['components']): if c.get('type') == 'file': + if c.get('bom-ref', '').startswith('embedded-source:'): + if (embedded.get(c.get('bom-ref')) is not c or c.get('components') + or props(c).get('pasturestack:embedded-source-container') != 'vendor:novnc' + or c.get('bom-ref') != 'embedded-source:novnc:' + c.get('name', '').removeprefix('vendor/novnc.js#') + or not c.get('name', '').startswith('vendor/novnc.js#include/') + or not re.fullmatch(r'[a-f0-9]{40}', props(c).get('pasturestack:upstream-source-commit', '')) + or len(c.get('hashes', [])) != 1 or c['hashes'][0].get('alg') != 'SHA-256' + or not re.fullmatch(r'[a-f0-9]{64}', c['hashes'][0].get('content', ''))): + raise ValueError('Unidentified embedded source file') + continue + if c.get('bom-ref') != 'file:' + c.get('name', ''): + raise ValueError('Unidentified delivered file') hashes = [x['content'] for x in c.get('hashes', []) if x['alg'] == 'SHA-256'] if len(hashes) != 1 or c['name'] in expected_files: raise ValueError('Missing/duplicate delivered-file hash') diff --git a/scripts/test-browser-advisories.py b/scripts/test-browser-advisories.py index fdeaa7b30c..059e409a5b 100644 --- a/scripts/test-browser-advisories.py +++ b/scripts/test-browser-advisories.py @@ -133,9 +133,14 @@ def test_archive_file_hashes_and_exact_membership(self): sbom, _ = fixture() sbom['metadata']['component'] = {'version': '1.2.3'} sbom['metadata']['properties'].append({'name': 'pasturestack:archive-sha256', 'value': scan.digest(p.read_bytes())}) - sbom['components'] = [{'type': 'file', 'bom-ref': 'file:a', 'name': 'assets/a.js', + sbom['components'] = [{'type': 'file', 'bom-ref': 'file:assets/a.js', 'name': 'assets/a.js', 'hashes': [{'alg': 'SHA-256', 'content': scan.digest(data)}]}] self.assertEqual(scan.verify_archive(sbom, p)['verifiedFiles'], 1) + sbom['components'].append({'type': 'file', 'bom-ref': 'embedded-source:novnc:include/util.js', + 'name': 'vendor/novnc.js#include/util.js'}) + with self.assertRaisesRegex(ValueError, 'Unidentified embedded'): + scan.verify_archive(sbom, p) + sbom['components'].pop() sbom['components'][0]['hashes'][0]['content'] = '0' * 64 with self.assertRaisesRegex(ValueError, 'mismatch'): scan.verify_archive(sbom, p) diff --git a/scripts/test-ui-builder-boundary.py b/scripts/test-ui-builder-boundary.py index f3f3f7fe32..74dcd034c6 100644 --- a/scripts/test-ui-builder-boundary.py +++ b/scripts/test-ui-builder-boundary.py @@ -188,10 +188,13 @@ def test_double_build_schema_and_inventory_gates_precede_export(self): self.assertIn("npm audit --prefix tools/sbom-verifier --audit-level=low", script) self.assertIn("--verifier-root tools/sbom-verifier", script) self.assertIn('--verifier-manifest-sha256 "$verifier_manifest_sha" --verifier-lock-sha256 "$verifier_lock_sha"', script) - sbom_only = script.index('if [[ "$VALIDATION_SCOPE" = sbom ]]') + audit_gate = script.index('node scripts/check-ui-npm-audit.js --retain-evidence') for check in ["node --test scripts/test-ui-sbom.js scripts/test-ui-build-module-boundary.js scripts/test-ui-webpack-inventory.js", "python3 -B scripts/test-ui-builder-inventory.py", "python3 -B scripts/test-ui-builder-boundary.py"]: - self.assertLess(script.index(check), sbom_only) + self.assertLess(script.index(check), audit_gate) + self.assertIn('cp build/security-audit/npm-audit-raw.json "$output_dir/browser-build-npm-audit-raw.json"', script) + for name in ['browser-build-npm-audit-raw.json', 'browser-build-npm-audit-qualification.json', 'browser-sass-dependencies.json']: + self.assertIn(name, WORKFLOW.read_text(encoding='utf-8')) for digest in ["3e92dddbc30cf7f6a02b80f0942b1a4cfd4fb1c26f1dfc4310afa9d613cafb93", "baa9d3bd1ed57b6751b0887edead6b5063ff53ff7429cf85d476c6c94af0166e", "8bae002c25e723db7ee1f26afde680ae1a2b1a8f6b4b4b0fd65dc3becb090aae"]: self.assertIn(digest, script) diff --git a/scripts/test-ui-compiled-template-owner.cjs b/scripts/test-ui-compiled-template-owner.cjs new file mode 100644 index 0000000000..4775e82035 --- /dev/null +++ b/scripts/test-ui-compiled-template-owner.cjs @@ -0,0 +1,30 @@ +'use strict'; +const {test}=require('node:test'); +const assert=require('node:assert/strict'); +const path=require('node:path'); +const fs=require('node:fs'); +const os=require('node:os'); +const {resolve}=require('./resolve-compiled-template-owner.cjs'); +const root=path.resolve(__dirname,'..'); +const owners=[{target:'vendor/ember-cli-pagination',location:'node_modules/ember-cli-pagination'}, + {target:'vendor/lacsso',location:'node_modules/lacsso'}]; +const fixture=path.join(__dirname,'fixtures/browser-ownership/lacsso-page-numbers.js'); +test('actual published compiler output resolves the overriding addon without guessing',()=>{ + const result=resolve(root,'templates/components/page-numbers.js',owners,fixture); + assert.equal(result?.owner.location,'node_modules/lacsso'); + assert.match(result.compiledBlockSha256,/^[a-f0-9]{64}$/); +}); +test('a different or missing compiled block cannot select an owner',()=>{ + const directory=fs.mkdtempSync(path.join(os.tmpdir(),'pst-template-owner-')); + try { + const file=path.join(directory,'changed.js'); + for(const body of ['var block="different";', 'var ordinary="no template";']) { + fs.writeFileSync(file,body); + assert.equal(resolve(root,'templates/components/page-numbers.js',owners,file),null); + } + assert.equal(resolve(root,'components/arbitrary.js',owners,fixture),null); + }finally{ + assert.equal(path.dirname(path.resolve(directory)),path.resolve(os.tmpdir())); + fs.rmSync(directory,{recursive:true}); + } +}); diff --git a/scripts/test-ui-finalize-webpack-inventory.js b/scripts/test-ui-finalize-webpack-inventory.js index 458856a214..2794398995 100644 --- a/scripts/test-ui-finalize-webpack-inventory.js +++ b/scripts/test-ui-finalize-webpack-inventory.js @@ -9,6 +9,16 @@ const path = require('node:path'); const { finalize, STAGE } = require('./finalize-ui-webpack-inventory'); const hash = bytes => crypto.createHash('sha256').update(bytes).digest('hex'); +test('Sass final binding uses four actual CSS files and updates its opened file deterministically',()=>fixture(({root,inventory})=>{ + const file=path.join(root,'build/security-browser/sass-dependencies.json'); + fs.writeFileSync(file,JSON.stringify({schemaVersion:1,lockSha256:inventory.lockSha256,compilations:[]})); + const names=['ui-light.css','ui-light.rtl.css','ui-dark.css','ui-dark.rtl.css']; + for(const name of names)fs.writeFileSync(path.join(root,'dist/assets',name),name); + finalize(root);const first=fs.readFileSync(file),result=JSON.parse(first); + for(const name of names)assert.equal(result.finalAssetSHA256['assets/'+name],hash(name)); + assert.equal(result.finalProductionStage,STAGE);finalize(root);assert.deepEqual(fs.readFileSync(file),first); +})); + function fixture(run) { const root = fs.mkdtempSync(path.join(os.tmpdir(), 'ui-final-webpack-')); const file = path.join(root, 'build/security-browser/webpack-modules.json'); diff --git a/scripts/test-ui-minimatch-compat.js b/scripts/test-ui-minimatch-compat.js index 0b42a8ef57..c13e292c2f 100644 --- a/scripts/test-ui-minimatch-compat.js +++ b/scripts/test-ui-minimatch-compat.js @@ -53,7 +53,14 @@ test('all affected installed matcher nodes and direct edges use the verified sou edges++; } } - assert.ok(affected >= 9 && edges >= 9, 'the actual lock/edge closure must be exercised'); + assert.equal(affected,6,'the reviewed lock has six legacy matcher copies after removing Glob 9/10/13'); + assert.equal(edges,9,'all nine remaining direct edges to the six shared legacy matcher copies must be exercised'); + assert.deepEqual(proof.packages,[ + 'node_modules/@ember-tooling/blueprint-model/node_modules/minimatch', + 'node_modules/@ember/app-blueprint/node_modules/minimatch', + 'node_modules/broccoli-funnel/node_modules/minimatch', + 'node_modules/ember-cli-htmlbars/node_modules/walk-sync/node_modules/minimatch', + 'node_modules/ember-cli/node_modules/minimatch','node_modules/testem/node_modules/minimatch']); }); test('CommonJS and ESM retain matchOne, makeRe and RegExp set entries', async () => { @@ -111,24 +118,45 @@ test('the installed glob default wrapper uses the official raw entry and the bou const glob = require('glob'); assert.equal(glob.default, glob); assert.equal(glob.__esModule, undefined); - // glob 13 does not forward braceExpandMax. Observe the actual external - // class instead of claiming an unsupported glob option reaches minimatch. - const globMatcher = ownerRequire('glob-real')('minimatch').Minimatch; - const preprocessing = globMatcher.prototype.firstPhasePreProcess; - let calls = 0; - globMatcher.prototype.firstPhasePreProcess = function(...args) { - calls++; - return preprocessing.apply(this, args); - }; - try { new glob.Glob(pattern, { optimizationLevel: 2 }); } - finally { globMatcher.prototype.firstPhasePreProcess = preprocessing; } - assert.ok(calls > 0, 'the default wrapper must use the verified external matcher'); - assert.ok(require.cache[require.resolve('glob-real/raw')]); - assert.equal(require.cache[require.resolve('glob-real')], undefined, 'the embedded unpatched default bundle must not execute'); + assert.equal(require('glob/package.json').version,'14.0.6'); + const directory=path.dirname(require.resolve('glob/package.json')); + assert.ok(require.cache[path.join(directory,'dist/commonjs/index.js')]); + assert.equal(require.cache[path.join(directory,'dist/commonjs/index.min.js')],undefined,'opaque bundled dependencies must not execute'); + const globRequire=ownerRequire('glob'); + assert.equal(globRequire('minimatch/package.json').version,'11.0.10'); + assert.ok(require.cache[globRequire.resolve('minimatch')],'actual raw entry resolves its separately locked matcher'); fixture(directory => assert.deepEqual(glob.sync('**/*.js', { cwd: directory }) .map(value => value.replace(/\\/g, '/')).sort(), ['a.js', 'sub/c.js'])); }); +test('official escape fixes keep POSIX and Windows literals inside their intended boundary',async()=>{ + const esm=await import(pathToFileURL(path.join(path.dirname(matcherPath),'dist/esm/index.js')).href); + for(const implementation of [matcher,esm])for(const windowsPathsNoEscape of [false,true]) { + const options={windowsPathsNoEscape,magicalBraces:true}; + for(const input of ['!secret.txt','#notes.md','x{a,b}']) { + const escaped=implementation.escape(input,options); + assert.equal(implementation.minimatch(input,escaped,options),true); + assert.equal(implementation.minimatch('unrelated.txt',escaped,options),false); + assert.equal(implementation.unescape(escaped,options),input); + } + } + for(const implementation of [matcher,esm]) { + const escaped=implementation.escape('x\\*'); + assert.equal(implementation.minimatch('x\\*.js',escaped+'.{js,ts}',{platform:'linux'}),true); + assert.equal(implementation.minimatch('x\\anything.js',escaped+'.{js,ts}',{platform:'linux'}),false); + const proof=JSON.parse(fs.readFileSync(path.join(path.dirname(matcherPath),'backport.json'))); + assert.ok(proof.cves.includes('CVE-2026-140006')); + } +}); + +test('Glob ignore amplification and already-aborted traversal are rejected by the actual entry',()=>fixture(directory=>{ + const glob=require('glob'); + const hostile=Array.from({length:14},(_,i)=>`**/../x${i}/y${i}`).join('/'); + assert.throws(()=>glob.sync('*',{cwd:directory,ignore:[hostile],platform:'posix'}),/too many patterns|brace|expansion/i); + const controller=new AbortController();controller.abort(); + assert.throws(()=>glob.sync('**/*',{cwd:directory,signal:controller.signal}),/abort/i); +})); + test('walk-sync pruning and funnel string/RegExp filters retain their native behavior', () => fixture(directory => { const funnelRequire = ownerRequire('broccoli-funnel'); const walk = funnelRequire('walk-sync'); diff --git a/scripts/test-ui-novnc-composition.cjs b/scripts/test-ui-novnc-composition.cjs new file mode 100644 index 0000000000..aee0506b92 --- /dev/null +++ b/scripts/test-ui-novnc-composition.cjs @@ -0,0 +1,24 @@ +'use strict'; +const {test}=require('node:test'); +const assert=require('node:assert/strict'); +const fs=require('node:fs'); +const path=require('node:path'); +const {components}=require('./novnc-source-components.cjs'); +const root=path.resolve(__dirname,'..'); +const source=fs.readFileSync(path.join(root,'vendor/novnc.js'),'utf8'); +const provenance=JSON.parse(fs.readFileSync(path.join(root,'docs/security/browser-vendor-provenance.json'))); +test('all eleven actual embedded modules keep hashes, upstream identity and distinct license notices',()=>{ + const rows=components(source,provenance); + assert.equal(rows.length,11);assert.equal(new Set(rows.map(r=>r['bom-ref'])).size,11); + for(const row of rows){assert.match(row.hashes[0].content,/^[a-f0-9]{64}$/);assert.ok(row.licenses.length);} + assert.equal(rows.find(r=>r.name.endsWith('jsunzip.js')).licenses[0].expression,'Zlib'); + assert.ok(rows.find(r=>r.name.endsWith('des.js')).licenses[0].license.text.content); +}); +test('unknown, missing, duplicate and reordered source boundaries are rejected',()=>{ + for(const changed of [source.replace('// bower_components/no-vnc/include/util.js','// bower_components/no-vnc/include/unknown.js'), + source.replace('//End of bower_components/no-vnc/include/websock.js',''), + source+'\n//End of bower_components/no-vnc/include/util.js', + source.replace('// bower_components/no-vnc/include/util.js','// bower_components/no-vnc/include/webutil.js')]) { + assert.throws(()=>components(changed,provenance)); + } +}); diff --git a/scripts/test-ui-npm-audit.js b/scripts/test-ui-npm-audit.js index e15af60afe..9780f662db 100644 --- a/scripts/test-ui-npm-audit.js +++ b/scripts/test-ui-npm-audit.js @@ -14,6 +14,25 @@ const now = new Date(pending.reviewedAt); const reviewExpiry = new Date(pending.reviewUntil + 'T00:00:00Z'); const runAudit = (repoRoot, runner, platform = process.platform) => actualRunAudit(repoRoot, runner, platform, () => now); const dependencyCounts = { prod: 8, dev: 1454, optional: 18, peer: 1, peerOptional: 0, total: 1477 }; +test('lower-severity qualification binds every direct cause to verified source bytes without changing raw findings', () => { + const {qualifyLowerAdvisories} = require('./check-ui-npm-audit'); + const packages=['node_modules/ember-cli/node_modules/minimatch']; + const proof={status:'MINIMATCH_SOURCE_BACKPORT_VERIFIED',runtimePatch:false, + archiveSha256:'592383262d3b5b6ac09372dcdd4306e90df73b5112020fa92a0968d5e3c65ae9', + packages,cves:['CVE-2026-118764','CVE-2026-140006']}; + const audit={vulnerabilities:{minimatch:{severity:'moderate',nodes:packages,via:[{ + name:'minimatch',dependency:'minimatch',severity:'moderate', + url:'https://github.com/advisories/GHSA-c859-jr93-m5j4',range:'>=7.4.0 <=11.0.7'}]}}}; + const before=JSON.stringify(audit), qualified=qualifyLowerAdvisories(audit,lock,proof); + assert.equal(qualified.qualifiedMetaPackageCount,1);assert.equal(JSON.stringify(audit),before); + for(const alter of [p=>p.archiveSha256='0'.repeat(64),p=>p.packages=[],p=>p.runtimePatch=true]) { + const bad=clone(proof);alter(bad);assert.throws(()=>qualifyLowerAdvisories(audit,lock,bad)); + } + const unknown=clone(audit);unknown.vulnerabilities.minimatch.via[0].url='https://github.com/advisories/GHSA-aaaa-bbbb-cccc'; + assert.throws(()=>qualifyLowerAdvisories(unknown,lock,proof),/UNREGISTERED/); + const wrong=clone(audit);wrong.vulnerabilities.minimatch.nodes=['node_modules/minimatch']; + assert.throws(()=>qualifyLowerAdvisories(wrong,lock,proof),/UNREGISTERED/); +}); const knownVia = { braces: [{ source: 1240992, name: 'braces', dependency: 'braces', title: 'braces vulnerable to stack-exhaustion denial of service through deeply nested patterns', diff --git a/scripts/test-ui-sass-inventory.cjs b/scripts/test-ui-sass-inventory.cjs new file mode 100644 index 0000000000..55ba52ae53 --- /dev/null +++ b/scripts/test-ui-sass-inventory.cjs @@ -0,0 +1,38 @@ +'use strict'; +const {test}=require('node:test'); +const assert=require('node:assert/strict'); +const fs=require('node:fs'); +const os=require('node:os'); +const path=require('node:path'); +const sass=require('sass'); +const {trackedSass}=require('../lib/security-sass-inventory'); +function fixture(run) { + const root=fs.mkdtempSync(path.join(os.tmpdir(),'pst-sass-inventory-')); + try { + fs.mkdirSync(path.join(root,'app/styles'),{recursive:true});fs.mkdirSync(path.join(root,'tmp/merged'),{recursive:true}); + fs.writeFileSync(path.join(root,'package-lock.json'),'{}'); + fs.writeFileSync(path.join(root,'app/styles/_partial.scss'),'$color: #123456;'); + fs.writeFileSync(path.join(root,'app/styles/app-light.scss'),'@use "partial"; .test { color: partial.$color; }'); + for(const name of ['_partial.scss','app-light.scss'])fs.copyFileSync(path.join(root,'app/styles',name),path.join(root,'tmp/merged',name)); + return Promise.resolve(run(root)).finally(()=>{assert.equal(path.dirname(path.resolve(root)),path.resolve(os.tmpdir()));fs.rmSync(root,{recursive:true});}); + }catch(error){fs.rmSync(root,{recursive:true});throw error;} +} +test('real Dart Sass traces actual imports through a merged compiler input without changing CSS',()=>fixture(async root=>{ + const file=path.join(root,'tmp/merged/app-light.scss'); + const normal=await sass.compileAsync(file),observed=await trackedSass(sass,root).compileAsync(file); + assert.equal(observed.css,normal.css); + const record=JSON.parse(fs.readFileSync(path.join(root,'build/security-browser/sass-dependencies.json'))); + assert.deepEqual(record.compilations[0].sources.map(x=>x.path),['app/styles/_partial.scss','app/styles/app-light.scss']); + assert.ok(!JSON.stringify(record).includes(root)); +})); +test('ambiguous identical source owners are refused',()=>fixture(async root=>{ + fs.mkdirSync(path.join(root,'vendor'));fs.copyFileSync(path.join(root,'app/styles/_partial.scss'),path.join(root,'vendor/_partial.scss')); + await assert.rejects(trackedSass(sass,root).compileAsync(path.join(root,'tmp/merged/app-light.scss')),/one exact source owner/); +})); +test('legacy callback exceptions remain original and are never called twice',()=>fixture(root=>{ + const file=path.join(root,'app/styles/app-light.scss'),result={css:Buffer.from('css'),stats:{includedFiles:[file]}}; + const implementation={info:'fixture',render:(_,callback)=>callback(null,result)}; + let calls=0;const original=new Error('callback-original'); + assert.throws(()=>trackedSass(implementation,root).render({file},()=>{calls++;throw original;}),error=>error===original); + assert.equal(calls,1); +})); diff --git a/scripts/test-ui-sbom.js b/scripts/test-ui-sbom.js index 4c4a17a084..5986b99baf 100644 --- a/scripts/test-ui-sbom.js +++ b/scripts/test-ui-sbom.js @@ -136,6 +136,47 @@ function checkGraph(bom) { } } +function tracedFixture(f) { + delete f.manifest.components[1].coverage; + f.manifest.components[1].advisoryCoverage='No automated advisory index for this font'; + write(f.root,'docs/security/ui-vendor-components.json',f.manifest); + f.webpack.modules=f.webpack.modules.filter(s=>s!==''); + f.webpack.assetModules['runtime.js']=f.webpack.modules; + write(f.root,'build/security-browser/webpack-modules.json',f.webpack); + const compilations=['app-light.scss','app-dark.scss'].map(entry=>{ + const file='app/styles/'+entry;write(f.root,file,'body { color: black; }'); + return {entry,cssSha256:digest('body { color: black; }'),sources:[{path:file,sha256:sourceHash(path.join(f.root,file))}]}; + }); + const css=['assets/ui-dark.css','assets/ui-dark.rtl.css','assets/ui-light.css','assets/ui-light.rtl.css']; + for(const name of css) {f.files[name]='body { color: black; }';write(f.root,'dist/'+name,f.files[name]);} + const trace={schemaVersion:1,lockSha256:f.webpack.lockSha256,compilations, + finalProductionStage:'ember-production-post-processing-before-packaging', + finalAssetSHA256:Object.fromEntries(css.map(name=>[name,digest(f.files[name])]))}; + f.options.sassInventory=path.join(f.root,'build/security-browser/sass-dependencies.json'); + write(f.root,'build/security-browser/sass-dependencies.json',trace);repack(f);return trace; +} + +test('actual Sass and identified module inputs close inventory while retaining advisory index boundaries',f=>{ + tracedFixture(f);const out=generate(f.options),bom=out['runtime.cdx.json']; + assert.equal(out['artifact-manifest.json'].coverage,'complete');assert.equal(bom.compositions[0].aggregate,'complete'); + assert.ok(out['artifact-manifest.json'].inventory.sassSha256); + assert.ok(bom.components.find(c=>c['bom-ref']==='vendor:font').properties.some(p=>p.name==='pasturestack:advisory-index-limitation')); +}); +test('actual Sass source and final output changes cannot be accepted as complete inventory',f=>{ + const trace=tracedFixture(f);trace.finalAssetSHA256['assets/ui-light.css']='0'.repeat(64); + write(f.root,'build/security-browser/sass-dependencies.json',trace); + assert.throws(()=>generate(f.options),/Delivered CSS/); + trace.finalAssetSHA256['assets/ui-light.css']=digest(f.files['assets/ui-light.css']); + trace.compilations[0].sources[0].sha256='0'.repeat(64); + write(f.root,'build/security-browser/sass-dependencies.json',trace); + assert.throws(()=>generate(f.options),/Sass dependency changed/); +}); +test('unknown generated Webpack identity fails instead of becoming first-party',f=>{ + f.webpack.assetModules['runtime.js'].push('generated:entry/unknown.cjs'); + write(f.root,'build/security-browser/webpack-modules.json',f.webpack); + assert.throws(()=>generate(f.options),/Unknown generated Webpack/); +}); + test('runtime uses observed npm including dev, nested namespace, alias, vendor and font', f => { const output = generate(f.options), runtime = output['runtime.cdx.json'], build = output['build.cdx.json']; const npm = runtime.components.filter(c => c['bom-ref'].startsWith('npm:')); diff --git a/scripts/test-ui-terser-security.cjs b/scripts/test-ui-terser-security.cjs new file mode 100644 index 0000000000..a2076d9a9f --- /dev/null +++ b/scripts/test-ui-terser-security.cjs @@ -0,0 +1,20 @@ +'use strict'; +const {test}=require('node:test'); +const assert=require('node:assert/strict'); +const vm=require('node:vm'); +const {minify}=require('terser'); +test('input source content is not copied when includeSources is false',async()=>{ + assert.equal(require('terser/package.json').version,'5.51.3'); + const marker='private-source-regression-marker'; + const content={version:3,file:'input.js',sources:['original.js'],sourcesContent:['/* '+marker+' */\nanswer=42;'],names:[],mappings:'AAAA'}; + const result=await minify({'input.js':'answer=42;'}, {sourceMap:{content,includeSources:false}}); + const map=JSON.parse(result.map); + assert.ok(!map.sourcesContent||map.sourcesContent.every(v=>v==null)); + assert.ok(!result.map.includes(marker)); + const context={};vm.runInNewContext(result.code,context);assert.equal(context.answer,42); +}); +test('explicit source inclusion and ordinary minification remain supported',async()=>{ + const result=await minify({'source.js':'answer=6*7;'}, {sourceMap:{includeSources:true}}); + assert.deepEqual(JSON.parse(result.map).sourcesContent,['answer=6*7;']); + const context={};vm.runInNewContext(result.code,context);assert.equal(context.answer,42); +}); diff --git a/scripts/test-ui-webpack-inventory.js b/scripts/test-ui-webpack-inventory.js index ce5acdc215..3ecdbf97a7 100644 --- a/scripts/test-ui-webpack-inventory.js +++ b/scripts/test-ui-webpack-inventory.js @@ -3,6 +3,7 @@ const {test} = require('node:test'); const assert = require('node:assert/strict'); const crypto = require('node:crypto'); +const fs=require('node:fs'),os=require('node:os'),path=require('node:path'); const {collectInventory} = require('../lib/security-module-inventory-webpack-plugin'); function fixture() { @@ -20,10 +21,25 @@ function fixture() { return {compilation, bytes}; } +test('generated entry is bound to an actual declared entry and hash; unknown sources fail',()=>{ + const root=fs.mkdtempSync(path.join(os.tmpdir(),'webpack-entry-test-')); + try { + const file=path.join(root,'app.cjs');fs.writeFileSync(file,'module.exports = {};'); + const {compilation}=fixture(),module={resource:file}; + compilation.modules.push(module);compilation.chunks[0].selected.push(module); + assert.throws(()=>collectInventory(compilation),/Unknown non-package/); + const inventory=collectInventory(compilation,[file]); + assert.equal(inventory.generatedSources['generated:entry/app.cjs'].owner,'ember-auto-import'); + assert.equal(inventory.generatedSources['generated:entry/app.cjs'].sha256, + crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex')); + assert.ok(inventory.assetModules['assets/chunk.main.js'].includes('generated:entry/app.cjs')); + } finally {fs.rmSync(root,{recursive:true});} +}); + test('per-asset modules exclude other chunks and orphans without weakening all-module security inventory', () => { const {compilation, bytes} = fixture(), inventory = collectInventory(compilation); - assert.deepEqual(inventory.assetModules['assets/chunk.main.js'], ['node_modules/nested/index.js', 'node_modules/runtime/index.js']); - assert.deepEqual(inventory.assetModules['assets/chunk.test.js'], ['node_modules/test-only/index.js']); + assert.deepEqual(inventory.assetModules['assets/chunk.main.js'], ['generated:webpack-runtime/assets/chunk.main.js','node_modules/nested/index.js', 'node_modules/runtime/index.js']); + assert.deepEqual(inventory.assetModules['assets/chunk.test.js'], ['generated:webpack-runtime/assets/chunk.test.js','node_modules/test-only/index.js']); assert.ok(inventory.modules.includes('node_modules/unreachable/index.js')); for (const [file, content] of Object.entries(bytes)) { assert.equal(inventory.assetSHA256[file], crypto.createHash('sha256').update(content).digest('hex')); diff --git a/vendor/minimatch-security-backport/UPSTREAM.md b/vendor/minimatch-security-backport/UPSTREAM.md index da92de911e..29281538d3 100644 --- a/vendor/minimatch-security-backport/UPSTREAM.md +++ b/vendor/minimatch-security-backport/UPSTREAM.md @@ -1,4 +1,14 @@ -# Official minimatch preprocessing security backport +# Official minimatch security backports + +Revision `10.2.6-pasturestack.2` also carries the official escape/unescape and +brace-preservation fix for CVE-2026-140006 from commit +`784603e09641970d2ba2caf8c73a95d1015cc67d` (minimatch 11.0.8). The original npm +archive has SHA256 `1dc838a033c6105308d3d49c1881f9304b2b6821683dfe4815c37f8e19e7956a`. +The only adaptation maps version 11's private allow-Windows-escape symbol to +version 10's existing public `allowWindowsEscape` option. Eight stale source +maps are omitted; all three changed TypeScript sources and exact file hashes +are retained. The original npm name/version remain visible in the installed +lock and SBOM, with separate exact backport qualification for both CVEs. This source-packaged dependency preserves the minimatch 10.2.6 matcher API and applies the preprocessing fix released in minimatch 11.0.1 for @@ -13,7 +23,7 @@ The signed upstream fix tag resolves to commit `47afe882784638ccdee8d30e0b7516aed2b589a9`; the retained `src/index.ts` from that commit has SHA256 `eff2f23257708f4bd102cf94d746c8f26f5887e993e6de0f3c139bdae924c37b`. -Only the official three security changes are backported: the existing +The original preprocessing fix is also retained: the existing `braceExpandMax` bounds `**/..` preprocessing expansion, and sets above 1000 rows skip the redundant pairwise optimization. No custom limit or matcher is introduced. CommonJS and ESM distributions receive the same fix. `matchOne`, @@ -21,15 +31,15 @@ introduced. CommonJS and ESM distributions receive the same fix. `matchOne`, upstream distribution files retain their existing API/behavior. Patched index JavaScript is not misrepresented as a fresh TypeScript build. -The four upstream index source maps are omitted, their references are removed, +The affected upstream source maps are omitted, their references are removed, and the patched TypeScript source plus file hashes are included for review. The original license is retained. Reproduce/check the immutable archive with `python scripts/build-minimatch-security-backport.py --build` (creation only) or without `--build` (read-only byte-for-byte verification). -The reviewed glob CommonJS wrapper uses the official `glob-real/raw` export so -its matcher resolves to this dependency. glob 13's unused default bundle still -contains its original embedded matcher; it is not claimed to be patched or -removed. The focused dependency/entry guard rejects first-party default imports +The reviewed glob 14 CommonJS wrapper uses the official `glob-real/raw` export +with its separately locked official minimatch 11 dependency. Legacy build +callers retain this version 10 API. The upstream default bundle is not used. +The focused dependency/entry guard rejects first-party default imports that would bypass the reviewed raw route. Raw vulnerability reports remain separate from this exact-artifact backport qualification. diff --git a/vendor/minimatch-security-backport/minimatch-10.2.6-pasturestack.2.tgz b/vendor/minimatch-security-backport/minimatch-10.2.6-pasturestack.2.tgz new file mode 100644 index 0000000000..469ee0f146 Binary files /dev/null and b/vendor/minimatch-security-backport/minimatch-10.2.6-pasturestack.2.tgz differ diff --git a/vendor/minimatch-security-backport/upstream-minimatch-11.0.8.tgz b/vendor/minimatch-security-backport/upstream-minimatch-11.0.8.tgz new file mode 100644 index 0000000000..18d171e94f Binary files /dev/null and b/vendor/minimatch-security-backport/upstream-minimatch-11.0.8.tgz differ