fix: replace gray-matter with direct yaml.load for js-yaml 4.x compatibility (#26555)

gray-matter uses yaml.safeLoad() which was removed in js-yaml 4.x, causing 500
errors on app store pages after the js-yaml 4.1.1 update (CWE-1321 fix)

- Add parseFrontmatter function using yaml.load with JSON_SCHEMA
- Add type guard for safe type narrowing
- Add unit tests for frontmatter parsing and security
- Remove gray-matter dependency
This commit is contained in:
Pedro Castro authored and GitHub committed 2026-01-07 15:16:26 -03:00
1 parent f54a3d1d0c
commit 2aed9908b7
4 files changed
+156 -7

No files matched your search

-1
View File
@@ -3546,7 +3546,6 @@ __metadata:
env-cmd: "npm:10.1.0"
glob: "npm:10.4.5"
google-auth-library: "npm:9.15.0"
gray-matter: "npm:4.0.3"
handlebars: "npm:4.7.7"
i18next: "npm:23.2.3"
ical.js: "npm:1.5.0"