The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Fix for security alert 541 (#67401)
Denis Berezincb398d5630fe
diff --git a/e2e/support/helpers/e2e-remote-sync-helpers.ts b/e2e/support/helpers/e2e-remote-sync-helpers.tsindex 922fb3fdd98..239f22d2b04 100644--- a/e2e/support/helpers/e2e-remote-sync-helpers.ts+++ b/e2e/support/helpers/e2e-remote-sync-helpers.ts@@ -1,5 +1,5 @@import type { MatcherOptions } from "@testing-library/cypress";-import yamljs from "yamljs";+import yaml from "js-yaml";import type { Collection } from "metabase-types/api";@@ -125,13 +125,13 @@ export const updateRemoteQuestion = (const fullPath = `${LOCAL_GIT_PATH}/${questionFilePath}`;cy.readFile(fullPath).then((str) => {- const doc = yamljs.parse(str);+ const doc = yaml.load(str);assertionsFn?.(doc);const updatedDoc = updateFn(doc);- cy.writeFile(fullPath, yamljs.stringify(updatedDoc));+ cy.writeFile(fullPath, yaml.dump(updatedDoc));cy.exec(`git -C ${LOCAL_GIT_PATH} commit -am '${commitMessage}'`);});});diff --git a/package.json b/package.jsonindex 06a1892624a..4820516dbde 100644--- a/package.json+++ b/package.json@@ -47,9 +47,9 @@"@tiptap/react": "^3.2.0","@tiptap/starter-kit": "^3.2.0","@tiptap/suggestion": "^3.2.0",+ "@types/js-yaml": "^4.0.9","@types/react-router": "3.0.27","@types/redux-auth-wrapper": "^2.0.16",- "@types/yamljs": "^0.2.34","@uiw/react-codemirror": "^4.23.6","@visx/axis": "^3.10.1","@visx/clip-path": "^3.3.0",@@ -90,6 +90,7 @@"inflection": "^1.7.1","inquirer-toggle": "^1.0.1","js-cookie": "^2.1.2",+ "js-yaml": "^4.1.1","json5": "2.2.2","jspdf": "3.0.2","kbar": "^0.1.0-beta.45",@@ -145,7 +146,6 @@"ttag": "1.7.21","typescript": "^5.9.2","underscore": "~1.13.3",- "yamljs": "^0.3.0","yup": "^0.32.11"},"devDependencies": {diff --git a/yarn.lock b/yarn.lockindex b021a09699a..3417caa80c8 100644--- a/yarn.lock+++ b/yarn.lock@@ -5399,6 +5399,11 @@resolved "https://registry.yarnpkg.com/@types/js-cookie/-/js-cookie-2.2.7.tgz#226a9e31680835a6188e887f3988e60c04d3f6a3"integrity sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==+"@types/js-yaml@^4.0.9":+ version "4.0.9"+ resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2"+ integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==+"@types/jsdom@^20.0.0":version "20.0.1"resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808"@@ -5922,11 +5927,6 @@dependencies:"@types/node" "*"-"@types/yamljs@^0.2.34":- version "0.2.34"- resolved "https://registry.yarnpkg.com/@types/yamljs/-/yamljs-0.2.34.tgz#c10b1f31b173f2cc93342f27b0796c2eb5b3ae84"- integrity sha512-gJvfRlv9ErxdOv7ux7UsJVePtX54NAvQyd8ncoiFqK8G5aeHIfQfGH2fbruvjAQ9657HwAaO54waS+Dsk2QTUQ==-"@types/yargs-parser@*":version "15.0.0"resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d"@@ -7612,9 +7612,9 @@ boxen@^5.0.0:wrap-ansi "^7.0.0"brace-expansion@^1.1.7:- version "1.1.11"- resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"- integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==+ version "1.1.12"+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843"+ integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==dependencies:balanced-match "^1.0.0"concat-map "0.0.1"@@ -12052,7 +12052,7 @@ [email protected], glob@^7.1.6:once "^1.3.0"path-is-absolute "^1.0.0"-glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.3, glob@^7.2.0, glob@^7.2.3:+glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.2.0, glob@^7.2.3:version "7.2.3"resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==@@ -14310,6 +14310,13 @@ js-yaml@^4.1.0:dependencies:argparse "^2.0.1"+js-yaml@^4.1.1:+ version "4.1.1"+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b"+ integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==+ dependencies:+ argparse "^2.0.1"+jsbn@~0.1.0:version "0.1.1"resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"@@ -22673,14 +22680,6 @@ yaml@^2.8.1:resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.1.tgz#1870aa02b631f7e8328b93f8bc574fac5d6c4d79"integrity sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==-yamljs@^0.3.0:- version "0.3.0"- resolved "https://registry.yarnpkg.com/yamljs/-/yamljs-0.3.0.tgz#dc060bf267447b39f7304e9b2bfbe8b5a7ddb03b"- integrity sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==- dependencies:- argparse "^1.0.7"- glob "^7.0.5"-yargs-parser@^13.1.2:version "13.1.2"resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38"