diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 16cd1c3a00..a2f6e3c3b2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -29,8 +29,6 @@ updates: versions: [ '>=0.9.0' ] - dependency-name: 'bootstrap' versions: [ '>=5.0.0' ] - - dependency-name: 'cbor' - versions: [ '>=10.0.0' ] - dependency-name: 'eslint' versions: [ '>=10.0.0' ] - dependency-name: 'eslint-plugin-jsdoc' diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f3c6f711dd..75f1e43b7a 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -15,13 +15,19 @@ jobs: contents: write pages: write runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # Node 24 is the officially supported version; Node 26 is tested + # ahead of it becoming the active LTS release (see #2397) + node-version: [24, 26] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set node version uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - node-version: 24 + node-version: ${{ matrix.node-version }} registry-url: "https://registry.npmjs.org" - name: Install @@ -59,11 +65,11 @@ jobs: xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui - name: Prepare for GitHub Pages - if: success() + if: success() && matrix.node-version == 24 run: npx grunt copy:ghPages - name: Deploy to GitHub Pages - if: success() && github.ref == 'refs/heads/master' + if: success() && github.ref == 'refs/heads/master' && matrix.node-version == 24 uses: crazy-max/ghaction-github-pages@1d6ee9b181a81033a16bd707a1401afa978daab4 # v5.0.0 with: target_branch: gh-pages diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index 5ee2708650..ac9e39a2eb 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -11,13 +11,19 @@ on: jobs: main: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + # Node 24 is the officially supported version; Node 26 is tested + # ahead of it becoming the active LTS release (see #2397) + node-version: [24, 26] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set node version uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - node-version: 24 + node-version: ${{ matrix.node-version }} registry-url: "https://registry.npmjs.org" - name: Install @@ -38,7 +44,7 @@ jobs: run: npx grunt prod - name: Upload Build Artefact - if: success() + if: success() && matrix.node-version == 24 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: zipped-build diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index c4f4e45876..7e472d7531 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -77,7 +77,7 @@ jobs: type=semver,pattern={{version}} - name: Log in to GHCR - uses: docker/login-action@371161bbe7024a29a25c5e19bfcbc0804fe9ad2c # v4.5.2 + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 with: registry: ${{ env.REGISTRY }} username: ${{ env.REGISTRY_USER }} diff --git a/AGENTS.md b/AGENTS.md index 6459055aa5..4b332e12d4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,7 +13,7 @@ Core principles for changes: ## Commands -CyberChef expects Node.js `>=24 <25`. +CyberChef expects Node.js `>=24 <27` (v24 is the officially supported version; v26 is also tested). - Install: `npm install` - Development server: `npm start` diff --git a/Dockerfile b/Dockerfile index e7076f4278..24029b3087 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # Modifier --platform=$BUILDPLATFORM limits the platform to "BUILDPLATFORM" during buildx multi-platform builds # This is because npm "chromedriver" package is not compatiable with all platforms # For more info see: https://docs.docker.com/build/building/multi-platform/#cross-compilation -FROM --platform=$BUILDPLATFORM node:24-alpine@sha256:a0b9bf06e4e6193cf7a0f58816cc935ff8c2a908f81e6f1a95432d679c54fbfd AS builder +FROM --platform=$BUILDPLATFORM node:24-alpine@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43 AS builder WORKDIR /app diff --git a/README.md b/README.md index c1e41c30a3..4a2969a685 100755 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ CyberChef is built to support ## Node.js support -CyberChef is built to fully support Node.js `v24`. For more information, see the ["Node API" wiki page](https://github.com/gchq/CyberChef/wiki/Node-API). +CyberChef is built to fully support Node.js `v24` and is also tested against Node.js `v26` ahead of it becoming the active LTS release. For more information, see the ["Node API" wiki page](https://github.com/gchq/CyberChef/wiki/Node-API) ## Security diff --git a/package-lock.json b/package-lock.json index eabf953c3c..a7c1fd5f6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,9 +13,9 @@ "@alexaltea/capstone-js": "^3.0.5", "@astronautlabs/amf": "^0.0.6", "@blu3r4y/lzma": "^2.3.3", - "@noble/hashes": "2.2.0", + "@noble/hashes": "2.3.0", "@wavesenterprise/crypto-gost-js": "^2.1.0-RC1", - "@xmldom/xmldom": "^0.8.13", + "@xmldom/xmldom": "^0.8.14", "argon2-browser": "^1.18.0", "arrive": "^2.5.3", "assert": "^2.1.0", @@ -27,9 +27,9 @@ "bootstrap-colorpicker": "^3.4.0", "bootstrap-material-design": "^4.1.3", "browserify-zlib": "^0.2.0", - "bson": "^7.3.1", + "bson": "^7.3.2", "buffer": "^6.0.3", - "cbor": "10.0.12", + "cbor2": "2.3.0", "chi-squared": "^1.1.0", "codepage": "^1.15.0", "crypto-api": "^0.8.5", @@ -50,22 +50,22 @@ "flat": "^6.0.1", "geodesy": "1.1.3", "handlebars": "^4.7.9", - "highlight.js": "^11.11.1", + "highlight.js": "^11.12.0", "ieee754": "^1.2.1", "jimp": "1.6.0", "jq-web": "^0.5.1", "jquery": "3.7.1", "js-ascon": "^1.3.0", - "js-sha3": "^0.12.0", - "js-yaml": "^5.2.3", + "js-sha3": "^0.13.0", + "js-yaml": "^5.3.0", "jsesc": "^3.1.0", "json5": "^2.2.3", "jsonata": "^2.2.2", "jsonpath-plus": "^10.4.0", "jsonwebtoken": "9.0.3", "jsqr": "^1.4.0", - "jsrsasign": "^11.1.3", - "kbpgp": "^2.1.17", + "jsrsasign": "^11.1.5", + "kbpgp": "^2.1.18", "libbzip2-wasm": "0.0.4", "libyara-wasm": "^1.2.1", "lodash": "^4.18.1", @@ -87,7 +87,7 @@ "path": "^0.12.7", "popper.js": "^1.16.1", "process": "^0.11.10", - "protobufjs": "^8.7.1", + "protobufjs": "^8.7.2", "punycode.js": "^2.3.1", "qr-image": "^3.2.0", "reflect-metadata": "^0.2.2", @@ -120,8 +120,8 @@ "@codemirror/language": "^6.12.4", "@codemirror/search": "^6.7.1", "@codemirror/state": "^6.7.1", - "@codemirror/view": "^6.43.7", - "@puppeteer/browsers": "3.0.6", + "@codemirror/view": "^6.43.8", + "@puppeteer/browsers": "3.2.0", "autoprefixer": "^10.5.4", "babel-loader": "^10.1.1", "base64-loader": "^1.0.0", @@ -130,13 +130,13 @@ "colors": "^1.4.0", "compression-webpack-plugin": "^12.0.0", "copy-webpack-plugin": "^14.0.0", - "core-js": "^3.49.0", + "core-js": "^3.50.0", "cspell": "^10.0.1", "css-loader": "^7.1.4", "eslint": "^9.39.5", "eslint-plugin-jsdoc": "^50.8.0", "glob": "^13.0.6", - "globals": "^17.9.0", + "globals": "^17.11.0", "grunt": "^1.6.3", "grunt-chmod": "~1.1.1", "grunt-concurrent": "^3.0.0", @@ -153,13 +153,13 @@ "mini-css-extract-plugin": "2.10.2", "modify-source-webpack-plugin": "^4.1.0", "nightwatch": "^3.16.0", - "postcss": "^8.5.25", + "postcss": "^8.5.26", "postcss-css-variables": "^0.19.0", - "postcss-import": "^16.1.1", + "postcss-import": "^16.2.0", "postcss-loader": "^8.2.1", "prompt": "^1.3.0", "sitemap": "^9.0.1", - "terser": "^5.49.0", + "terser": "^5.50.0", "webpack": "^5.109.2", "webpack-bundle-analyzer": "^5.3.1", "webpack-dev-server": "^5.2.6", @@ -167,7 +167,7 @@ "worker-loader": "^3.0.8" }, "engines": { - "node": ">=24 <25" + "node": ">=24 <27" } }, "node_modules/@alexaltea/capstone-js": { @@ -1901,9 +1901,9 @@ } }, "node_modules/@codemirror/view": { - "version": "6.43.7", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.7.tgz", - "integrity": "sha512-FZsExxkoxnAN+d9TgqXLg5g4A1oQwzX9WlkOT5i2PKkcW7xx3Bmu0vs90g6fo9Mpdsb/l96dnAraQ8932aO4/g==", + "version": "6.43.8", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.8.tgz", + "integrity": "sha512-qtItTDssZ/5GFfi94hrILu9j/VUeFPDPkhovEfmWFj2ipTxnzPB8DdHgfbb8HYTzLTYhrndKmyQxXUz/PDLenw==", "dev": true, "license": "MIT", "dependencies": { @@ -2667,6 +2667,15 @@ "node": ">=18" } }, + "node_modules/@cto.af/wtf8": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.5.tgz", + "integrity": "sha512-LfUFi+Vv4eDzj+XAtR89e3wwjXA/NZjUSwU5NhwbBrLecxPaBYFy3exCuc1j+D4UZeOVdqlsl8G7LmOt18V0tg==", + "license": "MIT", + "engines": { + "node": ">=20" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz", @@ -4265,9 +4274,9 @@ } }, "node_modules/@noble/hashes": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz", - "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.3.0.tgz", + "integrity": "sha512-oN+QwyX7VSHotibwubG3kpzbwKrfnyR6OOO+3Nk/53ADL7FmgHHz4TgrbaYKvvOw09u6QTx0oiH1cNCIOuN0CQ==", "license": "MIT", "engines": { "node": ">= 20.19.0" @@ -4443,13 +4452,13 @@ "license": "MIT" }, "node_modules/@puppeteer/browsers": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.0.6.tgz", - "integrity": "sha512-B/gKoqlFkzhvzsI6jo9K1cZz9o5ypviVv/xu8CwA4grZzyVwN+XfkT+tu8T1zrauuEXv6VhS2oGX+6NL95WcKA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.2.0.tgz", + "integrity": "sha512-LlBrE8oqGfU7b1Nk2d5Q1SbuPhZxTj0cJEMDPEws28OjNMELlflekmPPuf4FnK03x0ZRjKaYwJElUcKK4kyqJA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "modern-tar": "^0.7.6", + "modern-tar": "^0.8.0", "yargs": "^18.0.0" }, "bin": { @@ -5049,9 +5058,9 @@ } }, "node_modules/@xmldom/xmldom": { - "version": "0.8.13", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.13.tgz", - "integrity": "sha512-KRYzxepc14G/CEpEGc3Yn+JKaAeT63smlDr+vjB8jRfgTBBI9wRj/nkQEO+ucV8p8I9bfKLWp37uHgFrbntPvw==", + "version": "0.8.14", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.14.tgz", + "integrity": "sha512-T4EDRUBVZYRldYApjEJiU0e1stYWaRAX7CuSnKzrpwdZKo53zGV8/pqfzV6FfwNl9YThD2OumQYvqtvjvgG7aQ==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -6444,9 +6453,9 @@ } }, "node_modules/bson": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/bson/-/bson-7.3.1.tgz", - "integrity": "sha512-h/C0qe6857pQhcSJHLfsR1uYGj98Ge3wKAD3Ed9KqH3wcVh+BM4Jq4xISD7vs9OPuT07n+q3QQVjslJ286j6ag==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/bson/-/bson-7.3.2.tgz", + "integrity": "sha512-1w0ra+ho1cuE+w8jzwgzTFIimFtCfZeCoOsvIPQg6uyFCsp8M29U7bNNf5GrFh88TXbYg1g3TyKUGpd6O7q6zA==", "license": "Apache-2.0", "engines": { "node": ">=20.19.0" @@ -6645,13 +6654,13 @@ ], "license": "CC-BY-4.0" }, - "node_modules/cbor": { - "version": "10.0.12", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-10.0.12.tgz", - "integrity": "sha512-exQDevYd7ZQLP4moMQcZkKCVZsXLAtUSflObr3xTh4xzFIv/xBCdvCd6L259kQOUP2kcTC0jvC6PpZIf/WmRXA==", + "node_modules/cbor2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cbor2/-/cbor2-2.3.0.tgz", + "integrity": "sha512-76WB3hq8BoaGkMkBVJ27fW5LJU+qqDLEpgRNCG/SYKhODWXpVPOTD4UcUto3IEzYLA52nsvbhb0wabhHDn3qXg==", "license": "MIT", "dependencies": { - "nofilter": "^3.0.2" + "@cto.af/wtf8": "0.0.5" }, "engines": { "node": ">=20" @@ -7308,12 +7317,15 @@ } }, "node_modules/core-js": { - "version": "3.49.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.49.0.tgz", - "integrity": "sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==", + "version": "3.50.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.50.0.tgz", + "integrity": "sha512-BRWgOLKkFeCgRudR6zrs8p9XJZcE14grzKMMssoYrk6krtuEZ7MTKPIY5RzOnqsEKIR9kst7wNzphttraT+Yqw==", "dev": true, "hasInstallScript": true, "license": "MIT", + "engines": { + "node": "*" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" @@ -10451,9 +10463,9 @@ } }, "node_modules/globals": { - "version": "17.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.9.0.tgz", - "integrity": "sha512-m/MvAW61QVU5VDNF1Vj8axt016h8w7L5TU1e9zlab7XIttAT2YAlCwl75K1fOqvMM9apmD7lbCIRhpfkhmxhCg==", + "version": "17.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.11.0.tgz", + "integrity": "sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==", "dev": true, "license": "MIT", "engines": { @@ -11188,9 +11200,9 @@ } }, "node_modules/highlight.js": { - "version": "11.11.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", - "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.12.0.tgz", + "integrity": "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==", "license": "BSD-3-Clause", "engines": { "node": ">=12.0.0" @@ -12523,9 +12535,9 @@ } }, "node_modules/js-sha3": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.12.0.tgz", - "integrity": "sha512-DGaUQKtsHeqChRD6ndGcESOBXUBQs5/ji4xyyoAgdqBsAu5yHsVTrzuF7MZ0VQTAa/IQFXOq0WmV2I1HNuzPtA==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.13.0.tgz", + "integrity": "sha512-v2qy9Guw8XMOYFauObtG1kXLfut7AcSRgBP2rq4R14gVFAO2fW5kjcHcPWkA2IUDbY0cGGZypDMUuP/kkbvNGw==", "license": "MIT" }, "node_modules/js-tokens": { @@ -12536,9 +12548,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.3.tgz", - "integrity": "sha512-n+mUVyUX5bVv7G/G2zyIHOhdxfuU1dY2NOFzTQUWiMUbFss8b57NFlgCCaggU78wSw5KVS9cllzeLyzyR+n5nw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.3.0.tgz", + "integrity": "sha512-muutsYr+e2+d3rTgUGslq5rxbBlUy3cJ61IsHag2QNDQV+7zXWjkUpmALIajhrlLlrgRUiymj6U3zUr/TMK84Q==", "funding": [ { "type": "github", @@ -12737,9 +12749,10 @@ "license": "Apache-2.0" }, "node_modules/jsrsasign": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-11.1.3.tgz", - "integrity": "sha512-nPnK5D/4lv0Dwr7TlzrKtAd8JlLZwFTqTUUB3NQCbtdobcRcohGFxjbPySDVh74iWUudcCsapYT6OxoyhJLhhA==", + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-11.1.5.tgz", + "integrity": "sha512-i6mAjey0/4UQmlOaNS2vROl8EkWV8Ei436reJAby2OPQ3lF6uXSs1VYpnM8hndmmCMFIzNc04Uw2GF+0JVLFbg==", + "deprecated": "This package is no longer maintained.", "license": "MIT" }, "node_modules/jszip": { @@ -12777,9 +12790,9 @@ } }, "node_modules/kbpgp": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/kbpgp/-/kbpgp-2.1.17.tgz", - "integrity": "sha512-pnjH7amyg6dZLXyF42BKbCTST0l0r1ErunqtFRrJCkHkGJb83cZZmx1pnqNFr+d/ls+5gvcHrZLPfUG5q7oRYw==", + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/kbpgp/-/kbpgp-2.1.18.tgz", + "integrity": "sha512-kbvGTlBMkGc+nK5dm1FXW1QVI4e9CIchLY2B9fgLjKwtdZ9OHXwJxvutSBxSJ0nzerAstdxahg7VD1EwmT4gYA==", "license": "BSD-3-Clause", "dependencies": { "bn": "^1.0.5", @@ -13705,9 +13718,9 @@ } }, "node_modules/modern-tar": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.7.6.tgz", - "integrity": "sha512-sweCIVXzx1aIGTCdzcMlSZt1h8k5Tmk08VNAuRk3IU28XamGiOH5ypi11g6De2CH7PhYqSSnGy2A/EFhbWnVKg==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.8.4.tgz", + "integrity": "sha512-gN54ddmyzEg10orwZ2u4OOv+bjpMWdIl5jIkodK97bMq8QBSL5c0D7YX0lT1Ooz+99S7+PvFbnxzdjgHo1r41g==", "dev": true, "license": "MIT", "engines": { @@ -13852,9 +13865,9 @@ "license": "ISC" }, "node_modules/nanoid": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", - "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "dev": true, "funding": [ { @@ -14202,15 +14215,6 @@ "integrity": "sha512-qhfYgpoCSi37HLiViMlf94YqMQdvk3n3arI1uGbAWZK9NKCYRSI42W8lATeGloYGLYxb8us1C5rTvtsXjwdWQg==", "license": "ISC" }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", - "license": "MIT", - "engines": { - "node": ">=12.19" - } - }, "node_modules/nopt": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", @@ -14602,6 +14606,18 @@ "url": "https://github.com/hectorm/otpauth?sponsor=1" } }, + "node_modules/otpauth/node_modules/@noble/hashes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz", + "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -15222,9 +15238,9 @@ } }, "node_modules/postcss": { - "version": "8.5.25", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.25.tgz", - "integrity": "sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==", + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", "dev": true, "funding": [ { @@ -15242,7 +15258,7 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.16", + "nanoid": "^3.3.17", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, @@ -15276,9 +15292,9 @@ } }, "node_modules/postcss-import": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-16.1.1.tgz", - "integrity": "sha512-2xVS1NCZAfjtVdvXiyegxzJ447GyqCeEI5V7ApgQVOWnros1p5lGNovJNapwPpMombyFBfqDwt7AD3n2l0KOfQ==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-16.2.0.tgz", + "integrity": "sha512-0mQUGlSp87Zl70K58RNwQAN1WS9plFE6KWGui9nyK6ninduMyjW/Khaoy/BpBoFTBh7ndAvAKrSKVbwy6vd/BA==", "dev": true, "license": "MIT", "dependencies": { @@ -15491,9 +15507,9 @@ "license": "MIT" }, "node_modules/protobufjs": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-8.7.1.tgz", - "integrity": "sha512-agdGHrXNTv0IrYscJPDou/PlEJk1c/hBZ9o/B5NH2i/nSPtPqacNxzgwf1CebXxFMjMrZH5sqv9uQuw96aGt/A==", + "version": "8.7.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-8.7.2.tgz", + "integrity": "sha512-oTVHV+oelUBtiu5iTuTNNZ0eLYsXSMxry4cgr30mayNkgIZL6qZ0IOQVPuSWGcyAaXKl/XgqwWHIC3a0khYVBA==", "license": "BSD-3-Clause", "dependencies": { "long": "^5.3.2" @@ -17541,9 +17557,9 @@ "license": "MIT" }, "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.50.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.50.0.tgz", + "integrity": "sha512-CN9BVxWhgS/hRxtUMjtC2uRWSTcSfQFHMDWma6sKKfIivCD91sM+FOPfvwoaRMqCSrUpe1nv3jDamd9eEQ4y+w==", "dev": true, "license": "BSD-2-Clause", "dependencies": { diff --git a/package.json b/package.json index 8cd81c9e4b..fbd2cc60b6 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "@codemirror/language": "^6.12.4", "@codemirror/search": "^6.7.1", "@codemirror/state": "^6.7.1", - "@codemirror/view": "^6.43.7", - "@puppeteer/browsers": "3.0.6", + "@codemirror/view": "^6.43.8", + "@puppeteer/browsers": "3.2.0", "autoprefixer": "^10.5.4", "babel-loader": "^10.1.1", "base64-loader": "^1.0.0", @@ -58,13 +58,13 @@ "colors": "^1.4.0", "compression-webpack-plugin": "^12.0.0", "copy-webpack-plugin": "^14.0.0", - "core-js": "^3.49.0", + "core-js": "^3.50.0", "cspell": "^10.0.1", "css-loader": "^7.1.4", "eslint": "^9.39.5", "eslint-plugin-jsdoc": "^50.8.0", "glob": "^13.0.6", - "globals": "^17.9.0", + "globals": "^17.11.0", "grunt": "^1.6.3", "grunt-chmod": "~1.1.1", "grunt-concurrent": "^3.0.0", @@ -81,13 +81,13 @@ "mini-css-extract-plugin": "2.10.2", "modify-source-webpack-plugin": "^4.1.0", "nightwatch": "^3.16.0", - "postcss": "^8.5.25", + "postcss": "^8.5.26", "postcss-css-variables": "^0.19.0", - "postcss-import": "^16.1.1", + "postcss-import": "^16.2.0", "postcss-loader": "^8.2.1", "prompt": "^1.3.0", "sitemap": "^9.0.1", - "terser": "^5.49.0", + "terser": "^5.50.0", "webpack": "^5.109.2", "webpack-bundle-analyzer": "^5.3.1", "webpack-dev-server": "^5.2.6", @@ -98,9 +98,9 @@ "@alexaltea/capstone-js": "^3.0.5", "@astronautlabs/amf": "^0.0.6", "@blu3r4y/lzma": "^2.3.3", - "@noble/hashes": "2.2.0", + "@noble/hashes": "2.3.0", "@wavesenterprise/crypto-gost-js": "^2.1.0-RC1", - "@xmldom/xmldom": "^0.8.13", + "@xmldom/xmldom": "^0.8.14", "argon2-browser": "^1.18.0", "arrive": "^2.5.3", "assert": "^2.1.0", @@ -112,9 +112,9 @@ "bootstrap-colorpicker": "^3.4.0", "bootstrap-material-design": "^4.1.3", "browserify-zlib": "^0.2.0", - "bson": "^7.3.1", + "bson": "^7.3.2", "buffer": "^6.0.3", - "cbor": "10.0.12", + "cbor2": "2.3.0", "chi-squared": "^1.1.0", "codepage": "^1.15.0", "crypto-api": "^0.8.5", @@ -135,22 +135,22 @@ "flat": "^6.0.1", "geodesy": "1.1.3", "handlebars": "^4.7.9", - "highlight.js": "^11.11.1", + "highlight.js": "^11.12.0", "ieee754": "^1.2.1", "jimp": "1.6.0", "jq-web": "^0.5.1", "jquery": "3.7.1", "js-ascon": "^1.3.0", - "js-sha3": "^0.12.0", - "js-yaml": "^5.2.3", + "js-sha3": "^0.13.0", + "js-yaml": "^5.3.0", "jsesc": "^3.1.0", "json5": "^2.2.3", "jsonata": "^2.2.2", "jsonpath-plus": "^10.4.0", "jsonwebtoken": "9.0.3", "jsqr": "^1.4.0", - "jsrsasign": "^11.1.3", - "kbpgp": "^2.1.17", + "jsrsasign": "^11.1.5", + "kbpgp": "^2.1.18", "libbzip2-wasm": "0.0.4", "libyara-wasm": "^1.2.1", "lodash": "^4.18.1", @@ -172,7 +172,7 @@ "path": "^0.12.7", "popper.js": "^1.16.1", "process": "^0.11.10", - "protobufjs": "^8.7.1", + "protobufjs": "^8.7.2", "punycode.js": "^2.3.1", "qr-image": "^3.2.0", "reflect-metadata": "^0.2.2", @@ -197,7 +197,7 @@ }, "allowScripts": { "@nightwatch/nightwatch-inspector@1.0.1": true, - "chromedriver@150.0.3": true, + "chromedriver@150.0.4": true, "core-js": false, "core-js-pure": false, "fsevents": false, @@ -222,6 +222,6 @@ "setheapsize": "export NODE_OPTIONS=--max_old_space_size=2048" }, "engines": { - "node": ">=24 <25" + "node": ">=24 <27" } } diff --git a/src/core/operations/CBORDecode.mjs b/src/core/operations/CBORDecode.mjs index f4bda7c029..650a3a656b 100644 --- a/src/core/operations/CBORDecode.mjs +++ b/src/core/operations/CBORDecode.mjs @@ -5,7 +5,7 @@ */ import Operation from "../Operation.mjs"; -import Cbor from "cbor"; +import { decode } from "cbor2"; /** * CBOR Decode operation @@ -33,7 +33,7 @@ class CBORDecode extends Operation { * @returns {JSON} */ run(input, args) { - return Cbor.decodeFirstSync(Buffer.from(input).toString("hex")); + return decode(new Uint8Array(input)); } } diff --git a/src/core/operations/CBOREncode.mjs b/src/core/operations/CBOREncode.mjs index c6e094a9ae..9a35adabeb 100644 --- a/src/core/operations/CBOREncode.mjs +++ b/src/core/operations/CBOREncode.mjs @@ -5,7 +5,8 @@ */ import Operation from "../Operation.mjs"; -import Cbor from "cbor"; +import { encode } from "cbor2"; +import { sortCoreDeterministic } from "cbor2/sorts"; /** * CBOR Encode operation @@ -33,7 +34,7 @@ class CBOREncode extends Operation { * @returns {ArrayBuffer} */ run(input, args) { - return new Uint8Array(Cbor.encodeCanonical(input)).buffer; + return new Uint8Array(encode(input, {sortKeys: sortCoreDeterministic})).buffer; } }