Repository navigation
Commit d922915
authored
npm audit fix (#3399)
Required bumping oxfmt, so there's one formatting change.
<details>
<summary>🤖 why remaining <code>braces</code> vuln is not a practical
problem</summary>
Yes, it's not important. The bug is a stack overflow when braces expands
a deeply nested `{a,{b,{c,...}}}` pattern, and in our tree nothing that
could be hostile ever reaches it.
braces only gets installed through patch-package, which runs on
`postinstall`:
- patch-package calls `findWorkspaceRoot()`
(`node_modules/patch-package/dist/detectPackageManager.js:54`).
- That function goes up the directory tree from the current directory,
reading each `package.json`. If one has a `workspaces` field, it passes
those globs to micromatch
(`node_modules/find-yarn-workspace-root/index.js:24-28`). micromatch
uses braces to expand them.
So the only input is the `workspaces` field in our own `package.json`
files, and ours doesn't even have one. Anyone who could plant a
malicious pattern there could already put arbitrary code in a
`postinstall` script, so the bug gives them nothing new. Even then, the
worst case is that `npm install` crashes. None of this goes into the
browser bundle.
If you want the warning gone, you could add an `overrides` entry once
braces publishes a patched version. Right now 3.0.3 is both the latest
release and inside the vulnerable range. I'd ignore it until then.
</details>1 parent cc34675 commit d922915
4 files changed
Lines changed: 203 additions & 210 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
603 | 602 | | |
604 | 603 | | |
605 | 604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
0 commit comments