@tinacms/graphql 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +51 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -3026,7 +3026,7 @@ var validateField = async (field) => {
3026
3026
  var package_default = {
3027
3027
  name: "@tinacms/graphql",
3028
3028
  type: "module",
3029
- version: "2.0.1",
3029
+ version: "2.0.3",
3030
3030
  main: "dist/index.js",
3031
3031
  module: "./dist/index.js",
3032
3032
  files: [
@@ -3504,6 +3504,56 @@ var matterEngines = {
3504
3504
  toml: {
3505
3505
  parse: (val) => toml.parse(val),
3506
3506
  stringify: (val) => toml.stringify(val)
3507
+ },
3508
+ // Disable JavaScript and CoffeeScript execution to prevent code execution vulnerability (CVE)
3509
+ // gray-matter executes JS/Coffee code by default, which is a security risk
3510
+ js: {
3511
+ parse: () => {
3512
+ throw new Error(
3513
+ "JavaScript execution in frontmatter is not allowed for security reasons"
3514
+ );
3515
+ },
3516
+ stringify: () => {
3517
+ throw new Error(
3518
+ "JavaScript execution in frontmatter is not allowed for security reasons"
3519
+ );
3520
+ }
3521
+ },
3522
+ javascript: {
3523
+ parse: () => {
3524
+ throw new Error(
3525
+ "JavaScript execution in frontmatter is not allowed for security reasons"
3526
+ );
3527
+ },
3528
+ stringify: () => {
3529
+ throw new Error(
3530
+ "JavaScript execution in frontmatter is not allowed for security reasons"
3531
+ );
3532
+ }
3533
+ },
3534
+ coffee: {
3535
+ parse: () => {
3536
+ throw new Error(
3537
+ "CoffeeScript execution in frontmatter is not allowed for security reasons"
3538
+ );
3539
+ },
3540
+ stringify: () => {
3541
+ throw new Error(
3542
+ "CoffeeScript execution in frontmatter is not allowed for security reasons"
3543
+ );
3544
+ }
3545
+ },
3546
+ coffeescript: {
3547
+ parse: () => {
3548
+ throw new Error(
3549
+ "CoffeeScript execution in frontmatter is not allowed for security reasons"
3550
+ );
3551
+ },
3552
+ stringify: () => {
3553
+ throw new Error(
3554
+ "CoffeeScript execution in frontmatter is not allowed for security reasons"
3555
+ );
3556
+ }
3507
3557
  }
3508
3558
  };
3509
3559
  var stringifyFile = (content, format, keepTemplateKey, markdownParseConfig) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tinacms/graphql",
3
3
  "type": "module",
4
- "version": "2.0.1",
4
+ "version": "2.0.3",
5
5
  "main": "dist/index.js",
6
6
  "module": "./dist/index.js",
7
7
  "files": [
@@ -43,8 +43,8 @@
43
43
  "normalize-path": "^3.0.0",
44
44
  "readable-stream": "^4.7.0",
45
45
  "yup": "^1.6.1",
46
- "@tinacms/schema-tools": "2.0.0",
47
- "@tinacms/mdx": "2.0.0"
46
+ "@tinacms/mdx": "2.0.1",
47
+ "@tinacms/schema-tools": "2.1.0"
48
48
  },
49
49
  "publishConfig": {
50
50
  "registry": "https://registry.npmjs.org"
@@ -71,7 +71,7 @@
71
71
  "vite": "^4.5.9",
72
72
  "vitest": "^0.32.4",
73
73
  "zod": "^3.24.2",
74
- "@tinacms/schema-tools": "2.0.0",
74
+ "@tinacms/schema-tools": "2.1.0",
75
75
  "@tinacms/scripts": "1.4.2"
76
76
  },
77
77
  "scripts": {