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
2026-01-07 15:16:26 -03:00
committed by GitHub
parent f54a3d1d0c
commit 2aed9908b7
4 changed files with 156 additions and 7 deletions
-1
View File
@@ -91,7 +91,6 @@
"classnames": "2.3.2",
"dompurify": "3.3.1",
"entities": "4.5.0",
"gray-matter": "4.0.3",
"handlebars": "4.7.7",
"i18next": "23.2.3",
"ical.js": "1.5.0",