Repository navigation
fix(ui): bump @apidevtools/json-schema-ref-parser to 15.3.6 - #37982
Conversation
CVE-2026-15195 (prototype pollution in Pointer.set) affects every version below 15.3.6, including the 14.1.1 the UI resolved. Collate already pins 15.3.6, so this also aligns the two UIs on one major. 15.x ships an ESM `import yaml from "js-yaml"`, and js-yaml 5 has no default export, so a scoped resolution keeps js-yaml 4.3.2 under the parser only; it must stay above the bare js-yaml entry. parseSchemas.js passed its options to the $RefParser constructor, which never read them. They now go on every call, with a JSON parse plugin that drops `$id`: under 2020-12 15.x resolves $refs against `$id`, and 122 spec schemas declare an `$id` that does not match their file path, so refs fetched open-metadata.org instead of the local file. The regenerated output differs only in five ingestion schemas, where 22 bundle-internal $refs pointed through another $ref and resolved nowhere; all 22 now resolve.
Fails on main's output with 22 dangling pointers in five ingestion schemas; also drop the now-redundant post-bundle $id strip, since the parse plugin removes $id when each file is read.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
…js-yaml Yarn 1 applies the first matching resolution, so the scoped js-yaml 4.3.2 entry must stay above the bare js-yaml entry; package.json cannot carry that comment. The record also says when the pin can go: ref-parser 16.x depends on js-yaml ^5.
…' into fix/ui-json-schema-ref-parser-15
URI-decode the fragment and keep empty pointer tokens, so '#/definitions//x' no longer passes against a missing empty key; cover empty, escaped and URI-encoded keys.
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsThe build-time parser upgrade changes $id-based reference resolution and generated schema pointers; mistakes could disrupt schema-driven UI forms. Bumps ✅ 1 closed✅ Quality: js-yaml resolution order rule is only stated in the PR body
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Bumps
@apidevtools/json-schema-ref-parserinopenmetadata-uifrom^14.1.1to15.3.6. No linked issue: this is a dependency/CVE bump.Why:
SNYK-JS-APIDEVTOOLSJSONSCHEMAREFPARSER-17937352, prototype pollution inPointer.set, CVSS 5.3) affects every version below 15.3.6, including the 14.1.1 the UI resolves.15.3.6(open-metadata/openmetadata-collate#5682). This was the last package the two UIs declare on different majors; the Collate side of that cleanup is open-metadata/openmetadata-collate#8652.The package is build-time only:
parseSchemas.js(yarn parse-schema) is its sole importer.What changed:
package.json.15.3.6is pinned exactly, like Collate, plus a scoped resolution"@apidevtools/json-schema-ref-parser/js-yaml": "4.3.2". 15.x doesimport yaml from "js-yaml", and the globaljs-yamlresolution forces 5.5.0, which has no default export. The scoped entry sits above the barejs-yamlentry because yarn 1 applies the first matching resolution; js-yaml stays on 5.5.0 everywhere else. The ordering rule, and when the pin can go (ref-parser 16.x depends on js-yaml^5), is recorded in ADR:2026-11-17-ref-parser-js-yaml-resolution-precedes-bare-js-yaml;parseSchemas.jscites it next to the import.parseSchemas.js. Two fixes:new $RefParser(options), but neither 14.x nor 15.x has a constructor that reads them, socontinueOnErrorandcircularwere dead. Options now go on eachparse/dereference/bundlecall. They hold only what is needed below.circular: trueis the library default, andcontinueOnErrorstays off, as it effectively always was.$idbreaks ref resolution on 15.x. For$schema2019-09 / 2020-12 documents, 15.x resolves relative$refs against$id, which is spec-correct. 122 spec schemas declare an$idthat does not match their file path (e.g.configuration/authConfig.json→…/schema/entity/configuration/authConfig.json), so refs resolved tohttps://open-metadata.org/schema/...and parsed the website's HTML. A JSON parse plugin now drops$idon read, so refs resolve against the file, as they did on 14.x. The output already strips$id.application,applicationPipeline,reverseIngestionPipeline,testSuitePipeline,workflow) change only bundle-internal$refpointers. 14.1.1 wrote 22$refs that point through another$refand so resolve to nothing under JSON Pointer, e.g.…/gcpConfig/oneOf/0/definitions/singleProjectId. 15.3.6 points every one of them at a real location: 0 unresolvable, down from 22.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
yarn parse-schemaregenerates every connection, ingestion, governance, application and configuration schema with no failures and no network reads.Unit tests
src/utils/GeneratedSchemaRefs.test.ts. It walks every generated schema undersrc/jsonsandpublic/jsonsand asserts that each local$refresolves with strict JSON Pointer, the way RJSF resolves it. On this branch: 290/290 passed. Withmain's five ingestion schemas restored: 5 failed, one per file with dangling refs.Verification (run locally, node 22.23.4)
node parseSchemason 14.1.1 reproduced the committed output exactly (clean tree). On 15.3.6 without the$idplugin it failed on 227 files (Error parsing https://open-metadata.org/schema/...). With it: exit 0, and only the 5 files above change.$refin all 288 generated files with strict JSON Pointer. Unresolvable refs: 22 onmain, 0 on this branch.@rjsf/utilsfindSchemaDefinition, the lookup RJSF uses when it renders a$ref, ontestSuitePipeline.jsonatserviceConnection→PubSubConnection→gcpConfig→projectId.main:Could not find a definition for #/…/credentials/properties/gcpConfig/oneOf/0/definitions/singleProjectId.Single Project ID.yarn install --ignore-scriptsis stable on the committed lock. Its only change is a link-entry churn from the local core build, which is not committed.jest --findRelatedTests src/utils/IngestionWorkflowUtils.ts(the consumer of the regenerated ingestion schemas) → 1006/1006 suites, 13830/13830 tests passed.prettier --checkandeslinton the changed files are clean.ui-checkstyle-changed.shhas no src files to process, and itsyarn i18nandyarn generate:app-docssteps leave the tree clean.bc05e9c7325against REVIEW.md and found no 🔴. Its two 🟡 are fixed in1718339fdca: the missing guard test (above), and the redundant post-bundle$idstrip and default plugin keys, now dropped. The regenerated output is unchanged by that cleanup.Checklist:
REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.docs/decisions/2026-11-17-ref-parser-js-yaml-resolution-precedes-bare-js-yaml.mdrecords theresolutionsordering rule (review feedback);check_decision_records.pyis clean.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge based on this follow-up review.Summary
Updates the UI's schema parser to
15.3.6, adjusts schema generation, and repairs generated references.No new actionable issues found in the changes since the previous review. The earlier reference-guard finding is fixed:
resolvesnow decodes URI escapes, preserves empty keys, and checks only own properties.Reviews (10) · Last reviewed commit: "chore(playwright): regenerate the impact..." · Reviewed by Greptile