Skip to content

Commit 45dabc3

Browse files
committed
fix(deps): remove malicious tree-sitter-erlang, fix 3 moderate vulns
Removes the WhatsApp/tree-sitter-erlang devDependency flagged as malware (GHSA-rphw-c8qj-jv84, CWE-506). The committed WASM in grammars/ was validated clean (correct export name, no disallowed imports) — Erlang grammar support is unaffected. Also runs npm audit fix to bump hono (→4.12.25), protobufjs (→7.5.8), and qs (→6.15.2) to their patched versions. All three were transitive deps; no direct-dependency changes required. See scripts/build-wasm.ts for instructions on rebuilding the Erlang WASM from a safe source if needed.
1 parent 06e7452 commit 45dabc3

3 files changed

Lines changed: 27 additions & 94 deletions

File tree

package-lock.json

Lines changed: 23 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@
161161
"tree-sitter-cuda": "^0.21.1",
162162
"tree-sitter-dart": "^1.0.0",
163163
"tree-sitter-elixir": "^0.3.5",
164-
"tree-sitter-erlang": "github:WhatsApp/tree-sitter-erlang#semver:*",
165164
"tree-sitter-fsharp": "https://github.com/ionide/tree-sitter-fsharp/archive/refs/tags/0.3.0.tar.gz",
166165
"tree-sitter-gleam": "github:gleam-lang/tree-sitter-gleam",
167166
"tree-sitter-go": "^0.25.0",

scripts/build-wasm.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,10 @@ const grammars = [
211211
{ name: 'tree-sitter-clojure', pkg: 'tree-sitter-clojure', sub: null },
212212
{ name: 'tree-sitter-julia', pkg: 'tree-sitter-julia', sub: null },
213213
{ name: 'tree-sitter-r', pkg: '@eagleoutice/tree-sitter-r', sub: null },
214-
{ name: 'tree-sitter-erlang', pkg: 'tree-sitter-erlang', sub: null },
214+
// tree-sitter-erlang: the WhatsApp/tree-sitter-erlang npm package was flagged as malware
215+
// (GHSA-rphw-c8qj-jv84). The grammar WASM is committed in grammars/ and was validated
216+
// clean. To rebuild it, manually install github:the-mikedavis/tree-sitter-erlang, add this
217+
// entry back, run build:wasm, validate the output, then remove the dep and this entry again.
215218
{ name: 'tree-sitter-solidity', pkg: 'tree-sitter-solidity', sub: null },
216219
{ name: 'tree-sitter-objc', pkg: 'tree-sitter-objc', sub: null },
217220
{ name: 'tree-sitter-cuda', pkg: 'tree-sitter-cuda', sub: null },

0 commit comments

Comments
 (0)