Skip to content

chore(deps): bump js-yaml to 4.3.1 for GHSA-5p4m-2wfm-xmqj - #1084

Merged
widal001 merged 3 commits into
mainfrom
widal001/1083-bump-js-yaml
Aug 7, 2026
Merged

chore(deps): bump js-yaml to 4.3.1 for GHSA-5p4m-2wfm-xmqj#1084
widal001 merged 3 commits into
mainfrom
widal001/1083-bump-js-yaml

Conversation

@widal001

@widal001 widal001 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Resolves a high-severity advisory for js-yaml which is failing other PRs.

Changes proposed

What was added, updated, or removed in this PR.

  • Bumps js-yaml in:
    • Website
    • TS SDK @common-grants/sdk
    • CLI @common-grants/cli
  • Adds patch release for:
    • TS SDK @common-grants/sdk
    • CLI @common-grants/cli

Context for reviewers

Testing instructions, background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers. Explain how the changes were verified.

Notes

Additional information

Screenshots, GIF demos, code examples or output to help show the changes working as expected.

See this check for current failure and see the CI checks below for the new state.

Resolves a high-severity advisory where js-yaml's `!!omap` resolution
consumes quadratic CPU on a crafted document. Affects >=4.0.0 <4.3.1,
and 13 dependency paths were resolving to 4.3.0.

- Refresh the lockfile onto 4.3.1 and raise the spec floor to ^4.3.1 in
  lib/cli (runtime dep), lib/ts-sdk (dev dep), and website (runtime dep).
  The existing ^4.3.0 ranges already permitted 4.3.1, so no override was
  needed to force the upgrade.
- Retarget the guard override in pnpm-workspace.yaml from the superseded
  `<4.3.0` range to `<4.3.1` so it covers the current advisory.
- Drop the `overrides` block from website/package.json. pnpm only honors
  overrides at the workspace root, so it had no effect on resolution, but
  it pinned the vulnerable floor.
@github-actions github-actions Bot added cli Issue or PR related to the @common-grants/cli library website Issues related to the website dependencies Pull requests that update a dependency file sdk Issue or PR related to our SDKs typescript Issue or PR related to TypeScript tooling ts-sdk Related to TypeScript SDK labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Website Preview Deployed!

Preview your changes at: https://cg-pr-1084.billy-daly.workers.dev

This preview will be automatically deleted when the PR is closed.

@widal001
widal001 marked this pull request as ready for review August 7, 2026 17:53
@widal001
widal001 requested a review from karinamzalez August 7, 2026 17:53
Comment thread .changeset/bump-js-yaml-4-3-1.md Outdated
Comment thread pnpm-workspace.yaml
fast-uri@>=3.0.0 <3.1.5: '>=3.1.5 <4'
form-data@>=4.0.0 <4.0.6: '>=4.0.6'
immutable@<4.3.9: '>=4.3.9 <5'
js-yaml@>=4.0.0 <4.3.0: '>=4.3.0'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this override have an upper bound? Asking bc dependencies right above provide a cap (-- e.g. fast-uri: >=3.1.5 <4). Is the difference intentional, or should this be >=4.3.1 <5 so a breaking v5 can't sneak in later?

@widal001 widal001 Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a good question, and based on the initial research that I did, here's what I found:

  • By default running pnpm audit --fix adds the >=X.X.X without the limit
  • Whether the limit makes a difference in terms of dependency resolution isn't totally clear. There is a v5.2.3 of js-yaml published, but transitive dependencies that had ^4.1.1 didn't get bumped to that version.
  • It seems like there may be a risk of that happening if we were to completely delete and recreate the pnpm-lock.yml but I was having trouble re-creating it myself though.

More importantly though, all of my testing made me realize we actually don't need the override at all though, so I removed it here: build: removes unnecessary override

I created this ticket for follow-up investigation and cleanup though

@karinamzalez karinamzalez left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I added some non-blocking comments!

We don't need a patch release for the SDK because js-yaml was just a dev
dependency
@widal001
widal001 merged commit 90a2f7b into main Aug 7, 2026
10 checks passed
@widal001
widal001 deleted the widal001/1083-bump-js-yaml branch August 7, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Issue or PR related to the @common-grants/cli library dependencies Pull requests that update a dependency file sdk Issue or PR related to our SDKs ts-sdk Related to TypeScript SDK typescript Issue or PR related to TypeScript tooling website Issues related to the website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Deps] Fix js-yaml vulnerability

2 participants