Skip to content

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

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

fix(deps): bump diff to ^9.0.0 to clear GHSA-73rr-hh4g-fpgx (#1588)#1599
genisis0x wants to merge 1 commit 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.

…#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.
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