Skip to content

Commit d922915

Browse files
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

File tree

‎app/forms/instance-create.tsx‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -589,17 +589,16 @@ export default function CreateInstanceForm() {
589589
description: values.description,
590590
memory: instance.memory * GiB,
591591
ncpus: instance.ncpus,
592-
disks: values.otherDisks.map(
593-
(d): InstanceDiskAttachment =>
594-
d.action === 'attach'
595-
? { type: 'attach', name: d.name }
596-
: {
597-
type: 'create',
598-
name: d.name,
599-
description: d.description,
600-
size: d.size,
601-
diskBackend: d.diskBackend,
602-
}
592+
disks: values.otherDisks.map((d): InstanceDiskAttachment =>
593+
d.action === 'attach'
594+
? { type: 'attach', name: d.name }
595+
: {
596+
type: 'create',
597+
name: d.name,
598+
description: d.description,
599+
size: d.size,
600+
diskBackend: d.diskBackend,
601+
}
603602
),
604603
bootDisk,
605604
externalIps,

‎app/ui/styles/index.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
100% {
6969
opacity: 0.75;
7070
}
71-
50%: {
71+
50% {
7272
opacity: 1;
7373
}
7474
}

0 commit comments

Comments
 (0)