Skip to content

v1.59.1.0 fix(deps): bump diff to ^9.0.0 to clear GHSA-73rr-hh4g-fpgx (#1588)#1599

Open
genisis0x wants to merge 2 commits into
garrytan:mainfrom
genisis0x:fix/1588-diff-dep-bump-v9
Open

v1.59.1.0 fix(deps): bump diff to ^9.0.0 to clear GHSA-73rr-hh4g-fpgx (#1588)#1599
genisis0x wants to merge 2 commits into
garrytan:mainfrom
genisis0x:fix/1588-diff-dep-bump-v9

Conversation

@genisis0x

Copy link
Copy Markdown
Contributor

Closes #1588.

Summary

npm audit flags diff@7.0.0 with a low-severity DoS in parsePatch/applyPatch (GHSA-73rr-hh4g-fpgx, affected 6.0.0–8.0.2, fixed in 9.0.0). gstack uses diff against local content the user controls so practical risk is low, but the advisory shows on every audit pass and blocks clean supply-chain runs for users who vendor gstack.

Compatibility check

diff@9's breaking changes only touch parsePatch / applyPatch / createPatch and the ESM/CJS exports. Call sites in this repo:

  • browse/src/snapshot.ts:568Diff.diffLines(lastSnapshot, snapshotText)
  • browse/src/meta-commands.ts:712Diff.diffLines(text1, text2)

diffLines signature + return shape are unchanged in v9, so no runtime impact. Smoke-tested locally:

import * as Diff from 'diff';
Diff.diffLines('a\nb\nc\n', 'a\nB\nc\n');
// [{value:'a\n'}, {removed:true,value:'b\n'}, {added:true,value:'B\n'}, {value:'c\n'}]

Test plan

  • bun install — clean resolve, single package updated
  • bun test — same pre-existing sidebar-ux.test.ts failures as main (unrelated; tests grep server.ts for symbols already removed); no new failures introduced
  • Manual Diff.diffLines round-trip against v9 confirmed identical output

Happy to bundle this into the next fix wave or land standalone, whichever's lighter on your end.

@genisis0x genisis0x force-pushed the fix/1588-diff-dep-bump-v9 branch from a960cbe to e4e300e Compare May 21, 2026 11:44
@genisis0x genisis0x force-pushed the fix/1588-diff-dep-bump-v9 branch from e4e300e to b0277b2 Compare June 15, 2026 12:05
@github-actions github-actions Bot changed the title fix(deps): bump diff to ^9.0.0 to clear GHSA-73rr-hh4g-fpgx (#1588) v1.59.1.0 fix(deps): bump diff to ^9.0.0 to clear GHSA-73rr-hh4g-fpgx (#1588) Jun 18, 2026
@genisis0x genisis0x force-pushed the fix/1588-diff-dep-bump-v9 branch 2 times, most recently from e9be514 to 860df34 Compare June 22, 2026 07:26
…#1588)

`npm audit` flags diff@7.0.0 with a low-severity DoS in
parsePatch/applyPatch (GHSA-73rr-hh4g-fpgx, affected 6.0.0–8.0.2,
fixed in 9.0.0). gstack uses diff against local content the user
controls so practical risk is low, but the advisory surfaces on every
audit pass and blocks clean supply-chain runs for users vendoring
gstack.

The 9.0.0 breaking changes only touch parsePatch / applyPatch /
createPatch and the ESM/CJS exports. Both call sites in this repo
(browse/src/snapshot.ts:568, browse/src/meta-commands.ts:712) use
`Diff.diffLines`, whose signature and return shape are unchanged in
v9, so this is a no-op at runtime.
…-gate

Base VERSION advanced to 1.58.1.0, level with this branch, so the version
gate failed its 'VERSION must be greater than base' rule. Bump VERSION and
package.json to 1.59.1.0 — the next free slot above the queued 1.59.0.0
(garrytan#1815). The diff ^9.0.0 dependency bump is unchanged; the only consumer
(Diff.diffLines in browse) is API-compatible with jsdiff v9.
@genisis0x genisis0x force-pushed the fix/1588-diff-dep-bump-v9 branch from 860df34 to aa77594 Compare June 26, 2026 10:29
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.

diff@7.0.0 has DoS advisory in parsePatch/applyPatch (GHSA-73rr-hh4g-fpgx)

1 participant