Skip to content

chore(deps): use 11ty gray-matter fork to resolve js-yaml v3 vulnerabilities#846

Open
ttucker wants to merge 2 commits into
histoire-dev:mainfrom
ttucker:deps/use-11ty-gray-matter
Open

chore(deps): use 11ty gray-matter fork to resolve js-yaml v3 vulnerabilities#846
ttucker wants to merge 2 commits into
histoire-dev:mainfrom
ttucker:deps/use-11ty-gray-matter

Conversation

@ttucker

@ttucker ttucker commented Jun 26, 2026

Copy link
Copy Markdown

Maintainers: thank you so much for your hard work on this project. I love Histoire and hope to use it indefinitely!

This PR aims to address the apparently-unmaintained gray-matter package with a maintained fork of it from the good folks at 11ty, which does not use the vulnerable v3.x version of js-yaml like the "official" version does. There is some chance that v3.x may be patched eventually, but it is only a matter of time before another vulnerability is found, and this change would seem to avoid that possibility moving forward.

Summary

  • Replace gray-matter with the 11ty-maintained @11ty/gray-matter package to avoid pulling in vulnerable js-yaml v3
  • Update the markdown frontmatter parser import to use the new package.
  • Refresh the pnpm lockfile to remove the old gray-matter dependency tree.

Why

The legacy gray-matter package pulls in a vulnerable js-yaml 3.x dependency tree. The 11ty-maintained fork uses js-yaml 4.x, resolving the js-yaml vulnerability while preserving the existing frontmatter parsing behavior used by Histoire markdown stories.

Currently there are at least two vulnerabilities:

Validation

  • lint is passing
  • tests are passing
  • corepack pnpm install --lockfile-only --frozen-lockfile
  • corepack pnpm --filter histoire... build

As this is my first PR to Histoire, please let me know if there are any issues with the PR or the changes and I will be happy to adjust things as needed. If this is not the right approach altogether, again please let me know.

Thanks!

Switch from gray-matter to @11ty/gray-matter so the markdown frontmatter parser pulls in the maintained js-yaml 4.x dependency instead of the vulnerable js-yaml 3.x tree.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@codesandbox

codesandbox Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for histoire-examples-svelte3 ready!

Name Link
🔨 Latest commit e9b364f
🔍 Latest deploy log https://app.netlify.com/projects/histoire-examples-svelte3/deploys/6a3ede56987b850008c7140d
😎 Deploy Preview https://deploy-preview-846--histoire-examples-svelte3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for histoire-controls ready!

Name Link
🔨 Latest commit e9b364f
🔍 Latest deploy log https://app.netlify.com/projects/histoire-controls/deploys/6a3ede56c7a3930008894c46
😎 Deploy Preview https://deploy-preview-846--histoire-controls.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for histoire-site ready!

Name Link
🔨 Latest commit e9b364f
🔍 Latest deploy log https://app.netlify.com/projects/histoire-site/deploys/6a3ede56efed9c0008d67871
😎 Deploy Preview https://deploy-preview-846--histoire-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for histoire-examples-vue3 ready!

Name Link
🔨 Latest commit e9b364f
🔍 Latest deploy log https://app.netlify.com/projects/histoire-examples-vue3/deploys/6a3ede56334dbc0008a54225
😎 Deploy Preview https://deploy-preview-846--histoire-examples-vue3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the gray-matter dependency with @11ty/gray-matter in the packages/histoire package and updates the corresponding import in packages/histoire/src/node/markdown.ts. The lockfile pnpm-lock.yaml has been updated to reflect these dependency changes, including removing unused transitive dependencies. There are no review comments, and we have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@ttucker ttucker changed the title deps: use 11ty gray-matter fork to resolve js-yaml v3 vulnerabilities deps(gray-matter): use 11ty gray-matter fork to resolve js-yaml v3 vulnerabilities Jun 26, 2026
@ttucker ttucker changed the title deps(gray-matter): use 11ty gray-matter fork to resolve js-yaml v3 vulnerabilities chore(deps): use 11ty gray-matter fork to resolve js-yaml v3 vulnerabilities Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant